Create a Segmentation Rule Definition in Retail Execution

A rule definition is a Salesforce Object Query Language (SOQL) query defined as a string with variables specified in a specific syntax with bound attributes. To create a segmentation rule, create a segmentation rule definition. When creating a segmentation rule, enter a value for the variables defined in the rule definition.

Required Editions

Available in: Lightning Experience in Professional, Enterprise, and Unlimited Editions that have Consumer Goods Cloud enabled
User Permissions Needed
To create segmentation rule definition templates:

CGCloud Business Admin

OR

CGCloud Retail Business Admin

For example, write a query to select stores from certain states, where states is the variable. When you create a rule, you can enter Georgia as the parameter for the state variable. When the rule is run, a customer set is created with all the stores from the state of Georgia.

  1. From the App Launcher, find and select Segmentation Rule Definitions, and then click New.
  2. Provide these details:
    Field Description
    Identification
    Segmentation Rule Definition Name Name of the segmentation rule definition.
    State

    Current state of the segmentation rule definition. The options are:

    • Initial: The segmentation rule definition is created but isn't ready for use.
    • Released: The segmentation rule definition is ready for use.
    Use Account Hierarchy

    Indicates whether account hierarchy is used.

    Note
    Note You can either select this option or the Use Org Unit Hierarchy option.
    Use Org Unit Hierarchy

    Indicates whether org unit hierarchy is used.

    Note
    Note You can edit this field only if a segmentation rule definition is in the Initial state.
    Target Target (SOQL) from which data is read.
    Sales Org Sales org of the segmentation rule definition. You can edit this field only during creation.
    Description
    Description Description of the segmentation rule definition.
    SOQL
    Segmentation Query

    SOQL statement with bindings for segmentation rule definition columns.

    For each placeholder in a query, the system validates whether an attribute is defined by parsing the SOQL query and searching for placeholders of type $placeholder$. The system parses the SOQL and determines the FROM part of the query. By SOQL standard, the FROM part is always the source object, and the system validates whether the object is either Account or Account_Extension__c.

    Always enter a WHERE clause in the query.

  3. Save your changes.
    After the configuration is completed, set the state of the rule definition to Released.
    Note
    Note After you release a segmentation rule:
    • You can change the SOQL query of the rule definitions, but not its attributes.
    • You can’t add a segmentation rules definition column to a release segmentation rule.