Use the SAP S/4HANA Cloud Business Partner Records to Create Salesforce Customer Accounts

You can use the business partner (customer) records of SAP S/4HANA Cloud to create customer accounts in the Salesforce application. The business partner (customer) records updated in SAP S/4HANA Cloud are fetched and the business partner address details are used to create accounts in the Salesforce application. This implementation pattern provides an overview of the steps.

  1. Create a schedule integration.
  2. Create a schedule variable to store the last run time.
    $lastrun=""
  3. Drag an SAP S/4HANA Cloud Adapter into the canvas and configure it as follows to get all the business partner records available in the host URL configured in the SAP S/4HANA Cloud connection.
    1. On the Basic info page, provide an endpoint name.
    2. On the Operations page, select the Query action, API_BUSINESS_PARTNER module, A_BusinessPartnerType entity, and GetAll entities in the collections of A_BusinessPartnerType operation.
    3. On the Action page, select the Configure $expand query option. This allows to expand navigation properties in response check box.
    4. Select the required navigation property from the Configure expand parameters list (for this example, to_BusinessPartnerAddress, to_BusinessPartnerBank, to_BusinessPartnerContact, to_Customer, and so on are selected).
    5. On the Summary page, review your selections.
  4. Drag a for-each action into the canvas and assign results as the repeating element.
  5. Drag a switch action into the canvas to check whether or not the business partner (customer) record is null.
    customer=""

    When the business partner (customer) record is not null, an SAP S/4HANA Cloud Adapter is configured to get the business partner address. These business partner address details are used to create the customer accounts in Salesforce.

  6. Drag a second SAP S/4HANA Cloud Adapter into the canvas and configure it as follows.
    1. On the Basic info page, provide an endpoint name.
    2. On the Operations page, select the Query action, API_BUSINESS_PARTNER module, A_BusinessPartnerAddressType entity, and Get specific item from the collection A_BusinessPartnerAddressType operation.
    3. On the Action page, select the Configure $expand query option. This allows to expand navigation properties in response check box.
    4. Select the required navigation property from the Configure expand parameters list (for this example, to_AddressUsage, to_EmailAddress, to_FaxNumber, to_MobilePhoneNumer, to_PhoneNumer, and to_URLAddress are selected).
    5. On the Summary page, review your selections.
  7. Perform the required mapping.
  8. Drag a Salesforce Adapter into the canvas and configure it as follows:
    1. On the Basic Info page, provide a name.
    2. On the Action page, select Create, Update Or Delete Information.
    3. On the Operations page, select the Create operation, Account business object, and Use Default Header check box.
    4. On the Summary page, review your selections.
  9. In the mapper, map Account Number to Customer, Billing City to City Name, Billing Zip/Postal Code to Postal Code, and Account Name to Business Partner Name.
  10. When complete, save and activate the integration.