Cart pipeline
AddCartLine
Order | Pipe | Description |
---|---|---|
100 | GetCartLine | If the parameter CartLine is not null, sets the result CartLine to the parameter CartLine, otherwise looks through existing CartLines for a matching CartLine for the parameter Product, UnitOfMeasure and CustomProperties and if found, sets the result CartLine to that CartLine. |
200 | CreateCartLine | If the result CartLine is null, creates a new CartLine for the parameter Product, UnitOfMeasure, Notes, CustomProperties and CostCode (if AllowCostCodeEdit is True, if not finds the first active CostCode for the Customer, if there is none, sets CostCode to blank). Then sets result CartLine to the new CartLine. |
300 | AddCartLine | If the Cart does not already contain the CartLine: Sets the CartLine Website to the Cart Website if the CartLine Website is not null, if the Cart Website is null, sets it to the current Website. Sets the CartLine TaxCode1 and TaxCode2 to the Cart TaxCode1 and TaxCode2 if they are not set. Sets the CartLine Warehouse to the Cart DefaultWarehouse. Sets the CartLine ShipSite to the CartLine Warehouse ShipSite if it is set. Sets the CartLine Line to the next Line number if the Cart Status is not PunchoutOrderRequest Adds the CartLine to the Cart's CartLines collection. Sets result WasAdded to true. |
400 | SetRecalculateCartFlags | If result WasAdded is true: Sets Cart RecalculatePromotions to true. Sets Cart ShippingCalculationNeededAsOf to the current date time. Sets Cart RecalculateTax to true. Calls CartPipeline.CalculateHandling on the Cart. |
500 | SetQtyOrdered | If the parameter QtyOrdered is not null: Determines the quantity to set the CartLine QtyOrdered by checking the CartSettings ReplaceOnAdd, if it's true and the Cart Status is not Requisition, it uses the parameter QtyOrdered, otherwise it uses the parameter QtyOrdered plus the CartLine QtyOrdered. If the CartLine Product has a MinimumOrderQty, adjusts the quantity based on that and the unit of measure and sets result IsQtyAdjusted to true. Applies rounding rules to the quantity and if different than the original quantity sets result IsQtyAdjusted to true. Sets the CartLine QtyOrdered to the final calculated quantity. |
600 | RemoveCartLine | If the final QtyOrdered is zero, calls CartPipeline.RemoveCartLine to remove the CartLine. |
700 | SetImpersonatedBy | If there is an Impersonation Cookie, sets the Cart ImpersonatedByAdminUserProfile. |
CalculateHandling
Order | Pipe | Description |
---|---|---|
100 | CheckIsCalculationNeeded | Sets Cart HandlingCharges to zero and then sets result IsCalculationNeeded to true if the Cart Status is not PunchOutOrderRequest and the Cart Website is not null and the Cart Type is Quote or any CartLine Products have IsQuoteRequired set to false. |
200 | CalculateAmount | If result IsCalculationNeeded is true and ShippingGeneralSettings HandlingCalculation is set to Amount:
|
300 | CalculatePercent | If result IsCalculationNeeded is true and ShippingGeneralSettings HandlingCalculation is set to Percent:
|
CreateGetCartLineResult
Order | Pipe | Description |
---|---|---|
100 | CreateGetCartLineResult | Maps the parameter GetCartResult, CartLine and ProductDto in to the result GetCartLineResult. |
200 | GetInventory | If InventorySettings AllowBackOrder is true and the parameter CartLine Product is not discontinued or the parameter CartLine Product is not inventory tracked, sets GetCartLineResult QtyLeft to -1 and if RealTime Inventory is enabled, gets the realtime inventory (most likely from cache) and sets the GetCartLineResult ProductDto Availability. Otherwise, calls the InventoryPipeline GetInventory to get the Availability and sets the GetCartLineResult QtyLeft equal to the QtyOnHand minus the QtyOrdered and the GetCartLineResult HasInsufficientInventory to true if the QtyLeft is less than zero and the Product does not require a quote. |
300 | MapConfigurationToSectionOptions | If the parameter CartLine has OrderLineConfigurationValues, it maps them in to result GetCartLineResult SectionOptions. If the parameter CartLine is xml configured, it maps the CartLine ConfigDataSet in to the result GetCartLineResult SectionOptions. |
400 | CopyCustomPropertiesToResult | Copies the CartLine custom properties in to the result GetCartLineResult Properties collection. |
GetCartDataSet
Order | Pipe | Description |
---|---|---|
100 | CreateDataSet | Sets result DataSet to a new DataSet named CustomerOrderDataSet. |
200 | AddBillTo | Adds the Cart BillTo as table Customer, BillTo CustomProperties as table CustomerProperty, BillToState as table BillToState and BillToCountry as table BillToCountry to the DataSet. |
300 | AddShipTo | Adds the Cart ShipTo as table ShipTo, ShipTo CustomProperties as table ShipToProperty, ShipToState as table ShipToState and ShipToCountry as table ShipToCountry to the DataSet. |
400 | AddGiftCardTransactions | Adds the Cart GiftCardTransactions as table GiftCardTransaction to the DataSet. |
500 | AddPromotions | Adds the Cart CustomerOrderPromotions as table CustomerOrderPromotion and their corresponding Promotions as table Promotion to the DataSet. |
600 | AddCreditCardTransactions | Adds the Cart CreditCardTransactions as table CreditCardTransaction to the DataSet, if OrderSubmitSettings SubmitAllPaymentInfo is false, this only includes successful transactions with the transaction types S, D, C and V. |
700 | AddShipVia | Adds the Cart ShipVia as table ShipVia to the DataSet. |
800 | AddAffiliates | Adds the Cart Affiliate as table Affiliate to the DataSet if it is not null. |
900 | AddDropShip | Adds the Cart DropShipCustomer as table DropShip to the DataSet if it is not null. |
1000 | AddWebsite | Adds the Cart Website as table Website to the DataSet if it is not null. |
1100 | AddUserProfiles | Adds the Cart ApprovedByUserProfile, InitiatedByUserProfile, QuoteByUserProfile and PlacedByUserProfile with tables of the same name to the DataSet if they are not null. |
1200 | AddSalesPerson | Adds Cart Salesperson as table Salesperson to the DataSet if it is not null. |
1300 | AddWarehouse | Adds Cart DefaultWarehouse as table Warehouse to the DataSet if it is not null. |
1400 | AddCurrency | Adds Cart Currency as table Currency to the DataSet if it is not null. |
1500 | AddLanguage | Adds Cart Language as table Language to the DataSet if it is not null. |
1600 | AddCustomerOrder | Adds Cart including a column for DefaultWarehouseName and DiscountAmount as table CustomerOrder and Cart CustomProperties as table CustomerOrderProperty to the DataSet. |
1700 | AddOrderLines | Adds Cart CartLines including columns DollarOffOrder, DollarOffShipping, PercentOffOrder, PercentOffShipping, ProductDiscount, PromotionResultName, ProductDiscountPerEach, Warehouse and ErpNumber as table OrderLine, CartLine CustomProperties as table OrderLineProperty, CartLine ConfigurationValues as table OrderLineConfigurationValue, CartLine Product as table Product, CartLine Product CustomProperties as table ProductProperty, CartLine Product Vendor as table Vendor if it's not null and CartLine Warehouse as table Warehouse if it's not null to the DataSet. |
1800 | AddCustomerOrderTaxes | Adds Cart CustomerOrderTaxes as table CustomerOrderTaxProperty to the DataSet. |
RemoveCartLine
Order | Pipe | Description |
---|---|---|
100 | RemoveCartLine | If the parameter Cart contains the parameter CartLine, deletes the CustomProperties for that CartLine, deletes the CustomerOrderPromotions for that CartLine and then deletes the CartLine, removes it from the Cart CartLines collection, and sets result WasRemoved to true. |
200 | RenumberCartLines | If parameter RenumberLines is true and there are CartLines, calls UnitOfWork.Save() to save the current state so there aren't problems renumbering. Sets all CartLine numbers to the current max line number plus one, plus their current line number and calls UnitOfWork.Save(), then goes through and renumbers the lines in order from 1 and calls UnitOfWork.Save(). |
300 | SetRecalculateCartFlags | If result WasRemoved is true:
|
400 | SetImpersonatedBy | If there is an Impersonation Cookie, sets the Cart ImpersonatedByAdminUserProfile. |
SetBillTo
Order | Pipe | Description |
---|---|---|
100 | SetBillTo | If the parameter BillTo is not null:
|
200 | SetShipTo | If the parameter BillTo is not null and the parameter ShipTo is AbandonedCart, calls the CartPipeline.SetShipTo passing in the BillTo as the ShipTo. |
SetShipTo
Order | Pipe | Description |
---|---|---|
100 | CheckIsShipToChanged | If the parameter ShipTo is not null, sets result IsShipToChanged to true if:
|
200 | SetShipTo | If the parameter ShipTo is not null:
|
300 | CalculateHandling | If the parameter ShipTo is not null and the Cart Status is Cart, calls CartPipeline.CalculateHandling. |
400 | SetRecalculateCartFlags | If the parameter ShipTo is not null and result IsShipToChanged is true:
|
PunchOut references
PunchOut2Go rebranded to TradeCentric in June 2022. Code may still refer to PunchOut.
Updated over 1 year ago