Accelerator Salesforce OMS Event Listener - Implementation Template
Data mappings
This document provides information generated from the DataWeave scripts included in the project, such as function definitions, variable definitions, and data mapping tables.
Module | Description |
---|---|
get-order-summary-details-request | Composite request to retrieve OrderSummary details from Salesforce |
map-order-summary-details-to-cim | Salesforce FulfillmentOrder to CIM OrderAllocatedEvent Mapping |
get-invoice-details-request | Composite request to retrieve Invoice and OrderSummary details from Salesforce |
map-invoice-details-to-cim | Salesforce Invoice Object to CIM OrderInvoicedEvent Mapping |
map-order-summary-created-to-cim | Salesforce OrderSummary details to CIM OrderCreatedEvent Mapping |
get-order-summary-and-fulfillment-orders-details-request | Composite request to retrieve FulfillmentOrder details from Salesforce |
get-order-summary-details-request
Composite request to retrieve OrderSummary details from Salesforce
Source:
./src/main/resources/dwl/get-order-summary-details-request.dwl
map-order-summary-details-to-cim
Salesforce FulfillmentOrder to CIM OrderAllocatedEvent Mapping
Source:
./src/main/resources/dwl/map-order-summary-details-to-cim.dwl
Mapping Tables
Maps Salesforce FulfillmentOrder details to CIM OrderAllocatedEvent
OrderAllocatedEvent | FulfillmentOrder | Description |
---|---|---|
id | OrderSummaryId | Identifier of the OrderSummary in Salesforce |
orderEventType | Set as "OrderAllocatedEvent" | |
purchaseOrderDate | fulfillmentOrders.OrderSummary.OrderedDate | Date the purchase order was created |
purchasingOrganizationCode | fulfillmentOrders.Account.Name | The Name of the organization that submitted the purchase order |
buyerEmailAddress | fulfillmentOrders.OrderSummary.BillingEmailAddress | Email address of the individual responsible for the purchase order |
For Each FulfillmentOrder mapped to fulfillmentOrders | ||
id | id | Identifier of the FulfillmentOrder in Salesforce |
fulfillmentOrderNumber | FulfillmentOrderNumber | The fulfillment order number |
customerId | AccountId | Identifier of the customer who purchased the items to be fulfilled |
billToIndividualId | BillToContactId | Identifier of the individual contact that the fulfillment order will be billed to |
fulfilledToName | FulfilledToName | Name of the person or company receiving the fulfillment order |
fulfilledToLocation.id | Set as Null | |
fulfilledToLocation.locationAddress.addressLine1 | FulfilledToStreet | The street name for the fulfillment address |
fulfilledToLocation.locationAddress.cityName | FulfilledToCity | The name of the city for the fulfillment address |
fulfilledToLocation.locationAddress.stateProvinceName | FulfilledToState | The name of the state or province for the fulfillment address |
fulfilledToLocation.locationAddress.stateProvinceCode | FulfilledToStateCode | The ISO region code for the fulfillment address |
fulfilledToLocation.locationAddress.countryName | FulfilledToCountry | The name of the country for the fulfillment address |
fulfilledToLocation.locationAddress.countryCode | FulfilledToCountryCode | The ISO country code for the fulfillment address |
fulfilledToLocation.locationAddress.postalCodeText | FulfilledToPostalCode | The postal code for the fulfillment address |
isReship | IsReship | Indicates whether or not whether the purchase order is a reshipment |
isSuspended | IsSuspended | Indicates whether or not whether the purchase order is suspended |
fulfillmentOrderStatus | Status | The status of the fulfillment order in Salesforce |
currencyCode | CurrencyIsoCode | Currency code for fulfillment order in Salesforce |
totalItemCount | ItemCount | Sum of quantity from all fulfillment order line items in Salesforce |
totalAdjustmentAmount | TotalAdjustmentAmount | Sum of total product adjustment amount from all fulfillment order line items in Salesforce |
totalAdjustmentTaxAmount | TotalAdjustmentTaxAmount | Tax on the total adjustment amount |
totalAdjustmentWithTaxAmount | TotalAdjustmentAmtWithTax | Sum of totalAdjustmentAmount and totalAdjustmentTaxAmount |
totalDeliveryAmount | TotalDeliveryAmount | Total amount of the delivery charges on the fulfillment order |
totalDeliveryTaxAmount | TotalDeliveryTaxAmount | Tax on the total delivery amount |
totalDeliveryWithTaxAmount | TotalDeliveryAmtWithTax | Sum of TotalDeliveryAmount and TotalDeliveryTaxAmount |
totalAmount | TotalAmount | Adjusted total not including tax of the fulfillment order line items and including products and delivery charges |
totalTaxAmount | TotalTaxAmount | Total Tax amount |
totalWithTaxAmount | GrandTotalAmount | Sum of TotalAmount and TotalTaxAmount |
For Each FulfillmentOrderLineItems mapped to fulfillmentOrderProducts | ||
id | id | The identifier of the FulfillmentOrderLineItem in Salesforce |
lineNumber | OrderItemSummary.LineNumber | Line number of the fulfillment order product in a fulfillment order |
productCode | OrderItemSummary.ProductCode | Product Code in Salesforce |
currencyCode | OrderItemSummary.CurrencyIsoCode | Currency code for the fulfillment order product |
quantityUnitOfMeasure | QuantityUnitOfMeasure | Unit of measure for the quantity fulfilled |
orderedQuantity | OrderItemSummary.QuantityOrdered | Number of product units requested on the sales order |
fulfilledQuantity | OrderItemSummary.QuantityFulfilled | Sum of quantity from all fulfillment order line items |
unitPrice | OrderItemSummary.UnitPrice | Actual unit price of the fulfillment order product |
grossUnitPrice | OrderItemSummary.GrossUnitPrice | Gross unit price of the fulfillment order product after all taxes and adjustments |
totalAdjustmentAmount | TotalAdjustmentAmount | Total adjustment amount of the fulfillment order product |
totalAdjustmentTaxAmount | TotalAdjustmentTaxAmount | Tax on the total adjustment amount |
totalAdjustmentWithTaxAmount | TotalAdjustmentAmountWithTax | Sum of TotalAdjustmentAmount and TotalAdjustmentTaxAmount |
totalProductAmount | TotalLineAmount | Total line amount |
totalProductTaxAmount | TotalLineTaxAmount | Tax on the total product amount |
totalProductWithTaxAmount | TotalLineAmountWithTax | |
totalAmount | TotalAmount | Total amount of the fulfillment order product |
totalTaxAmount | TotalTaxAmount | |
totalWithTaxAmount | TotalPrice | |
End For Each fulfillmentOrderProducts | ||
End For Each fulfillmentOrders |
get-invoice-details-request
Composite request to retrieve Invoice and OrderSummary details from Salesforce
Source:
./src/main/resources/dwl/get-invoice-details-request.dwl
map-invoice-details-to-cim
Salesforce Invoice Object to CIM OrderInvoicedEvent Mapping
Source:
./src/main/resources/dwl/map-invoice-details-to-cim.dwl
Mapping Tables
Maps Salesforce Invoice details to CIM OrderInvoicedEvent
OrderInvoicedEvent | Invoice | Description |
---|---|---|
id | Id | Identifier of the Invoice in Salesforce |
orderEventType | Set as "OrderInvoicedEvent" | |
purchaseOrderDate | OrderSummary.OrderedDate | Date the purchase order was created |
purchasingOrganizationCode | OrderSummary.Account.Name | The Name of the organization that submitted the purchase order |
buyerEmailAddress | OrderSummary.BillingEmailAddress | Email address of the individual responsible for the purchase order |
For Each Invoice | ||
id | Id | Identifier of the Invoice in Salesforce |
description | Description | Description of the Invoice |
invoiceNumber | DocumentNumber | Document number for the invoice is set as invoice number |
billToCustomerId | BillingAccountId | The identifier of the account in Salesforce to which the invoice is billed to |
billToIndividualId | BillToContactId | Identifier of the customer who purchased the items to be fulfilled |
invoiceStatus | Status | The status of the Invoice |
invoiceDate | InvoiceDate | Date the invoice was created |
dueDate | DueDate | The due date of the invoice payment |
balance | Balance | The outstanding balance for the invoice |
totalAdjustmentAmount | TotalAdjustmentAmount | The total amount including tax of the price adjustments applied to the products on the invoice |
totalAdjustmentTaxAmount | TotalAdjustmentTaxAmount | The tax on the total adjustment amount |
totalAdjustmentWithTaxAmount | TotalAdjustmentAmountWithTax | The total amount including tax of the price adjustments applied to the products on the invoice |
totalChargeAmount | TotalChargeAmount | The total amount of the charges on the credit memo not including taxes |
totalChargeTaxAmount | totalChargeTaxAmount | The tax on the total charges |
totalChargeWithTaxAmount | totalChargeWithTaxAmount | The total amount of the charges on the invoice including tax |
totalAmount | TotalAmount | The total amount of the invoice including adjustments but not tax |
totalWithTaxAmount | TotalAmountWithTax | The total amount of the invoice including adjustments and tax |
For Each InvoiceLines mapped to invoiceLines | ||
id | Id | Identifier of the invoice line in Salesforce |
name | Name | The name of the invoice line |
invoiceLineType | Type | The type of the invoice line |
productId | productId | Identifier of the product that was ordered or changed to create the invoice |
productCode | Product2.ProductCode | The code of the product that was ordered or changed to create the invoice |
lineStartDate | InvoiceLineStartDate | Identifier of the customer who purchased the items to be fulfilled |
lineEndDate | InvoiceLineEndDate | Identifier of the customer who purchased the items to be fulfilled |
lineQuantity | Quantity | The number of units of the product that created the invoice line |
unitPrice | UnitPrice | The unit price of the product on the invoice line not including tax |
grossUnitPrice | GrossUnitPrice | The unit price of the product on the invoice line including tax. |
totalAdjustmentAmount | AdjustmentAmount | The total amount of the price adjustments on the invoice line not including tax |
totalAdjustmentTaxAmount | AdjustmentTaxAmount | The tax on the adjustment amount |
totalAdjustmentWithTaxAmount | AdjustmentAmountWithTax | The total amount of the price adjustments on the invoice line including tax |
totalChargeAmount | ChargeAmount | The total amount of the charges on the invoice line not including tax |
totalChargeTaxAmount | ChargeTaxAmount | The total amount on the charges on the invoice line including tax |
totalChargeWithTaxAmount | ChargeAmountWithTax | The total amount on the charges on the invoice line including tax |
taxCode | TaxCode | The total amount on the charges on the invoice line including tax |
taxName | TaxName | The name of the tax applied to the invoice line |
taxRatePercent | TaxRate | The percentage value used to calculate the tax amount on the invoice line |
End of For Each InvoiceLines | ||
End of For Each Invoice |
map-order-summary-created-to-cim
Salesforce OrderSummary details to CIM OrderCreatedEvent Mapping
Source:
./src/main/resources/dwl/map-order-summary-created-to-cim.dwl
Mapping Tables
Maps Salesforce OrderSummary details to CIM OrderCreatedEvent
OrderCreatedEvent | OrderSummary | Description |
---|---|---|
id | Id | Identifier of the Order Summary in Salesforce |
orderEventType | Set as "OrderCreatedEvent" | |
purchaseOrderDate | OrderedDate | Date the purchase order was created |
purchasingOrganizationCode | Account.Name | The Name of the organization that submitted the purchase order |
get-order-summary-and-fulfillment-orders-details-request
Composite request to retrieve FulfillmentOrder details from Salesforce
Source:
./src/main/resources/dwl/get-order-summary-and-fulfillment-orders-details-request.dwl