---
schema_version: "1"
id: 516e21434adff9dd73c1e27106e891ca08436386733e5961e9c85ad7f8aed4a6
title: User Exits for Consumer Goods Cloud Offline Mobile App
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/cg_concept_user_user_exits.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.cg_concept_user_user_exits.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: a15705177c07afa57a31a9428200e5fc13be26681d56ef5f4ab7b85a993c6c38
description: "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."
products:
  - Consumer Goods
release: "264"
---
# 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

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience in <strong>Performance</strong>, <strong>Enterprise</strong>, and <strong>Unlimited</strong> Editions that have Consumer Goods Cloud enabled</td></tr></tbody></table>

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-consumer_goods_retail_admin-264-0-0-production-enus/5bb7d7f5-119d-42d0-8596-95e762837019/images/icon_important.png)

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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-consumer_goods_retail_admin-264-0-0-production-enus/5bb7d7f5-119d-42d0-8596-95e762837019/images/icon_note.png)

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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-consumer_goods_retail_admin-264-0-0-production-enus/5bb7d7f5-119d-42d0-8596-95e762837019/images/icon_note.png)

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](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-consumer_goods_retail_admin-264-0-0-production-enus/5bb7d7f5-119d-42d0-8596-95e762837019/images/icon_note.png)

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