# mulesoft Salesforce OMS - Full Documentation --- product: Salesforce OMS version: 1.1 is-latest-version: true --- # Anypoint MQ Setup Guide > For the full documentation index, see: https://docs.mulesoft.com/llms.txt To create the Anypoint MQ destinations that are required by the MuleSoft Accelerator for Salesforce OMS components, use the `Anypoint-MQ-Configuration` Postman collection in the [Accelerator B2B Common Resources](https://anypoint.mulesoft.com/exchange/org.mule.examples/accel-b2b-common-resources-src/) project. ## Environment Settings Create the `dev` environment by using the template in the [Accelerator B2B Common Resources](https://anypoint.mulesoft.com/exchange/org.mule.examples/accel-b2b-common-resources-src/) project and importing it into your Postman workspace. Assign the values that reflect your target Anypoint Platform org before running the requests. ## Run the Collection The collection defines the variables that you must override prior to running requests. The collection is organized into separate folders, which you must execute in the following order: 1. Authorization 2. Client-Management - This variable is optional. 3. Queue-Management 4. Exchange-Management Run requests in the Verification folder to validate the results of the previous operations. You can also run the requests in the Deletions folder to clean up objects created by the collection. ## Verify Destinations Successful execution of the collection creates the following Anypoint MQ destinations:
Queue NameBound to ExchangeDead Letter Queue Name

accel-b2b-orders-update-queue

accel-oms-update-exchange

accel-b2b-orders-update-dl-queue

accel-oms-exception-queue

accel-retail-update-queue

accel-retail-update-exchange

accel-retail-exception-dl-queue

accel-shipping-update-queue

accel-shipping-update-exchange

accel-shipping-exception-dl-queue

## See Also - [Prerequisites](https://docs.mulesoft.com/salesforce-oms/latest/prerequisites) - [MuleSoft Accelerator for Salesforce OMS](https://docs.mulesoft.com/salesforce-oms/latest/) --- product: Salesforce OMS version: 1.1 is-latest-version: true --- # Anypoint Partner Manager Setup Guide > For the full documentation index, see: https://docs.mulesoft.com/llms.txt To configure Anypoint Partner Manager, follow the Postman collection instructions in the [Accelerators B2B Common Resources](https://anypoint.mulesoft.com/exchange/org.mule.examples/accel-b2b-common-resources-src/) project. The collection creates the following configurations: - Endpoints, message types, and custom message attributes - Partners - Message flows Once the collection runs successfully, go to Partner Manager in Anypoint Platform and verify that the configurations were created successfully. ## Run the Postman Collection Use the Partner Manager setup collection in the [Accelerator B2B Common Resource](https://anypoint.mulesoft.com/exchange/org.mule.examples/accel-b2b-common-resources-src/) project to configure message flows and their components in Partner Manager for the Accelerator for Salesforce OMS solution. To run the collection, you must set the following variables:
Property NameDescription

env_identifier_x12-isa-zz_id

The ID of the identifier type X12-ISA-ZZ.

env_identifier_x12-gs_id

The ID of the identifier type X12-GS for partner.

env_identifier_ref-id_id

The ID of the identifier type Reference ID. This is static across all the organizations.

http_endpoint_type_id

The endpointTypeId of an HTTPS endpoint type. The value is the same across all environments. Note that you can find the endpointTypeId value by opening the details of an endpoint in Partner Manager, and then running a request from the Network tab in the developer view of your browser. The value is available from the Preview tab of the run result.

host_anypoint_org

The host name of the Anypoint Platform organization.

devx.orgid

The ID of the Anypoint Platform organization.

devx.envid

The ID of the environment in the Anypoint Platform organization.

partner_x12_isa_identifier_value

The value of the partner identifier type X12-ISA-ZZ. This example uses ORANGE.

partner_reference_id_identifier_value

The value of the partner identifier type Reference ID. This example uses ORANGE.

partner_x12_gs_identifier_type_value

The value of the partner identifier type X12 - GS. This example uses ORANGE.

host_x12_isa_identifier_value

The value of the host identifier type X12-ISA-ZZ. This example uses MYTHICAL.

host_reference_id_identifier_value

The value of the host identifier type Reference ID. This example uses MYTHICAL.

host_x12_gs_identifier_type_value

The value of the host identifier type X12 - GS. This example uses MYTHICAL.

b2b_orders_process_api_host_name

The host name of the B2B Orders Process API.

b2b_orders_prc_api_orders_path

The URI path for Orders in the B2B Orders Process API.

b2b_storage_sys_api_host_name

The host name of the B2B Storage System API.

b2b_erp_prc_api_host_name

The host name of the ERP Process API. This example uses the B2B Simulator Process API.

b2b_erp_prc_api_invoices_path

The URI path for Invoices in the ERP Process API. This example uses the B2B Simulator Process API.

b2b_orders_prc_api_payments_path

The URI path for Payments in the B2B Orders Process API.

b2b_erp_prc_api_acknowledgements_path

The URI path for Acknowledgments in the ERP Process API. This example uses the B2B Simulator Process API.

partner_name

The name of the partner.

partner_description

The description of the partner.

partner_website_url

The website URL of the partner.

## See Also - [Prerequisites](https://docs.mulesoft.com/salesforce-oms/latest/prerequisites) - [MuleSoft Accelerator for Salesforce OMS](https://docs.mulesoft.com/salesforce-oms/latest/) --- product: Salesforce OMS version: 1.1 is-latest-version: true --- # MuleSoft Accelerator for Salesforce OMS > For the full documentation index, see: https://docs.mulesoft.com/llms.txt The MuleSoft Accelerator for Salesforce OMS enables you to integrate your Order Management System (OMS) with external business partners and application ecosystems by leveraging the application and Business-to-Business (B2B) integration capabilities of Anypoint Platform. The solution accelerates the implementation of Electronic Data Interchange (EDI) messaging and other integrations into Salesforce OMS. ## Use Cases ### B2B EDI Order Lifecycle Automation The [B2B EDI Order Lifecycle Automation](https://anypoint.mulesoft.com/exchange/org.mule.examples/mulesoft-accelerator-for-salesforce-oms/minor/1.1/pages/7ij-1pd/B2B%20EDI%20Order%20Lifecycle%20Automation/) use case lets you add EDI as a direct order intake channel to manage and service EDI orders across the full order management lifecycle. ### Salesforce OMS to ERP Integration Manage orders received via omnichannel sources within Salesforce Order Management System (OMS) with the [Salesforce OMS to ERP Integration](https://anypoint.mulesoft.com/exchange/org.mule.examples/mulesoft-accelerator-for-salesforce-oms/minor/1.1/pages/e74-ta9/Salesforce%20OMS%20to%20ERP%20Integration/) use case. ## See Also - [Getting Started](https://docs.mulesoft.com/accelerators-home/getting-started) - [Prerequisites](https://docs.mulesoft.com/salesforce-oms/latest/prerequisites) - [Release Notes](https://docs.mulesoft.com/release-notes/accelerators/salesforce-oms/salesforce-oms-release-notes) - [MuleSoft Accelerator for Salesforce OMS on Exchange](https://anypoint.mulesoft.com/exchange/org.mule.examples/mulesoft-accelerator-for-salesforce-oms/) --- product: Salesforce OMS version: 1.1 is-latest-version: true --- # Prerequisites for MuleSoft Accelerator for OMS > For the full documentation index, see: https://docs.mulesoft.com/llms.txt The amount of configuration you’ll need to perform depends on which assets you’re deploying in your target environment. Use the following setup guides to configure the systems and products that are needed to implement the [B2B EDI Order Lifecycle Automation](https://anypoint.mulesoft.com/exchange/org.mule.examples/mulesoft-accelerator-for-salesforce-oms/minor/1.1/pages/7ij-1pd/B2B%20EDI%20Order%20Lifecycle%20Automation/) use case: - [Anypoint MQ Setup](https://docs.mulesoft.com/salesforce-oms/latest/anypointmq-setup-guide) - [Salesforce OMS Setup and Customization](https://docs.mulesoft.com/salesforce-oms/latest/sfdc-oms-setup-customization-guide) - [Anypoint Partner Manager Setup](https://docs.mulesoft.com/salesforce-oms/latest/anypoint-partner-manager-setup-guide) Use the following setup guides to configure the systems and products that are needed to implement the [Salesforce OMS to ERP Integration](https://anypoint.mulesoft.com/exchange/org.mule.examples/mulesoft-accelerator-for-salesforce-oms/minor/1.1/pages/e74-ta9/Salesforce%20OMS%20to%20ERP%20Integration/) use case: - [Anypoint MQ Setup](https://docs.mulesoft.com/salesforce-oms/latest/anypointmq-setup-guide) - [SAP S/4HANA Order Management](https://docs.mulesoft.com/salesforce-oms/latest/order-mgmt-guide) - [SAP S/4HANA Setup](https://docs.mulesoft.com/salesforce-oms/latest/sap-s4hana-setup-guide) ## See Also - [Getting Started](https://docs.mulesoft.com/accelerators-home/getting-started) - [MuleSoft Accelerator for Salesforce OMS](https://docs.mulesoft.com/salesforce-oms/latest/) --- product: Salesforce OMS version: 1.1 is-latest-version: true --- # Salesforce OMS Setup and Customization Guide > For the full documentation index, see: https://docs.mulesoft.com/llms.txt This guide describes how to configure Salesforce OMS for the [B2B EDI Order Lifecycle Automation](https://anypoint.mulesoft.com/exchange/org.mule.examples/mulesoft-accelerator-for-salesforce-oms/) use case. ## Configure Salesforce OMS Follow the instructions in the [Salesforce Order Management Implementation Guide for B2B and D2C Commerce](https://help.salesforce.com/s/articleView?language=en_US&id=commerce.om_impl_intro.htm&type=5) to configure Salesforce OMS. As part of the configuration: - Disable the **Enable Reduction Orders** option in **Order Settings**. - Enable **Order Management**, **Use Person Accounts**, and **High Scale Orders** - Activate **Multiple Currencies** - Enable **State** and **Country/Territory** picklists - [Configure Payment Gateway](#configure_payment_gateway) - Configure either a digital wallet or credit card payment method and associate an account with it ## Customize Salesforce OMS Install the Salesforce package from the [Accelerator B2B Common Resources](https://anypoint.mulesoft.com/exchange/org.mule.examples/accel-b2b-common-resources-src/) project and verify that the configuration is correct in your Salesforce organization. Follow these steps in Salesforce OMS after installing the package successfully: 1. Create a matching rule named `Account Interchange Code Match` in **Setup > Matching Rules**. Enter `Account: B2B_EDISenderCode EXACT MatchBlank = FALSE` in the **Matching Criteria** field. 2. Create a duplicate rule named `Account Interchange Code Rule` in **Setup > Duplicate Rules**. Select `Account Interchange Code Match` as the matching rule. After you save and activate the duplicate rule, open the rule in **Duplicate Management > Duplicate Rules** and set the order to 1 in the **Reorder** field, which gives the rule precedence over the standard **Account** object matching rule. ### Custom Fields Verify that the following fields have been created in the corresponding objects:
Salesforce ObjectField LabelField NameData TypeLengthUniqueExternalId

Account

B2B EDI Sender Code

B2B_EDISenderCode__c

Text(Case Sensitive)

15

Y

N

Account

B2B Order Currency

B2B_OrderCurrency__c

Text

3

N

N

Account

B2B Order Delivery Method

B2B_OrderDeliveryMethod__c

Lookup(Order Delivery Method)

N

Account

B2B Order Sales Channel

B2B_OrderSalesChannel__c

Lookup(Sales Channel)

N

Account

B2B Order Store

B2B_OrderStore__c

Lookup(Store)

N

Shipment

ExternalId

ExternalId__c

Text

100

N

Y

> [!NOTE] You must add the **Read** and **Write** permissions to the custom fields created by the > Salesforce package. ### Verify the Custom Object Tab Verify that your Salesforce org shows the **Pending Order Summary Errors** custom tab.
Salesforce ObjectField LabelField NameData TypeLengthUniqueExternalId

Pending Order Summary Error

Error Code

Error_Code__c

Text

255

N

N

Pending Order Summary Error

Error Message

Error_Message__c

Long Text Area

5000

N

N

Pending Order Summary Error

Event Uuid

Event_Uuid__c

Text

255

N

N

Pending Order Summary Error

External Reference Identifier

External_Reference_Identifier__c

Text

255

N

N

Pending Order Summary Error

Pending Order Summary Error Name

Name

Text

80

N

N

### Platform Event Verify that the `ShipmentCreated` platform event is configured exactly as shown in the following table:
NameAPI NameEvent TypePublish Behavior

ShipmentCreated

ShipmentCreated__e

High Volume

Publish After Commit

In addition, verify that the following fields have been created in the `ShipmentCreated` object:
Field LabelField NameData TypeLengthUniqueExternalId

OrderSummaryId

OrderSummaryId__c

Text

50

N

N

ShipmentId

ShipmentId__c

Text

50

N

N

### Flows After installing the Salesforce package, verify that the following flows are available and activated. Customize the flows based on your business requirements. - `OMS_Create_OrderSummaryRoutingSchedule_on_OrderSummary_event` - Creates an Order Summary Routing schedule when OMS Order Summary record is created. - `OMS_Create_Fulfillment_Orders_on_OrderSummaryRoutingSchedule` - Creates a fulfillment orders after an `Order Summary Routing` schedule record is created. - `OMS_Create_Fulfillment_Orders_from_Order_Summary_Subflow` - Used in `OMS_Create_Fulfillment_Orders_on_OrderSummaryRoutingSchedule` flow to create fulfillment orders for an order summary. - `OMS_Raise_ShipmentCreated_Event` flow - Creates a platform event when a shipment is created in Salesforce OMS. - `OMS_Create_Invoice` - Creates an invoice after the fulfillment order is filled. - `OMS_Log_Pending_Order_Summary_Error` - Creates an error record in the `Pending Order Summary Error` object when an error occurs during processing of the `Pending Order Summary Processed Event`. ### Configure Payment Gateway If you don’t use Salesforce Payments, configure a payment gateway manually to view and manage payments in Order Management. Configure a gateway for each payment provider, including Stripe, PayPal, Adyen, and Cybersource. You can find payment packages on AppExchange for some vendors. Follow these steps to configure a payment gateway manually: 1. Follow the [Core Payments Reference Gateway Integration Adapters](https://github.com/forcedotcom/Core-Payments-Reference-Gateway-Integration-Adapters) instructions to create a payment gateway adapter class that uses the Salesforce APEX connector framework. 2. Create a payment gateway provider record that points to your newly created payment gateway adapter class. 3. Go to **Setup** and define a named credential that contains the gateway provider’s authentication and login information. The adapter class callout definition calls the named credential. 4. Create a payment gateway record to link the payment gateway provider record and the named credential. ## Error Handling in Salesforce OMS The Salesforce High Scale Orders API initially records data for order summaries as `PendingOrderSummary`. To troubleshoot errors that occur during the transition from `PendingOrderSummary` to `Order Summary`, use the `OMS_Log_Pending_Order_Summary_Error.flow` process, which subscribes to the `PendingOrderSumProcEvent` event and logs errors in the `Pending Order Summary Error` object. The **Pending Order Summary Errors** custom tab in Salesforce OMS shows the errors. ## Configure Your Connected App for Authentication Follow these steps to generate the **Consumer Key** and **Consumer Secret** values required for Salesforce authentication: 1. In your Salesforce org, navigate to **New Connected App** in the **App Manager**. 2. Enter "MuleSoft Accelerator" as the connected app name and API name. 3. Enter your email address. 4. Check the **Enable OAuth Settings**. 5. Set the callback URL `http://localhost`. 6. Select "Full access (full)" in the **Selected OAuth Scopes** list. 7. Click **Save**, and then click **Continue**. 8. Click **Manage** to view the connected app details. 9. Click **Edit Policies**. 10. Select **All users may self-authorize** in the **OAuth Policies** section. 11. Select **Relax IP** restrictions in the **IP Relaxation** field. 12. Click **Save**. 13. Go to **Setup** and navigate to **App Manager**. 14. Select **View** from the actions for your connected app. 15. Click **Manage Consumer Details** in the **API (Enable OAuth Settings)** section. 16. Verify your identity by entering the verification code from your email. 17. Copy the values in the **Consumer Key** and **Consumer Secret** fields. 18. Add the values as the `sfdc.client-id` and `sfdc.client-secret` properties respectively in your Maven settings.xml file. Use the sample settings.xml file in the Accelerator B2B Common Resources project as a starting point for configuring your connected app. ## Generate a Security Token for Your Service Account To connect to the Salesforce OMS Cloud instance, you must generate a token for the service account used by Mule applications. 1. Log in to Salesforce as the service account user, which is the account Mule applications use to connect to Salesforce. 2. Click the Username icon and select **Settings**. 3. Select **Reset My Security Token** in **My Personal Information**. 4. Click **Reset Security Token**. Salesfoce emails the new security token to the service account user’s address. > [!NOTE] The option to reset your security token does not show if you have one or more login IP > ranges. To enable the option, remove the login IP ranges from the settings page of the profile > assigned to the service account user. Reset your security token, and then restore the login IP > ranges. ## See Also - [Prerequisites](https://docs.mulesoft.com/salesforce-oms/latest/prerequisites) - [MuleSoft Accelerator for Salesforce OMS](https://docs.mulesoft.com/salesforce-oms/latest/) --- product: Salesforce OMS version: 1.1 is-latest-version: true --- # SAP S/4HANA Order Management Guide > For the full documentation index, see: https://docs.mulesoft.com/llms.txt ## Overview This guide helps you create a sales order, freight order, outbound delivery, and invoice in SAP so that you can implement the [Salesforce OMS to ERP Integration](https://anypoint.mulesoft.com/exchange/org.mule.examples/mulesoft-accelerator-for-salesforce-oms/minor/1.1/pages/e74-ta9/Salesforce%20OMS%20to%20ERP%20Integration/) use case. ## Before You Begin Submit a ticket on [SAP for Me](https://me.sap.com/) to request activation of the following scope items in your Central Business Configuration (CBC) provisioned S/4HANA Cloud Essentials tenant: - Manual Transportation Planning (6W2) - Transportation Execution (6W3) - Freight Settlement (6W4) For more information about how to complete the ticket, see the [Scope item activation request for CBC provisioned S/4HANA Cloud Essentials tenant](https://userapps.support.sap.com/sap/support/knowledge/en/3122430) knowledge base article on the SAP support site. ### Generated SAP Documents Completing the steps in this guide generates the following documents: - **Sales Order** A contractual agreement between a sales organization and a sold-to party to deliver products or provide a service at a set price, quantity, and time. - **Freight Order** The order that a carrier or shipper plans to execute, containing the logistical processing plan, vehicle departure times, and order execution data. - **Outbound Delivery Order** Contains the data that is required to trigger and monitor the outbound delivery process. - **Billing Document** The invoice that is created for an outbound delivery and requests payment from the customer who placed the order. ## Create a Sales Order Follow these steps to create a sales order in SAP: 1. Search for the **Create Sales Order - VA01** app. 2. Enter **OR** in the **Order Type** field. 3. Press Enter. 4. Enter the customer identification number in the **Sold-to Party** field. 5. Enter the customer identification number in the **Ship-to Party** field. 6. Click the **Display header details** icon (image::display-header-details-icon.png\["",3%,3%\]) and verify that the **Shp. Cond** on the **Shipping** tab is set to **TM - Int. Planning**, which enables SAP to create a freight unit automatically. The freight unit is used when the freight order is created. 7. Enter the product identification number that you are including in the sales order in the **Material** column of the **All Items** section. 8. Enter a value in the **Order Quantity** field. 9. Press Enter. 10. Click **Save**. Copy the sales order ID, which you’ll need in the next steps. ## Create a Freight Order Follow these steps to create a freight order in SAP: 1. Search for the **Transportation Cockpit** app. 2. Select **ERP Document** and paste the sales order ID into the **Freight Unit Stages** field. 3. Enter an asterisk in the **Vehicle Types** field. 4. Click **Continue**. 5. Select the freight unit of the sales order in the **Freight Unit** column. 6. Select the truck type in the **Trucks** field. 7. Click **Create Road Freight Order** in the **Freight Unit Stages** field and then click **Save** to create the freight order. 8. Click the freight order number to open the order details and then complete the **Vehicle Type**, **Carrier**, **Purchasing Organization**, and **Purchasing Group** fields. 9. Enter an amount in the **Base FTL - Flat Rate** field on the **Charges** tab and then click **Save**. 10. Select **Send to Carrier** from the **Subcontracting** dropdown on the **Statuses** tab. 11. Then, select **Set to Confirmed by Carrier** from the same **Subcontracting** dropdown. 12. Select **Custom Fields** from the **All Tabs** icon (image::all-tabs-icon.png\["",3%,3%\]) and complete the **Tracking Number** field. 13. Click **Save**. ## Create an Outbound Delivery Follow these steps to create an outbound delivery in SAP: 1. Click the **Create Deliveries** tab and then click the **Document Flow** tab. 2. Select the box for each document that is related to the freight order. 3. Open SAP S/4HANA in a new tab and search for the **Change Outbound Delivery** app. 4. Enter the outbound delivery number from the **Create Deliveries** tab in the **Outbound Delivery** field and then press Enter. 5. On the **Picking** tab, enter the same value in the **Picked Qty** column that’s in the **Deliv. Qty** column to update the status in the **OvrllPickStatus** and **Warehouse Execution** fields. 6. Select **Post Goods Issue** from the **Menu** dropdown to trigger the `Outbound Delivery API (DELIVERY_REQUEST_OUT)` event. 7. Return to the freight order and click **Refresh** to update the status fields on the **Statuses** tab. 8. Click the **Edit** button. 9. Select **Set to Ready for Transportation Execution** in the **Execution Status** dropdown to update the value in the **Execution Status** field to **Ready for Transportation Execution**. 10. Select **Set to Departed** in the **Execution Status (Source)** dropdown in the **Stages** section. ## Create an Invoice Follow these steps to create an invoice in SAP: 1. Search for the **Create Billing Documents - VF01** app. 2. Enter the outbound delivery number in the **Document** column of the **Documents to Be Processed** table and then press Enter. 3. Click **Save**. ## View Your Documents Follow these steps in SAP to view the documents you created: 1. Search for the **Manage Sales Order Version 2** app and then filter by the sales order ID. 2. Click the sales order ID in the **Sales Orders** table to open the order details. 3. Click **Process Flow** to view the documents you created. ## See Also - [Prerequisites](https://docs.mulesoft.com/salesforce-oms/latest/prerequisites) --- product: Salesforce OMS version: 1.1 is-latest-version: true --- # SAP S4HANA Setup Guide > For the full documentation index, see: https://docs.mulesoft.com/llms.txt ## Overview To configure and test an S/4HANA Cloud SOAP outbound service (Product replication: `productmdmbulkreplicaterequest`) and the SAP S/4HANA Cloud SOAP Connector as a Mule application deployed on CloudHub, see the \[SAP S/4HANA Setup Guide\] on Exchange. Follow the steps in the [S/4HANA Customization Guide](#s4hana-customization-guide) section to set up your Salesforce OMS to ERP Integration. ## Configure SAP S/4HANA To make the necessary configurations in S/4HANA: 1. Create a **Communication System** in the corresponding Fiori app. This communication system represents the external system that will consume the S/4HANA Cloud SOAP service. In this example, it’s named `COM_0009_SOAP_OUT`: ![SAP S/4HANA Create Communication System](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-01.png) 2. For the 'Business System' name, use the same name of the System ID. 3. In the 'Host Name' field, enter the hostname of the Mule application deployed on Cloudhub (if you don’t have it yet, you can enter a mock URL and then modify it later): ![SAP S/4HANA Communication System with Host Name field](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-02.png) 4. Create a user that will be used to connect to the Cloud Hub app for sending product information in the outbound scenario (this is necessary even though the Mule application does not validate the user; we used any user for outbound): ![SAP S/4HANA user creation](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-03.png) 5. Use the **Communication Arrangement** Fiori app to create a new Communication Arrangement: ![SAP S/4HANA Create Communication Arrangement](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-04.png) 6. Create a new **Communication Arrangement**, select the communication scenario "SAP\_COM\_0009", and then define a specific name for the arrangement, "SAP\_COM\_0009\_SOAP". 7. In the **Communication System** field, select the Communication System created in the previous step: ![SAP S/4HANA Communication Arrangement with Communication System selected](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-05.png) 8. For outbound communication, select the previously-created user and configure the **Product Master - Replicate from SAP S/4HANA Cloud to Client** and include the following settings. Make sure to note the Path (`/sap/bc/srt/scs/sap/productmdmbulkreplicaterequest`) because we will use this path to configure the Mule application SOAP endpoint: - Set the **Service status** to **Active** - Replication Model (any name) - Replication model = `I (Initial)` - The Output Mode = `D (Direct)` ![SAP S/4HANA outbound service with Service Status set to Active](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-06.png) ![SAP S/4HANA outbound service Replication Model settings](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-07.png) ![SAP S/4HANA outbound service Output Mode settings](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-08.png) 9. Save it. All configurations at S/4HANA Cloud side are finished and you will be able to download the WSDL that contains the metadata to import into the S/4HANA Cloud SOAP Connector into the Mule application. ## Configurations in the Mule Application The following example describes how to create a Mule application using the Outbound Message Listener operation of MuleSoft’s SAP S/4HANA SOAP Connector: 1. Create a Mule project and add the appropriate connector from Exchange to the Mule Palette: ![Anypoint Studio Mule Palette with SAP S/4HANA SOAP Connector](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-09.png) 2. Add and configure the **Outbound Message Listener** to the canvas: ![Anypoint Studio Outbound Message Listener configuration](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-10.png) 3. Add the corresponding WSDL path to the WSDL you downloaded from S/4HANA Cloud and create the HTTP listener configuration: ![Anypoint Studio SAP S/4HANA SOAP Connector WSDL configuration](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-11.png) ![Anypoint Studio HTTP Listener configuration](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-12.png) _Note: we are using no authentication on the Mule Application, so we used the Insecure option for the Trust Store Configuration. In the Keystore configuration, we used a test Keystore, which is mandatory for HTTPS communication:_ ![Anypoint Studio TLS configuration with insecure trust store](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-13.png) 4. Select the Message type that the connector expects to receive from SAP (the connector reads the metadata from the WSDL we configured): ![Anypoint Studio SAP S/4HANA SOAP message type selection](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-14.png) 5. On the Responses tab, use the status Code "202" and the Reason-Phrase "Accepted" because we want to send the same status that S/4HANA Cloud will send if the service invocation results OK. No payload will be returned as a response - just the `Status` code and `Reason-phrase`: ![Anypoint Studio response configuration with HTTP status 202 Accepted](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-15.png) 6. Use a **Logger** component to log the inbound XML payload: ![Anypoint Studio Logger component configuration](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-16.png) _The Mule flow should look like the following:_ ![Anypoint Studio flow for receiving SAP S/4HANA product replication messages](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-17.png) 7. Deploy the application to Cloudhub. You’re now ready to test the scenario. ## Testing the Scenario To test the scenario: 1. Create the following. You only need to create a material in the corresponding Fiori app of S/4HANA Cloud: ![SAP S/4HANA material creation](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-18.png) ![SAP S/4HANA material data entry](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-19.png) ![SAP S/4HANA material configuration](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-20.png) ![SAP S/4HANA material save](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-21.png) _After you save the new material, you should see the following confirmation in S/4HANA Cloud:_ ![SAP S/4HANA confirmation that the material was saved](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-22.png) _The following shows the XML message received at the Mule application at the Runtime Manager on Cloudhub:_ ![Anypoint Runtime Manager log with the received product replication message](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-23.png) 2. See the sent message in the Message Dashboard Fiori Application: ![SAP S/4HANA Message Dashboard with sent product replication message](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-24.png) 3. Select the date: ![SAP S/4HANA Message Dashboard date selection](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-25.png) 4. Search under **CMD:Product Integration - /CMDPR → Product Replication to Client via Service - PRDREQ\_OUT/00001 namespace**: ![SAP S/4HANA Message Dashboard search for product replication messages](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-26.png) ![SAP S/4HANA product replication message details](/mulesoft/current/en-us/retail/latest/_images/retail-sap-s4hana-setup-guide-27.png) ## S/4HANA Customization Guide Create the following custom fields in the corresponding objects in Salesforce OMS to enable the customer, product, and orders sync use cases to function end-to-end.
Salesforce ObjectField NameData TypeLengthUniqueExternalId

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

### Configure SAP S/4HANA Order Management Follow the steps in these sections to configure your Salesforce OMS to ERP Integration. #### Configure the Communication Arrangement Use the settings in the table to configure the communication arrangements.
Communication Arrangement IDService NameProtocol

SAP_COM_0109

Sales Order (A2X)

OData V2

SAP_COM_0223

Outbound Delivery - Notify (B2B)

OData V2

SAP_COM_0905

Transportation Management - Freight Order Integration

OData V4

SAP_COM_0120

Billing Document - Create with SD Document Reference

SOAP

SAP_COM_0120

Billing Document - Read, Cancel, GetPDF

OData V2

#### Add the Required Entry for Outbound Delivery - Notify (B2B) Communication Arrangement Use the Fiori app Output Parameter Determination to add the following entry under the rule for **Outbound delivery** and **Determination Step Output Relevance**.
Output TypeGoods movement statusDocument CategoryPicking status

DELIVERY_NOTE

A

J

C

After configuring the communication arrangements, add the customer by using the rule `Outbound Delivery` and the Determination Step Channel.
Output TypeRecipientChannelRolee

DELIVERY_NOTE

<Customer Number>

EDI

WE

Next, add the customer in the **Business Partner** section of the communication system, which is used to configure this communication arrangement. #### Custom CDS View - **Name** YY1\_SDDocumentFlow - **Representative Key** SalesDocument - **Scenario** External API - **Data Sources**
Field nameTypeCardinalityJoin Condition

I_SalesDocument

Primary Datasource

N/A

N/A

I_SDDocumentMultiLevelProcFlow

Associated Datasource

Zero or More [0..*]

PrecedingDocument = SalesDocument

I_SDDocumentCategory

Associated Datasource

Zero or More [0..*]

SDDocumentCategory = SubsequentDocumentCategory

- **Elements**
AliasPathTypeKey

SalesDocument

I_SalesDocument.SalesDocument

CHAR (10)

Yes

PrecedingDocumentCategory

_I_SDDocumentMultiLevelProcFlo.PrecedingDocumentCategory

CHAR (4)

No

SubsequentDocument

_I_SDDocumentMultiLevelProcFlo.SubsequentDocument

CHAR (10)

No

SubsequentDocumentCategory

_I_SDDocumentMultiLevelProcFlo.SubsequentDocumentCategory

CHAR (10)

No

ProcessFlowLevel

_I_SDDocumentMultiLevelProcFlo.ProcessFlowLevel

NUMC(2)

No

CreationDate

_I_SDDocumentMultiLevelProcFlo.CreationDate

DATS (8)

No

CreationTime

_I_SDDocumentMultiLevelProcFlo.CreationTime

TIMS (6)

No

#### Create a Custom Communication Scenario You must create a custom communication scenario by adding the CDS view as an inbound service. Publish the communication scenario, and then create a communication arrangement using the custom communication scenario you just created. The communication arrangement includes the service URL that is used to retrieve the SD Document Flow.
SAP Field NameLabelData TypeLengthSAP Business Context

YY1_SME_Tracking_Nmb

Tracking Number

Text

20

Transportation Orders (TM_TRANSPORTATION_ORDER)

## See Also - [Prerequisites](https://docs.mulesoft.com/salesforce-oms/latest/prerequisites)