Create a Promotion
You create a rawPmdlTemplate promotion
by using the POST /ccadmin/v1/promotions endpoint
on the administration server.
![]()
This section applies to Open Storefront Framework
(OSF).
The following table describes the body of the endpoint request. See Sample promotions for examples of requests.
| Property | Description |
|---|---|
displayName (required)
|
A string that identifies the promotion. |
description |
A string that describes the promotion. This does not appear on your site. |
priceListGroups |
An array of strings that specifies the price groups this promotion applies to. For example: If you do not include |
enabled |
A Boolean that specifies whether this promotion
can be used with a qualifying order. The default value is true, but a promotion’s availability also depends
on any start and end dates you set. If enabled is
set to false, the promotion cannot be used
regardless of the start and end dates.
|
priority (required)
|
An integer that specifies the priority of the promotion. Promotions are applied in order of priority, with low priority numbers applied first. Oracle Retail Digital Commerce sorts the promotions by the value of this property. A promotion’s priority is evaluated against other promotions of the same type. For example, item discounts are evaluated only against other item discounts, not against order discounts. If an order qualifies for multiple promotion types, item discounts are applied first, followed by order discounts, then shipping discounts. Promotions that are of the same type and have the same priority have no guaranteed sequence, so the order in which they are evaluated is undefined. |
startDate |
A string that specifies the date and time the promotion becomes available, formatted in ISO-8601 format as follows:
For example:
|
endDate |
A string that specifies the date and time the promotion is no longer available, formatted in ISO-8601 format as follows:
For example:
|
templateName (required)
|
A string that specifies the name of the promotion
template to use. For a custom promotion created with raw PMDL,
the templateName value is rawPmdlTemplate.
|
templatePath (required)
|
A string that specifies the path to the promotion
template. Supported templatePath values are order, item, and shipping.
|
templateValues |
A string that specifies the template values
that are used as part of the promotion to control its behavior.
For rawPmdlTemplate promotions, the string
is the XML that describes the promotion. See Understand PMDL discount rules and Sample promotions for more information.
|
shippingMethods |
For shipping promotions, an array of strings that specifies which shipping methods can be used with the promotion. For example: |
If the promotion is created successfully, the response body returned includes the ID for the new promotion. For example:
{
"id": "promo20014",
"enabled": true,
"type": 9,
"displayName": "Spend $20 in Fan Favorites Get Order Discount"
}For information on creating custom promotions with an external promotion system, refer to the Use promotions from an external system.