RCG Salesforce Topic 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 |
---|---|
map-contact-to-cim | Salesforce Contacts pushtopic event message to CIM Mapping |
map-customer-and-contact-points-to-cim | Salesforce pushtopic event message to CIM Mapping |
map-opportunity-to-cim | |
map-orders-to-cim |
map-contact-to-cim
Salesforce Contacts pushtopic event message to CIM Mapping
Source:
./src/main/resources/dwl/map-contact-to-cim.dwl
Functions
fun getFormattedDateTime (toFormat)
Formats the date-time to the type accepted by CIM
fun isOrgAccount (isPersonAccount)
Returns whether or not the account is Organization type
Mapping Tables
Maps Salesforce Contact to CIM Individual format
CIM | Salesforce Contact | Description |
---|---|---|
id | Global_Individual_Id__c | The global identifier of the contact in Salesforce |
salutation | Salutation | The salutation of the contact |
personName | Name | The name of the contact |
firstName | FirstName | The first name of the contact |
lastName | LastName | The Last name of the contact |
birthDate | Birthdate | The birth date of the contact |
partyType | Individual | The contact party set as "Individual" |
contactPointType | ContactPointAddress | contactPointType set as "ContactPointAddress" |
id | null | The contactPointAddress id set as null |
activeFromDate | now() | The date from which the contactpoint is active - Set as current date |
addressLine1 | MailingStreet | The mailing address of the contact |
cityName | MailingCity | The mailing city of the contact |
postalCodeText | MailingPostalCode | The contact mailing postal code |
stateProvinceName | MailingState | The contact state province name |
countryName | MailingCountry | The country name of the contact |
geoLatitude | MailingLatitude | The geo-latitude code of the contact |
geoLongitude | MailingLongitude | The geo-longitude code of the contact |
geoAccuracy | MailingGeocodeAccuracy | The geo-code accurate location of the contact |
contactPointType | ContactPointEmail | contactPointType set as "ContactPointEmail" |
id | null | The contactpoint id set as null |
activeFromDate | now() | The date from which the contactpoint is active - Set as current date |
emailAddress | The email address of the contact | |
contactPointType | ContactPointPhone | contactPointType - set as "ContactPointPhone" |
contactPointType | ContactId | The contactpoint id - set as null |
activeFromDate | now() | The date from which the contactpoint is active - Set as current date |
telephoneNumber | Phone | The phone number of the contact |
externalIds.id | null | Id field set as null |
externalIds.externalId | Id | The identifier of the contact in Salesforce |
externalIds.externalIdType | "SALESFORCE_CORE" | The externalId Type set as "SALESFORCE_CORE" |
externalIds.status | VALID | The externalId status is set as VALID |
auditInfo.createdDate | CreatedDate | Timestamp of when the contact was created |
auditInfo.createdBy | CreatedById | Identifies the system or user which created the contact |
auditInfo.updatedDate | LastModifiedDate | Timestamp of when the contact was last updated |
auditInfoupdatedBy | LastModifiedById | Identifies the system or user which last updated the contact |
auditInfo.isDeleted | IsDeleted | Indicates whether or not the contact has been soft-deleted |
map-customer-and-contact-points-to-cim
Salesforce pushtopic event message to CIM Mapping
Source:
./src/main/resources/dwl/map-customer-and-contact-points-to-cim.dwl
Functions
fun getFormattedDateTime (toFormat)
Formats the date-time to the type accepted by CIM
Mapping Tables
Maps event payload from Salesforce pushtopic to CIM Customer format. The CIM Customer (PartyRole) can have either Individual or Organization as Party. The Salesforce PersonAccount is mapped as a Customer with Party as Individual in CIM. The Salesforce Account is mapped as a Customer with Party as Organization in CIM.
CIM - Customer | Event payload from Salesforce Pushtopic | Description |
---|---|---|
id | Global_Customer_Id__c | The Global Id of the customer in MDM system |
partyRoleType | "Customer" | The party role type - Set as "Customer" |
party[0].id | null | The party identifier - Set as null |
party[0].partyType | "Individual" | The party type - Set as Individual or Organization depending on the Account type |
party[0].personName | FirstName LastName | The Person Name in Salesforce |
party[0].firstName | FirstName | The firstname of the customer in Salesforce |
party[0].lastName | LastName | The lastname of the customer in Salesforce |
party[0].contactPoints[0].contactPointType | "ContactPointAddress" | The contact point type - Set as "ContactPointAddress" |
party[0].contactPoints[0].id | null | The contact point type identifier in Salesforce - Set as null |
party[0].contactPoints[0].activeFromDate | now() | The date from which the contact point is active - Set as current date |
party[0].contactPoints[0].addressLine1 | PersonMailingStreet | The Mailing street of the customer in Salesforce |
party[0].contactPoints[0].cityName | PersonMailingCity | The Mailing City of the customer in Salesforce |
party[0].contactPoints[0].postalCodeText | PersonMailingPostalCode | The postal code of the customer in Salesforce |
party[0].contactPoints[0].stateProvinceName | PersonMailingState | The state province of the customer in Salesforce |
party[0].contactPoints[0].countryName | PersonMailingCountry | The country of the customer in Salesforce |
party[0].contactPoints[0].geoLatitude | PersonMailingLatitude | The latitude co-ordinates of the customer address |
party[0].contactPoints[0].geoLongitude | PersonMailingLongitude | The longitude co-ordinates of the customer address |
party[0].contactPoints[0].geoAccuracy | PersonMailingGeocodeAccuracy The geo-accuracy of the customer address | |
party[0].contactPoints[1].contactPointType | "ContactPointEmail" | The contact point type - Set as "ContactPointEmail" |
party[0].contactPoints[1].id | null | The contact point type identifier in Salesforce - Set as null |
party[0].contactPoints[1].activeFromDate | now() | The date from which the contact point is active - Set as current date |
party[0].contactPoints[1].emailAddress | PersonEmailThe Email address of the customer in Salesforce | |
party[0].contactPoints[2].contactPointType | "ContactPointPhone" | The contact point type - Set as "ContactPointPhone" |
party[0].contactPoints[2].id | null | The contact point type identifier in Salesforce - Set as null |
party[0].contactPoints[2].activeFromDate | now() | The date from which the contact point is active - Set as current date |
party[0].contactPoints[2].telephoneNumber | Phone | The telephone number of the customer in Salesforce |
externalIds[0].id | null | The identifier for the externalId entry - Set as null |
externalIds[0].externalId | Id | The identifier of the customer in Salesforce |
externalIds[0].externalIdType | "SALESFORCE_CORE" | The external identifier type - Set as "SALESFORCE_CORE" |
externalIds[0].status | "VALID" | The status of the ExternalId - Set as "VALID" |
customerNumber | AccountNumber | The customer number stored in Salesforce - default as "" |
customerStatus | "ACTIVE" | The customer Status in Salesforce - Set as Active |
auditInfo.createdDate | getFormattedDateTime(CreatedDate) | Timestamp of when the customer was created |
auditInfo.createdBy | CreatedById | Identifies the system or user which created the customer |
auditInfo.updatedDate | getFormattedDateTime(LastModifiedDate) | Timestamp of when the customer was last updated |
auditInfoupdatedBy | LastModifiedById | Identifies the system or user which last updated the customer |
auditInfo.isDeleted | IsDeleted | Indicates whether or not the customer has been soft-deleted |
map-opportunity-to-cim
Source:
./src/main/resources/dwl/map-opportunity-to-cim.dwl
Functions
fun getFormattedDateTime (toFormat)
Formats the date-time to the type accepted by CIM
Mapping Tables
Create Sales Order CIM Request mapping.
CIM | Sales Order | Description |
---|---|---|
name | SenderBusinessSystemName | Sales Order Name |
id | SalesOrder | Sales Order Id |
orderNumber | SalesOrder | Sales Order Number |
description | SalesOrderItemText | Sales Order Description |
grandTotalAmount | TotalNetAmount | Sales Order Total Amount |
billToContact | ShippingPoint | Sales Order Bill Contact |
priceCalculationStatusMessageText | SalesOrderItemText | Sales Order Price Status |
totalAdjustedDeliveryTaxAmount | TotalAdjustedDeliveryAmount | Sales Order Adjusted Delivery Amount |
renewalUpliftRate | AccountingExchangeRate | Sales Order Renewal Up Lift Rate |
salesOrderConfirmationStatus | OverallTotalDeliveryStatus | Sales Order Delivery Status |
salesChannel DistributionChannel | Sales Order Sales Channel | |
developerStatusCode | DeliveryStatus | Sales Order Delivery Status |
billToAccount | MatlAccountAssignmentGroup | Sales Order Bill Account |
totalProductAmount | NetAmount | Sales Order Product Amount |
originalOrder | SalesOrder | Sales Order Original Order |
billToAddress | ShippingPoint | Sales Order Address Bill |
shipToContact | ShippingPoint | Sales Order Shipping Point |
totalDeliveryAmount | TotalNetAmount | Sales Order Delivery Amount |
salesOrderType.id | SalesOrderType | Sales Order Id |
salesOrderType.name | SalesGroup | Sales Order Sales Group |
externalIds.externalIdType.id | SalesOrder | Sales Order Id |
externalIds.externalIdType.name | SenderBusinessSystemName | Sales Order Name |
externalIds.externalId | ExternalItemID | Sales Order External Id |
externalIds.id | SalesOrder | Sales Order Id |
externalIds.statusLastChangedDate | LastChangeDateTime | Sales Order Status Last Changed DateTime |
purchaseOrderNumber | PurchaseOrderByCustomer | Sales Order Purchase Number |
orderLineItems.totalLineAmount | TotalPrice | Sales Order TotalPrice |
orderLineItems.totalUnitPriceAmount | UnitPrice | Sales Order UnitPrice |
orderLineItems.totalPriceAmount | TotalPrice | Sales Order TotalPrice |
orderLineItems.totalTaxAmount | 5 | 5 default |
orderLineItems.orderedQuantity | Quantity | Sales Order Quantity |
map-orders-to-cim
Source:
./src/main/resources/dwl/map-orders-to-cim.dwl
Functions
fun getFormattedDateTime (toFormat)
Formats the date-time to the type accepted by CIM
Mapping Tables
Create Sales Order CIM Request mapping.
CIM | Sales Order | Description |
---|---|---|
name | SenderBusinessSystemName | Sales Order Name |
id | SalesOrder | Sales Order Id |
orderNumber | SalesOrder | Sales Order Number |
description | SalesOrderItemText | Sales Order Description |
grandTotalAmount | TotalNetAmount | Sales Order Total Amount |
billToContact | ShippingPoint | Sales Order Bill Contact |
priceCalculationStatusMessageText | SalesOrderItemText | Sales Order Price Status |
totalAdjustedDeliveryTaxAmount | TotalAdjustedDeliveryAmount | Sales Order Adjusted Delivery Amount |
renewalUpliftRate | AccountingExchangeRate | Sales Order Renewal Up Lift Rate |
salesOrderConfirmationStatus | OverallTotalDeliveryStatus | Sales Order Delivery Status |
salesChannel DistributionChannel | Sales Order Sales Channel | |
developerStatusCode | DeliveryStatus | Sales Order Delivery Status |
billToAccount | MatlAccountAssignmentGroup | Sales Order Bill Account |
totalProductAmount | NetAmount | Sales Order Product Amount |
originalOrder | SalesOrder | Sales Order Original Order |
billToAddress | ShippingPoint | Sales Order Address Bill |
shipToContact | ShippingPoint | Sales Order Shipping Point |
totalDeliveryAmount | TotalNetAmount | Sales Order Delivery Amount |
salesOrderType.id | SalesOrderType | Sales Order Id |
salesOrderType.name | SalesGroup | Sales Order Sales Group |
externalIds.externalIdType.id | SalesOrder | Sales Order Id |
externalIds.externalIdType.name | SenderBusinessSystemName | Sales Order Name |
externalIds.externalId | ExternalItemID | Sales Order External Id |
externalIds.id | SalesOrder | Sales Order Id |
externalIds.statusLastChangedDate | LastChangeDateTime | Sales Order Status Last Changed DateTime |
purchaseOrderNumber | PurchaseOrderByCustomer | Sales Order Purchase Number |
orderLineItems.totalLineAmount | TotalPrice | Sales Order TotalPrice |
orderLineItems.totalUnitPriceAmount | UnitPrice | Sales Order UnitPrice |
orderLineItems.totalPriceAmount | TotalPrice | Sales Order TotalPrice |
orderLineItems.totalTaxAmount | 5 | 5 default |
orderLineItems.orderedQuantity | Quantity | Sales Order Quantity |