Newer Version Available
CommercePromotions Class
Evaluate promotions for Commerce orders.
Namespace
CommercePromotions Methods
The following are methods for CommercePromotions. All methods are static.
evaluate(salesTransaction)
Determine which promotions the customer is eligible for based on the
store and buyer group, and compute the applicable price adjustments based on the coupons and
the items in the cart. This API evaluates only the first 50 active manual promotions and first
50 active automatic promotions, based on priority. If you want to enable promotions based on
shipping, contact Salesforce Customer Support.
API Version
57.0
Available to Guest Users
57.0
Requires Chatter
No
Signature
global static ConnectApi.PromotionEvaluation evaluate(ConnectApi.PromotionEvaluateInput salesTransaction)
Parameters
- salesTransaction
- Type: ConnectApi.PromotionEvaluateInput
- Find promotions that the customer is eligible for and compute their discounts.