# mulesoft Retail - Full Documentation --- product: Retail version: 3.2 is-latest-version: true --- # Accelerator Setup Guide > For the full documentation index, see: https://docs.mulesoft.com/llms.txt This page provides guidance on configuring the various systems and products required to implement the use cases provided by this solution. ## Service Accounts Service accounts are needed for the applications below, with the versions used during Accelerator development noted: - Salesforce B2C Commerce (Version 20.6, Compatibility Mode 19.10) - Salesforce Marketing Cloud (April 2021) - Salesforce (Spring '21) - SAP (ECC 7.5) Additional resources used: - Global Data Management System (GDM) - MariaDB used as GDM - Order Management System (OMS) - Apache OFBiz used as OMS - Product Information Management (PIM) - Oracle 11g used as PIM ## Required Configuration In addition to configuring individual applications to suit your target deployment environment, the following will be required to implement the use cases described: - B2C Commerce Configuration: Open Commerce and Salesforce Commerce API access in addition to deployment and configuration of the B2C Commerce Sync Cartridge. - Salesforce Configuration: Addition of custom fields and enabling Person Accounts in addition to creating a push topic on Account object with appropriate filters. - Salesforce Marketing Cloud: A custom Data Extension will need to be created along with an Installed Package to make API requests. - SAP Configuration: Deployment of the custom SAP BAPI code required. ## Optional Configuration The accelerator includes some additional common components, which can be configured to suit your needs. These are all optional: - Configurable properties in the common core library - Notification APIs for sending error notifications via email, SMS or Slack - Common scheduler for executing jobs on a schedule Please refer to the [Accelerators Common Services](https://docs.mulesoft.com/accelerators-home/common-services) documentation for more details on configuring optional components. ## See Also - [Prerequisites](https://docs.mulesoft.com/retail/latest/prerequisites) - [MuleSoft Accelerator for Retail](https://docs.mulesoft.com/retail/latest/) --- product: Retail version: 3.2 is-latest-version: true --- # B2C Setup Guide > For the full documentation index, see: https://docs.mulesoft.com/llms.txt The following document provides guidance on how to configure your B2C Commerce instance to provide access to the Data and Shopper APIs used by the B2C Commerce System API implementation template. ## API Client ID Settings Before doing anything with the Salesforce Commerce API, you need an API Client ID. The API Client ID is a credential that is granted from Account Manager, which consists of both an ID value and a secret. Both the ID and the secret should be protected and treated as a username and password combination to using the Salesforce Commerce API. In Account Manager, create a new API Client with the following settings: - **Roles**: Salesforce Commmerce API role with access to the target instance - **OpenID Connect allowed scopes**: sfcc.orders sfcc.orders.rw sfcc.products sfcc.products.rw sfcc.shopper-baskets-orders sfcc.shopper-baskets-orders.rw sfcc.shopper-myaccount sfcc.shopper-myaccount.rw sfcc.shopper-myaccount.addresses sfcc.shopper-myaccount.addresses.rw sfcc.shopper-customers.register sfcc.customerlists.rw - **Token Endpoint Auth Method**: client\_secret\_post - **Access Token Format**: JWT Refer to the Add an API Client ID documentation in the Commerce Cloud Infocenter for more information. ## Open Commerce API Settings OCAPI is the other set of APIs used by the implementation template. These settings are configured in Business Manager, on the **Administration -> Site Development -> Open Commerce API Settings** page. There are two groups of APIs that must be configured: Shop APIs and Data APIs. Access to Shop APIs must be configured at the Global (organization-wide) level, while access to Data APIs can be configured globally or at the individual site level. ### Shop APIs Access to the following resources and methods of the Shop APIs is required:
| Resource | Methods |
|---|---|
/customers | POST |
/customers/* | GET/PATCH |
/customers/*/addresses | GET/POST |
/customers//addresses/ | GET/PATCH/DELETE |
/customers/*/baskets | GET |
/customers/*/orders | GET |
/orders/* | GET/PATCH |
/order_search | POST |
/product_lists | GET |
/product_lists/* | GET/PATCH |
/product_lists/*/items | GET/POST |
/product_lists//items/ | PATCH/DELETE |
/product_search | GET |
/product_search/availability | GET |
/product_search/images | GET |
/product_search/prices | GET |
/product_search/variations | GET |
/products/* | GET |
/products/*/images | GET |
/products/*/availability | GET |
/products/*/prices | GET |
/products/*/variations | GET |
| Resource | Method |
|---|---|
/products/* | GET/PUT/PATCH |
/products//variation_attributes/ | GET/PUT |
/products//variation_attributes//values/* | GET/PUT |
/products//variations/ | GET/PUT |
/product_search | POST |
/inventory_lists//product_inventory_records/ | GET/PATCH/PUT |
/catalogs//categories//products/* | GET/PATCH/PUT |
/sites//orders/* | PUT/PATCH |
| Source System | Source Type | CIM Types | Mapping Notes |
|---|---|---|---|
B2C Commerce | Customer Profile | Individual Customer Contact Address Contact Email Contact Phone | One B2C customer profile will map to multiple CIM objects |
B2B Commerce Sales Cloud Service Cloud | Person Account | Individual CustomerContactAddress Contact Email Contact Phone | Person Account is represented as record type, mapping to Account and Contact |
Account | OrganizationCustomerContact Address Contact Email Contact Phone | Account is mapped separately from Contacts | |
Contact | Individual Contact Address Contact Email Contact Phone | Similar mappings as for Person Accounts but at the Individual level only | |
Marketing Cloud | Subscriber | Individual | Requires a data extension |
SAP | Customer | IndividualCustomer Contact Address Contact Email Contact Phone |
| Target System | CIM Type | Target Types | Mapping Notes |
|---|---|---|---|
B2C Commerce | Customer Individual Contact Address Contact Email Contact Phone | Customer | Relevant fields only |
MDM | All Types | Corresponding type | 1:1 mappings; use join tables for relationships |
B2B Commerce Sales Cloud Service Cloud | CustomerIndividual Contact Address Contact Email Contact Phone | PersonAccount | Relevant fields only |
CustomerOrganization Contact Address Contact Email Contact Phone | Account | Address fields mapped directly | |
Individual Contact Address Contact Email Contact Phone | Contact | Similar mappings as for Person Accounts but at the Individual level only | |
Marketing Cloud | Individual | Subscriber | Relevant fields only |
SAP | CustomerIndividual Contact Address Contact Email Contact Phone | Customer | Relevant fields only |
| Source system | Source type | CIM Types | Mapping notes |
|---|---|---|---|
B2C Commerce | Order | SalesOrder SalesOrderProduct | Order line items added as sales order products |
OFBiz | Order OrderLineItem | SalesOrder SalesOrderProduct | TBD |
SAP | Order | SalesOrder SalesOrderProduct | Order line items added as sales order products |
Salesforce | TBD | SalesOrder | TBD |
| Target system | CIM type | Target Types | Mapping notes |
|---|---|---|---|
B2C Commerce | SalesOrder | Order | Order status update only |
OFBiz | SalesOrder SalesOrderPRoduct | Order OrderLineItems | Order status update only |
SAP | SalesOrder SalesOrderProduct | Order OrderLineItems | Relevant fields only |
Salesforce | SalesOrder | TBD | TBD |
| Source System | Source Type | CIM Types | Mapping Notes |
|---|---|---|---|
B2C Commerce | Product | Product ProductCategory ProductCatalog PriceBook | Relevant fields only |
OFBiz | Product | Product ProductCategory ProductCatalog PriceBook | Relevant fields only |
SAP S/4HANA | Product | Product ProductCategory ProductCatalog PriceBook | Relevant fields only |
Salesforce | Product Pricebook | Product ProductCategory ProductCatalog PriceBook | Relevant fields only |
PIM | Product ProductCategory ProductCatalog PriceBook | Product ProductCategory ProductCatalog PriceBook | 1:1 mappings; use join tables for relationships |
| Target System | CIM Type | Target Types | Mapping Notes |
|---|---|---|---|
B2C Commerce | Product ProductCategory ProductCatalog PriceBook | Product | Relevant fields only |
OFBiz | Product ProductCategory ProductCatalog PriceBook | Product ProductCategory ProductCatalog PriceBook | Relevant fields only |
SAP S/4HANA | Product PriceBook | Product PricingCondition | Relevant fields only |
Salesforce | Product ProductCategory ProductCatalog PriceBook | Product PriceBook | Relevant fields only |
PIM | Product ProductCategory ProductCatalog PriceBook | Product | Relevant fields only |
| Path | Object |
|---|---|
party/servicedef/services.xml | createPartyPostalAddress quickCreateCustomer createPerson updatePerson createUpdatePartyEmailAddress createUpdatePartyTeleco Number createUpdatePartyPostalAddress findPartiesById |
party/servicedef/services_view.xml | getPerson getPartiesFromExternalId getPartiesFromExactEmail getPartyContactMechValueMaps |
accounting/servicedef/services_paymentmethod.xml | createCreditCard |
order/servicedef/services.xml | addOrderItemShipGroup changeOrderStatus createOrderPaymentPreference findOrders storeOrder |
product/servicedef/services_shipment.xml | createShipment |
| Salesforce Object Name | Singular Label | Plural Label |
|---|---|---|
Managed_External_Id | Managed External Identifier | Managed External Identifiers |
| Salesforce Object Label | Field Label | Field Name | Data Type | Length | Unique | ExternalId | Formula |
|---|---|---|---|---|---|---|---|
Account | Global Billing Address ID | Global_BillingAddress_Id | Text | 36 | Y | Y | - |
Account | Global Customer ID | Global_Customer_Id | Text | 36 | Y | Y | - |
Account | Global Email Address ID | Global_EmailAddress_Id | Text | 36 | Y | Y | - |
Account | Global Fax Number ID | Global_FaxNumber_Id | Text | 36 | Y | Y | - |
Account | Global Mailing Address ID | Global_MailingAddress_Id | Text | 36 | Y | Y | - |
Account | Global Mobile Number ID | Global_MobileNumber_Id | Text | 36 | Y | Y | - |
Account | Global Party ID | Global_Party_Id | Text | 36 | Y | Y | - |
Account | Global Phone Number ID | Global_PhoneNumber_Id | Text | 36 | Y | Y | - |
Account | Global Shipping Address ID | Global_ShippingAddress_Id | Text | 36 | Y | Y | - |
Account | Customer Status | Customer_Status | Picklist | - | N | N | - |
Managed External Identifier | External Id | External_Id | Text | 80 | N | N | - |
Managed External Identifier | External Id Type | External_Id_Type | Picklist | - | N | N | - |
Managed External Identifier | Object Id | Object_Id | Text | 80 | N | N | - |
Managed External Identifier | Object Type | Object_Type | Picklist | - | N | N | - |
Managed External Identifier | Status | Status | Picklist | - | N | N | - |
Managed External Identifier | Status Last Changed | Status_Last_Changed | Date/Time | - | N | N | - |
Order | Global_SalesOrder_Id | Global_SalesOrder_Id | Text | 36 | Y | Y | - |
Order | Total Tax | Total_Tax__c | Currency | - | - | - | - |
Order | Shipping | Shipping__c | Currency | - | - | - | - |
Order | Order Total Amount | OrderTotalAmount__c | Formula (Currency) | - | - | - | Shipping_c + Total_Tax_c + TotalAmount |
Product | Global_Product_Id | Global_Product_Id | Text | 36 | Y | Y | - |
Product | Product Group | Product_Catalog__c | Picklist | - | N | N | - |
Product | Short Description | Short_Description__c | Text | 255 | N | N | - |
Product | Item Short Description | Item_Short_Description__c | Text | 255 | N | N | - |
Product | Item Long Description | Item_Long_Description__c | Text | 255 | N | N | - |
Product | Status | Status__c | Picklist | - | N | N | - |
| Salesforce Object Label | Field Label | Field Name | Data Type | Values |
|---|---|---|---|---|
Order | Order Type | Type | Picklist | ADD_ON, CANCELLATION, INITIAL, JOURNAL, RENEWAL, RETURN, SUBSCRIPTION, UPGRADE |
Order | Status | Status | Picklist | CANCELLED, CREATED, CONFIRMED, DELIVERED, IN_CART, IN_TRANSIT, INVOICED, LOST, PARTIALLY_SHIPPED, PICKUP_AVAILABLE, PROCESSING, REJECTED, RETURNED |
| Salesforce Object Label | Field Label | Field Name | Data Type | Values |
|---|---|---|---|---|
Account | Customer Status | Type | Picklist | Prospect, Onboarding, Active, Inactive, Closed, Deceased, Delinquent, Dormant |
Managed External Identifier | External Id Type | External_Id_Type__c | Picklist | SALESFORCE_B2C, SALESFORCE_CORE, PIM, OFBIZ, SAP_4HANA, MDM, SAP_ECC, SALESFORCE_MARKETING, POS, SALESFORCE_DC, SALESFORCE_LM, ORACLE_EBS |
Managed External Identifier | Object Type | Object_Type__c | Picklist | BillingAddress, Customer, Email, Fax, Household, Individual, MailingAddress, MobilePhone, Organization, Phone, Product, SalesOrder, ShippingAddress |
Managed External Identifier | Status | Status__c | Picklist | VALID, INVALID |
Product | Product Group | Product_Catalog__c | Picklist | Basic, Premium |
Product | Status | Status__c | Picklist | VALID, INVALID |
| Salesforce Object | Salesforce Platform Event Object | Salesforce Platform Event API Name | Apex Trigger Name |
|---|---|---|---|
Account | Account | Account__e | AccountEventsPub |
| Object | How to create |
|---|---|
|
|
| Object | How to create |
|---|---|
|
|
|
|
|
|
|
|
|
|
| Object | How to create |
|---|---|
|
|
| Object | How to create |
|---|---|
|
|
| Salesforce Object | Field Name | Data Type | Length | Unique | ExternalId |
|---|---|---|---|---|---|
BusinessPartner | YY1_SME_MPARTYROLEID_bus | Text | 36 | Y | Y |
SalesOrder | YY1_SME_MORDERID_SDH | Text | 36 | Y | Y |
Product | YY1_SME_UnvProductId_PRD | Text | 36 | Y | Y |