In this article, a scenario is described, where a Salesforce account is synchronized in near-real time to SAP, an SAP customer is created and the customer mumber is written back to Salesforce.
The following tools are used in this scenario:
- SAP ECC system on Premise
- ECS Core for SAP Integration in cloud scenarios
- Nintex Workflow Cloud NWC as a workflow solution
ECS Core enables you to build powerful and sophisticated cloud applications for SAP on Premise. It allows you to integrate your cloud-based apps with SAP. For that ECS Core uses only outbound connections. It pulls the pending requests from the cloud, sends the query to the SAP system for execution and then sends the SAP result back onto the cloud service.
Step 1: Define the Connection to the SAP system
In ECS Core define the connection to your SAP ECC system. This connection will be used to create the SAP customer.
Step 2: Use ECS Core to provide REST Service to create SAP customers
The Web Service Designer for ECS Core is used to create a REST Service CreateSAPCustomer based on a default SAP function module to create customer master data. The REST service has different input parameters about the customers and returns the number of the created SAP customer.
Deploy the REST web service then it’s ready to be consumed in the cloud.
Step 3: Customize your Salesforce Account to provide related fields such as SAP Customer Number
In the Salesforce accounts you need to creat some new fields to store the SAP customer number and further details required to create the SAP customer, e.g. SAP Company Code or related sales data like sales organization.
Step 4: Use NWC to define a workflow to trigger Salesforce Account Changes
As a workflow solution, Nintex Workflow Cloud is used to trigger any account changes in Salesforce, where the account type is changed from prospect to customer and no related SAP customer exists. In this case the SAP customer will be created using the Salesforce account data. When the operation is successful, the Salesforce account is updated with the SAP customer number.
In your workflow, you can use further optional steps. In this sample a SharePoint Online list is used to log all synchronized Salesforce accounts to SAP. An additional step can be used to send notifications when a customer has been created.
Now let’s have a closer look and go through the process.
Let us change the account type to customer. The field SAP ID is empty at the beginning.
The workflow runs and creates the customer in SAP.
Check the customer in SAP.
Go to Salesforce and check that the SAP customer number is set.
Now check this video to see that in action: