The submitOrder
pipeline is triggered by the OrderSubmitLoader
. When it starts, the only information available to the pipeline is the order ID. Each processor in the pipeline, if successful, adds information to the data being processed and starts the next processor. The pipeline chain’s transaction mode is TX_REQUIRED.
The following sections describe each processor in the pipeline chain.
fetchOrder
Uses the order ID to look up the order in the order repository.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
lookupOrder
If line items exist in the data warehouse for the current order ID, this processor fetches those line items and creates a parameter map entry for them.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
checkOrderExists
Acts as a switch in the pipeline. If the warehouseItemPropertyName
value
pair exists in the parameter map, then the line items for the order already exist, and the current log record does not need to be processed. If the map entry does not exist then the pipeline processes the log entry.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
createOrderId
Generates a surrogate key for the order.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
createLineItems
Breaks the order down into line items. If a single line item is shipped to multiple addresses, each address is considered a separate line item.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
calculateLineItemsGrossRevenue
The quantity of that particular line item, times the unit price of the item.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
allocateTax
Allocates the order’s tax amount to the individual line items, using a weighted calculation. If rounding results in the sum of the line item allocations being more or less than the original total, the tax on the final line item is used to make any adjustments. The calculation is:
(line item gross revenue/total order gross revenue) * total tax
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
allocateShipping
Allocates the order’s shipping amount to the individual line items, using a weighted calculation. If rounding results in the sum of the line item allocations being more or less than the original total, the shipping on the final line item is used to make any adjustments. The calculation is:
(line item gross revenue/total order gross revenue) * total shipping
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
allocateOrderDiscount
Allocates order-level discounts (such as free shipping) to individual line items using a weighted calculation. If rounding results in the sum of the line item allocations being more or less than the original total, the shipping on the final line item is used to make any adjustments. The calculation is:
(line item gross revenue/total order gross revenue) * total discount
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
Note: The allocateTax
, allocateShipping
, and allocateOrderDiscount
processors can be replaced with processors that use a uniform rather than a weighted allocation strategy. Core Commerce provides a sample component for this purpose (the Nucleus location is /atg/reporting/datawarehouse/process/allocators/UniformLineItemAllocator
), or you can write your own processor that implements the atg.reporting.datawarehouse.commerce.LineItemAllocator
interface. See the Processor Chains and the Pipeline Manager chapter in this guide for information on editing pipeline chains.
calculateManualAdjustments
Calculates the manual adjustment credits and debits for the entire order. This processor is used only for Oracle Commerce Service Center.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
allocateManualAdjustmentsDebit
Allocates manual adjustment debits to line items. This processor is used only for Oracle Commerce Service Center.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
allocateManualAdjustmentsCredit
Allocates manual adjustment credits to line items. This processor is used only for Oracle Commerce Service Center.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
calculateLineItemsDiscountAmount
Totals any discounts applied to the line items in the order.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
calculateLineItemsMarkdownDiscountAmount
Calculates the markdown discount. That discount is basically any discounts that apply before promotionally discounts are applied. For example, if someone buys a package of hot dogs on sale (no promotions) for $4.50 when the list price for the package of hot dogs is $5.00 then the markdown discount is $.50.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
calculateLocalOrderDiscountAmountTotal
Calculates the total order discount amount (order discount amount plus manual adjustment credits) in the local currency.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
calculateLineItemsPriceOverride
Captures price override amounts. This processor comes into use only if you are using Commerce Service Center.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
calculateLineItemNetRevenue
Calculates net revenue for individual line items using the following formula:
Gross revenue + tax allocation + shipping allocation – line item discount
- order discount allocation
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
calculateOrderNetRevenue
Sums the net revenue of all line items. This information is stored with the line item in the Data Warehouse, but is the same for all items in an order.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
convertCurrency
Sums the net revenue of all line items. This information is stored with the line item in the Data Warehouse, For all of the amounts in the pipeline to this point (gross net revenue, line item shipping allocation, etc.), converts the local currency to the standard currency. The standardCurrencyCode
property of the processor points to the /atg/reporting/datawarehouse/CommerceWarehouseConfiguration.
, which identifies the standard currency; the default is USD.
standardCurrencyCode
The actual conversion is done by the CurrencyTools
component. CurrencyTools
uses the ARF_CURRENCY_CONV
table in the Data Warehouse to look up the conversation rate for the day on which the order was placed, if one is available.
Note: Core Commerce does not populate the ARF_CURRENCY_CONV
table. Customers are responsible for acquiring and maintaining currency conversion rate data.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
lookupBillingRegion
Uses the billing address in the order to determine the billing region.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
lookupSubmittedSite
Determine the submitted sites for the order.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
lookupOriginSite
Determine the site of origin for the order.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
lookupSiteVisit
Looks up visit information in the ARF_SITE_VISIT
table using the SESSION_ID
, START_DATE
, and END_DATE
columns.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
lookupInternalUser
Identifies the agent involved with the order. If not using Commerce Service Center, this value is set to Unspecified.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
lookupOriginOfOrder
Identifies the order’s place of creation. Orders can originate either from Web or Contact Center. If the order is created from a scheduled order template and the template is created by the commerce site, the origin is Web. If the template is for Commerce Service Center, the origin is Contact Center.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
lookupSalesChannel
Identifies the sales channel through which the order was submitted. The sales channel for an order can be either Web or Contact Center. If the order is submitted from the commerce site, the sales channel is Web. If the order is submitted from Commerce Service Center, the origin is Contact Center.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
lookupDay
Uses the timestamp of the order to look up the day in the ARF_TIME_DAY
table.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
lookupTime
Uses the timestamp of the order to look up the time in the ARF_TIME_TOD
table.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
lookupLocalCurrency
Looks ups the currency used in the transaction in the ARF_CURRENCY
, using the ISO4217_ALPHA3
code for the currency.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
lookupCustomer
Uses the profile ID in the order to look up the customer in the ARF_USER
table.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
lookupCustomerDemographic
Examines the visitor’s date-of-birth, gender, marital status and home region as defined in the Data Warehouse. It uses this information to look up the record in the ARF_DEMOGRAPHIC
table that classifies this user.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
lookupOrganization
Retrieves the organization data.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
lookupPromotionGroup
Examines the order for any promotions that were used and uses this information to look up a promotion group.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
lookupSegmentCluster
Examines the order for segment clusters and looks up any associated with the order.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
createPromotions
Creates the promotions associated with the order.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
orderCouponCheck
Checks to see if there are any coupons associated with the order.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
runLineItemPipelineChain
Runs the runLineItem
pipeline chain for each line item in the order.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
runPromotionUsagePipelineChain
Runs the runPromotionUsage
pipeline chain for any promotions associated with the order.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |
ignoreSubmitOrder
Ignores submitted orders.
Transactional Mode | TX_MANDATORY |
Component |
|
Object |
|
Transitions | Return value of 1 executes |