User Exits for Consumer Goods Cloud Offline Mobile App
Customize how the pricing engine works using user exits. When calculating an order, the pricing engine uses the configuration defined in Consumer Goods Cloud for the User Exit fields: User Exit Base, User Exit Result, User Exit Constraints, and User Exit for Search Strategy.
Required Editions
| Available in: Lightning Experience in Performance, Enterprise, and Unlimited Editions that have Consumer Goods Cloud enabled |
Important Before you create or modify a user exit, enable the Author Apex
permission by going to the Administrative Permissions section of the relevant user
profiles.
- User Exit Base
- You can use User Exit Base to modify the base values of the fields that are used for
order calculation. For example, a discount rate of €0.50 per item is configured for the
first 100 items of a product. A customer places an order for 145 items of the product.
Based on the condition, the pricing engine calculates the difference: Ordered Quantity –
100 = 45, where 45 is the base value for order calculation. So a discount of 45 x 0.50 =
€22.50 is given to the customer.
Note User Exit Base is called before calculation. It can be used for adjusting the condition base, which has an impact on the calculation result. - User Exit Result
- Results of a calculation step are updated based on the configured User Exit Result. For
example, a condition type provides a discount of €0.50 per item up to a total of €50.00.
When the ordered quantity is 145, the calculated discount is 145 x 0.50 = €72.50. As
€72.50 is greater than €50.00, the penny perfect pricing engine restricts the final
discount given to the customer to the maximum allowed amount of €50.00.
Note User Exit Result is called after calculation. It can be used for adjusting or overwriting the calculation result, including all variables that are calculation-relevant. - User Exit Constraints
- Using User Exit Constraints, conditions are either applied or skipped for a calculation
step during order calculation. For example, a condition type provides a discount of 5% per
item. But this discount is applicable only if a customer buys more than 100 units. For an
ordered quantity of 145 units, the pricing engine checks the constraint (145 > 100),
applies the condition, and gives a discount of 5% to the customer.
Note User Exit Constraints is called before calculation. It can be used for skipping calculation steps. - User Exit for Search Strategy
- Using User Exit for Search Strategy, the condition for the search step is either skipped or applied. For example, if a product price range is maintained for a customer, then only those products whose prices fall within the defined bracket are shown in the product search results for that customer.
Starting Winter '25, you can customize the user exits using the business logic templates from the contractSnippets folder in Visual Studio Code based Modeler by using these template files. For details, see
Did this article solve your issue?
Let us know so we can improve!

