Segmentation Rule Definition Examples
Here are a few examples of segmentation rule definitions.
Required Editions
| Available in: Lightning Experience in Professional, Enterprise, and Unlimited Editions that have Consumer Goods Cloud enabled |
Example Segmentation SOQL – IN List
SELECT cgcloud__Account__c FROM cgcloud__Account_Extension__c
WHERE cgcloud__Class_Of_Trade__c IN ($ClassOfTrade$)
This query creates a customer set depending on the user entry for the ClassOfTrade
variable.
To add a segmentation rule definition column for this segmentation rule, enter these values:
| Field | Value |
|---|---|
| Field Title | Class of Trade |
| Field Alias | ClassofTrade |
| Field Type | List |
| Field Picklist Target | cgcloud__Account_Extension__c and cgcloud__Class_Of_Trade__c |
Example Segmentation SOQL – Direct Select
SELECT cgcloud__account__c FROM c WHERE cgcloud__Class_Of_Trade__c
= $ClassOfTrade$ AND cgcloud__Priority__c = $Priority$
This query creates a customer set depending on the user entries for the ClassOfTrade
and Priority
variables.
To add a segmentation rule definition column for this segmentation rule, enter these values:
| Field | Value |
|---|---|
| Field Title | Class of Trade |
| Field Alias | ClassOfTrade |
| Field Type | Text |
| Field | Value |
|---|---|
| Field Title | Priority |
| Field Alias | Priority |
| Field Type | Text |
Example Segmentation SOQL – Picklist
SELECT cgcloud__account__c FROM cgcloud__account__c WHERE
cgcloud__Priority__c = $Priority$
This query creates a customer set depending on the value selected for the Priority
variable.
To add a segmentation rule definition column for this segmentation rule, enter these values:
| Field | Value |
|---|---|
| Field Title | Priority |
| Field Alias | Priority |
| Field Type | Picklist |
| Field Picklist Target | cgcloud__Account_Extension__c and cgcloud__Priority__c |

