You create a rawPmdlTemplate promotion by using the POST /ccadmin/v1/promotions endpoint on the administration server. See Sample promotions for examples of requests.

The following table describes the body of the request:

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:

"priceListGroups": [
    "defaultPriceGroup",
    "CanadianDollar"
  ]

If you do not include priceListGroups in the request, the promotion applies to all price groups. See Manage Promotions in Using Oracle Commerce Cloud for more information.

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 Commerce Cloud 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:

YYYY-MM-DD T LOCALTIME OFFSET

For example:

"startDate":"2016-03-10T00:00:00.000-05:00"

endDate

A string that specifies the date and time the promotion is no longer available, formatted in ISO-8601 format as follows:

YYYY-MM-DD T LOCALTIME OFFSET

For example:

"endDate":"2116-03-30T00:00:00.000-05:00"

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:

"shippingMethods": [
    "priorityShippingMethod",
    "groundShippingMethod"
  ]

cardIINRanges

A numeric range that indicates an international Issuer Identification Number (IIN) for credit cards. The number consists of the first six digits of a credit card, identifying the type of card used. By setting this range, you can present and apply promotions based on payment type to customers. You can use wildcards in this numeric property. Note that IIN ranges are not applicable when working with CyberSource and PayPal payment gateways.

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"
}

Copyright © 1997, 2017 Oracle and/or its affiliates. All rights reserved. Legal Notices