Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Promotion created via REST Api

edited Aug 21, 2020 11:44AM in Commerce 2 comments

Summary

A promotion is created via rest api using rawpmdl template.But the discount amount is not fetched during the creation.

Code Snippet

{
  "displayName":"Get 1255rs Off in Reseller Products",
  "description":"A sample item discount promotion",
  "priceListGroups":["defaultPriceGroup"],
  "enabled":true,
  "priority":"1",
  "startDate":"2020-07-10T00:00:00.000-05:00",
  "endDate":"2116-03-30T00:00:00.000-05:00",
  "templatePath": "item",
  "templateName": "rawPmdlTemplate",
  "templateValues":
  {"pmdl": {"xml": "<pricing-model><qualifier><quantifier name=\"at-least\" number=\"10\"><collection-name>items</collection-name><element-name>item</element-name><aggregator name= \"spendAmount\" operation=\"total\"/></quantifier></qualifier><offer><discount-structure calculator-type=\"standard\" discount-type=\"amountOff\" adjuster=\"1255\"></discount-structure></offer></pricing-model>"
  }
  }
}

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!