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 4.16 Commitments. The Apply Commitments functionality finds and sets the matching conditions and applies the discounts from the matching Commitment Condition
A Commitment Condition matches if all criteria (Commitment Condition fields) match. If the Commitment Condition field is empty, it matches all Campaign Item values.
ADvendio__Media_Campaign__c: ADvendio__SelectedCommitment__c record
ADvendio__Ad_Price__c
(for advanced mode) ADvendio__from_Date__c
(for advanced mode) ADvendio__until_Date__c
ADvendio__Media_Campaign__r.ADvendio__Commitment__c,ADvendio__AgencyEarningCommitment__c,ADvendio__ThirdPartyCommitment__c or ADvendio__Media_Campaign__c
ADvendio__Ad_Price__c
Fields referenced by the Ad Price (Ad Spec, Ad Type, Placement, Site ...) are automatically queried if not set.
Fields set/Records created by ApplyCommitments method
Depending on the linked Commitments and the matching Commitment Condition the following fields will be written and related records will be created:
ADvendio version 2.140 and higher
ADvendio version 2.139 and below
Rebate in Kind
Quantity__c
Rate_Discount_4__c
Rate_Discount_4_Name__c
CommitmentRelevant__c
ConditionApplied__c
Quantity__c
Rate_Discount_4__c
Rate_Discount_4_Name__c
CommitmentRelevant__c
ConditionApplied__c
Special Discount
Rate_Discount_4__c
Rate_Discount_4_Name__c
ConditionApplied__c
ADvendio__AppliedCommitmentCondition__c
Rate_Discount_4__c
Rate_Discount_4_Name__c
SpecialDiscountCondition__c (deprecated)
SpecialDiscountCondition__r (deprecated)
ConditionApplied__c
Scaled Discount
Rate_Discount_4__c
Rate_Discount_4_Name__c
Rate_Discount_3_custom__c
Rate_Discount_2_custom__c
ConditionApplied__c
ADvendio__AppliedCommitmentCondition__c
Rate_Discount_4__c
Rate_Discount_3_custom__c
Rate_Discount_2_custom__c
SpecialDiscountCondition__c (deprecated)
Rate_Discount_4_Name__c
ScaledDiscountCondition__c (deprecated)
ScaledDiscountCondition__r (deprecated)
ConditionApplied__c
AgencyEarnings
ADvendio__AgencyEarnings__c
ADvendio__AppliedCommitmentCondition__c
ADvendio__AgencyEarnings__c
ADvendio__AgencyEarningsCondition__c (deprecated)
ADvendio__AgencyEarningsCondition__r (deprecated)
Third Party Discount
ThirdPartyCommissionCustom__c
ConditionApplied__c
ADvendio__AppliedCommitmentCondition__c
ThirdPartyCommissionCustom__c
TPCCondition__c (deprecated)
TPCCondition__r (deprecated)
ConditionApplied__c
Examples
Get a Session-ID
Get a Session ID
bash
Connected App
Get CLIENT_ID and CLIENT_SECRET from any connected app or create a new app in your org: App Manager -> New Connected App
Simple request
Simple Request (For Advanced Commitments Enabled and Advanced Commitments Not Enabled)
Simple request (Not Advanced Commitments): ADvendio version 2.139 and below
A simple request with a Commitment and Commitment Conditions matching the Campaign Item / Ad Price.