...
Note |
---|
In order to use the Dynamic Pricing API, your Salesforce Org needs to have API usage activated through having an API usage License. |
Note | ||
---|---|---|
| ||
Please make sure to add the relevant fields also to the Campaign Item you provide to the API method if you are using the Custom Matching Criteria as described here 8.4.6 Setup Price Rules/Dynamic Pricing (Feature Setting). Our logic will not query these fields by itself so missing this data might lead to not matching Price Rules. |
Numberedheadings | ||
---|---|---|
| ||
The Dynamic Pricing 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/ApplyPriceRules/ Method
URL Params
Data ParamsA JSON object with the attribute campaignItems, what contains 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 surcharge and discount fields. Example: [{<Campaign Item>}, ...] Error ResponseSee Salesforce Apex REST Documentation LogicExamplesGet a Session-IDGet 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 Price Rule, having all criteria fields empty (so it matches every Campaign Item) and setting surcharge B2 to 20%. Complex requestA more complex example to match the following Price Rule (additionally to more simple ones) Usage in Apex |
...