Skip to Content

Create a Personalized Sourcing Strategy with SAP Customer Order Sourcing

0 %
Create a Personalized Sourcing Strategy with SAP Customer Order Sourcing

Create a Personalized Sourcing Strategy with SAP Customer Order Sourcing

July 15, 2020
Created by
February 20, 2020
Use SAP Customer Order Sourcing to reduce delivery costs by applying an efficient sourcing strategy.

You will learn

  • How to use the SAP Customer Order Sourcing trial
  • How to upload master data using the API Business Hub
  • How to create a sourcing strategy
  • How to create a sourcing request to test your sourcing strategy
QR code


  • You have registered for a trial account on SAP Cloud Platform.
  • You should be familiar with the SAP Cloud Platform trial landscape (see Get Started with SAP Cloud Platform Trial).
  • You have a subaccount in the Cloud Foundry environment, with Amazon Web Services (AWS) as provider and the Europe (Frankfurt) region.

If you’re interested in the demo data included in every SAP Customer Order Sourcing trial system, you can learn more here.

Step 1: Get to know the business scenario

You are the owner of an e-commerce business or a web shop in the fashion industry with the following characteristics:

  • Sources: You own several stores and distribution centers in Germany.

  • Products: You only have one product available (black_sports_shoe).

  • Business Goal: As a business owner, you want to reduce delivery cost of each order and therefore decide for the following sourcing strategy:

    • The products in the shopping cart should be delivered from the source with the shortest distance to the customer.
Log on to answer question
Step 2: Set up SAP Customer Order Sourcing via Booster
  1. Log on to the SAP Cloud Platform trial cockpit and open your global account for the Cloud Foundry environment.

  2. In the navigation pane of the SAP Cloud Platform cockpit, choose Boosters.

  3. Choose the booster Prepare an Account for SAP Customer Order Sourcing.

  4. Choose Start.

The configuration and set-up of your new SAP Customer Order Sourcing trial system starts and finishes automatically.

You want to learn how to setup SAP Customer Order Sourcing yourself? This tutorial can help: Set Up SAP Customer Order Sourcing Manually.

Log on to answer question
Step 3: Create a new environment

Having created a service instance and the corresponding credentials, you can now upload master data into SAP Customer Order Sourcing. You do this via a REST API.

  1. Open a new browser window, navigate to SAP Customer Order Sourcing on SAP API Business Hub, and login with your email address.

  2. Choose Configure Environments and then click Create New Environment.

  3. As your starting URL choose

  4. Enter a name for your environment, for example trial_test.

  5. In your SAP Cloud Platform trial Subaccount open Spaces and your already existing space, probably called dev.

  6. In the navigation pane, open Services > Service Marketplace.

  7. Search for SAP Customer Order Souring and click on the tile.

  8. In the navigation pane, open Instances and open the already existing instance, probably called default_customer-order-sourcing-trial.

  9. From your instance copy the following fields to your new environment in the API Business Hub:

    • clientid
    • clientsecret (called just Secret in environment)
    • identityzone
  10. Scroll down and choose the Save this environment for future sessions radio button.

  11. Click Save.

Configure Environments
Log on to answer question
Step 4: Upload master data

You upload master data from the API Business Hub. Since there are already sources included in the trial, you only need to add availability raw data:

  1. Select the newly created environment.

  2. On the left side choose Availability Raw Data.

    API Hub
  3. Open POST/availabilityRawData and choose try out.

  4. Copy the following availability raw data and paste it into the body:

    [{  "productId": "black_sports_shoe",
        "unit": "C62",
        "calculatedAt": "2020-01-01T21:54:30Z",
        "items": [ { "availableFrom": "2020-01-01T00:00:00Z","quantity": 5 } ],
        "source": { "sourceId": "Hamburg", "sourceType": "STORE" }
    {   "productId": "black_sports_shoe",
        "unit": "C62",
        "calculatedAt": "2019-09-24T21:54:30Z",
        "items": [ { "availableFrom": "2020-01-01T00:00:00Z", "quantity": 13 } ],
        "source": { "sourceId": "Munich", "sourceType": "DC" }
    {  "productId": "black_sports_shoe",
        "unit": "C62",
        "calculatedAt": "2020-01-01T21:54:30Z",
        "items": [ { "availableFrom": "2020-01-01T00:00:00Z","quantity": 1 } ],
        "source": { "sourceId": "Berlin", "sourceType": "DC" }
    {  "productId": "black_sports_shoe",
        "unit": "C62",
        "calculatedAt": "2020-01-01T21:54:30Z",
        "items": [ { "availableFrom": "2020-01-01T00:00:00Z","quantity": 1 } ],
        "source": { "sourceId": "Frankfurt", "sourceType": "DC" }
  5. Click Execute.

  6. Make sure you get the HTTP response 201.

Log on to answer question
Step 5: Model your sourcing strategy

Those were a lot of steps already and you didn’t get the chance to do anything with SAP Customer Order Sourcing yet.

But don’t worry – just one more step and then you can play around with it.

  1. Go back to your Subaccount and navigate to Subscriptions on the SAP Cloud Platform trial landscape.

  2. In the SAP Customer Order Service Overview page, choose Go to Application and login.

  3. Open the Strategy Builder app and create a new strategy. As Strategy ID use Test. This is important for the Sourcing to work properly.

  4. Open your newly created strategy.

  5. Under Objectives, drag and drop the objective Products from Several Sources onto the canvas for modeling your strategy, under the shopping cart.

  6. Drag and drop the source Hamburg (Store) and the Source List DCs in Germany into the first box.
    The order of the sources determines their priority within the sourcing. That means the source with the highest priority is the store in Hamburg. Depending on rules or filters this prioritization can change.

  7. Drag and drop the rule Shortest Distance to Destination into the second box.

  8. Save your strategy.

Strategy Builder
Log on to answer question
Step 6: Test your strategy

Scenario: A customer located in a suburb of Munich orders a black_sports_shoe.

Desired Sourcing Result: black_sports_shoe should be sourced from Munich since it is the shortest destination to the customer.

Let’s check if this is the case:

  1. Open SAP Customer Order Sourcing on SAP API Business Hub in a new window.

  2. Select the environment you created earlier.

  3. On the left-hand side, choose Sourcing.

  4. In POST/sourcing choose Try out.

  5. Post the following sourcing request:

      "strategyId": "Test",
      "items": [ { "productId": "black_sports_shoe", "quantity": 1 } ],
      "destinationCoordinates": { "latitude": 48.1500,"longitude": 11.5736 }

    This is the response you should get:

    Sourcing Result
Which sourcing result did you get?

Additional Information

Next Steps

Back to top