...
Numberedheadings | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
The Commitments API is implemented as Apex class and is exposed as REST web service by using Salesforce standard functionality (see Apex Developer Guide for more information). For general information about the dynamic pricing feature, see REST web serviceURLhttps://<my-domain-name>.my.salesforce.com/services/apexrest/ADvendio/ADvendio__Campaign_Item__c/ApplyCommitments/ Method
URL ParamsData ParamsA JSON object with the attribute campaignItems, containing a JSON serialized list of Campaign Items. Example: { "campaignItems":[{<Campaign Item>}, ...]} Success ResponseCode: 200 Content: A JSON serialized list of the Campaign Items from the request body, but now with updated discount and Commitment Condition fields. Example: [{<Campaign Item>}, ...] Error ResponseSee Salesforce Apex REST Documentation LogicMatching logicA Commitment Condition matches if all criteria (Commitment Condition fields) match. If the Commitment Condition field is empty, it matches all Campaign Item values.
Required fields
Fields referenced by the Ad Price (Ad Spec, Ad Type, Placement, Site ...) are automatically queried if not set. Fields set by ApplyCommitments methodDepending on the linked Commitments and the matching Commitment Condition the following fields will be written: Rebate in Kind:
Special Discount:
Scaled Discount:
AgencyEarnings:
Third Party Discount:
ExamplesGet a Session-IDGet a Session IDConnected AppGet CLIENT_ID and CLIENT_SECRET from any connected app or create a new app in your org: App Manager -> New Connected App Simple requestA simple request with a Commitment and Commitment Conditions matching the Campaign Item / Ad Price. Call Dynamic Pricing web servicerequestBody.txtResponseUsage in Apex |