Create a Single-Code Coupon with SAP Omnichannel Promotion Pricing
Learn how to create a single-code coupon using the Coupon Management service of SAP Omnichannel Promotion Pricing.
Overview
You will learn
- How to use the SAP Omnichannel Promotion Pricing services on SAP BTP trial
- How to create a single-code coupon with the Coupon Management service
Prerequisites
Prerequisites
- You have registered for a trial account on SAP BTP in the Singapore - Azure region.
- You should be familiar with the SAP BTP trial landscape and terminology (see Take a Tour of SAP BTP Trial).
- You have a subaccount in the Cloud Foundry environment, with Microsoft Azure as provider and the Singapore region (AP21).
- You have set up SAP Omnichannel Promotion Pricing as described in Set Up SAP Omnichannel Promotion Pricing.
- You have set up your trial environments for the Coupon Management service, Data Upload service, Data Access service, and Calculation service as described in step 2 in Apply a Simple Promotion with SAP Omnichannel Promotion Pricing.
Steps
Get to know the business scenario
- Business goal: You are a promotion planner. You are launching a promotional campaign for your customers to celebrate your companyβs 25th anniversary. As part of the promotional campaign, you want to offer the single-code coupon
ANNIVERSARY25to your customers. The coupon is valid from January 1, 2026 to December 31, 2026. - You distribute the couponβ―
ANNIVERSARY25to your target customers. - You create a promotion: Show coupon ANNIVERSARY25 and get 25% off.
- Because of the great collaboration between your company and SAP in the last years, you want to include SAP in your promotional campaign to celebrate together. So, you create another promotion: Buy one or more products of brand SAP and spend more than EUR 100 to get 10% off. For this promotion, you enable promotion recommendations.
- Both promotions are valid in your web shop (business unit:
ONLINE) from January 1, 2026 to December 31, 2026. - A few days after your promotional campaign launched, a customer that received the couponβ―
ANNIVERSARY25β―browses through your web shop. Your customer selects a hoodie of brand SAP. Theβ―regular sales priceβ―for the hoodie is EUR 80. The customer enters the couponβ―ANNIVERSARY25β―when checking out and gets 25% off. - Since the shopping cart value is just under EUR 100, a promotion recommendation is displayed to the customer saying that if they add another product of brand SAP so that the shopping cart value is over EUR 100, they get an additional 10% off.
- To think about this, the customer takes a short coffee break and afterwards browses through the web shop again. Since this took a few minutes, the coupon reservation needed to be extended.
- The customer adds another hoodie of brand SAP to the shopping cart. Since the shopping cart value is now over EUR 100, they get an additional 10% discount. They proceed to check out and finalize the payment of EUR 108. The coupon code is redeemed in the background.
At first, you create a single-code coupon object with the Coupon Management service.
Navigate to the Coupon Management service of SAP Omnichannel Promotion Pricing on the SAP Business Accelerator Hub. Log on with the same information that you use for your SAP BTP trial account.

- Navigate to the Try Out section.
- On the right-hand side, select the trial environment you have created for the Coupon Management service.
- On the left-hand side, choose Coupon.
- Open the POST request
/Coupon. - Copy the following raw data and paste it into the body:
{
"status": "INACTIVE",
"displayID": "ANNIVERSARY25",
"type": "SINGLECODE",
"name": "ANNIVERSARY25",
"validFrom": "2026-01-01",
"validTo": "2026-12-31",
"couponCodeValidityPeriodInDays": 365,
"maxRedemptionCountPerCouponCode": 100000
}- Choose Run.
- Make sure you get the HTTP response 201.
- From the response, note down the technical coupon ID (
ID) as you will need it later.
The response should look like this:

With this, you have created a single-code coupon object with the nameβ―ANNIVERSARY25 and a validity period from January 1, 2026 to December 31, 2026. The coupon can be redeemed 100,000 times.
Optional: If you want to check whether you have successfully created the single-code coupon ANNIVERSARY25, you can proceed with the following steps:

- On the left-hand side, choose Coupon.
- Open the GET request
/Coupon. - Choose Run.
- Make sure you get the HTTP response 200.
- In the response body, you should see the coupon that you have created.
When creating the coupon, you set the status of the coupon object to inactive. Now, change theβ―statusβ―of the coupon object to active.

- On the left-hand side, choose Coupon.
- Open the PATCH request
/Coupon({ID}). - Choose Parameters.
- For ID, enter the technical coupon ID (
ID) from the coupon object you have just created. - Copy the following raw data and paste it into the body.
{
"status": "ACTIVE"
}- Choose Run.
- Make sure you get the HTTP response 200.

You have now successfully changed the status of the coupon object.
Now that you have created the coupon object and set it to active, you create the coupon code to be used in your promotional campaign.

- On the left-hand side, choose Coupon.
- Open the POST request
/Coupon({ID})/CouponManagementService.createCouponCode. - Choose Parameters.
- For ID, enter the technical coupon ID (
ID) from the coupon object you have just created. - Copy the following data and paste it into the body:
{
"codeValue": "ANNIVERSARY25"
}- Choose Run.
- Make sure you get the HTTP response 200.

With this, you have created the coupon code ANNIVERSARY25. Your marketing system can now read the coupon information from the Coupon Management service and drive your promotional campaign, for example by distributing the coupon code to your target customers.
You can now continue with the next tutorial Use the SAP Omnichannel Promotion Pricing Apps for Maintaining Promotions and Generic Attributes where you will use the SAP Omnichannel Promotion Pricing apps to make configurations, to maintain a generic attribute, and to upload promotions. You then associate the single-code coupon with a promotion.
Resources
Discussion
Share feedback on this tutorial or join the conversation in SAP Community.