---
schema_version: "1"
id: 41bfe342b0e3c95304563a1b5f19434ae1452beb28464e20946eadb6b05886db
title: Segmentation Rule Definition Examples
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/cg_ref_admin_segmentation_example.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.cg_ref_admin_segmentation_example.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 8711e08623d49c650f7d3e17138962b96d4dac59823fa40cdbae878a03feb428
description: Review these examples of segmentation rule definitions.
products:
  - Consumer Goods
release: "264"
---
# Segmentation Rule Definition Examples

Review these examples of segmentation rule definitions.

### 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>Professional</strong>, <strong>Enterprise</strong>, and <strong>Unlimited</strong> Editions that have Consumer Goods Cloud enabled</td></tr></tbody></table>

## 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:

For the ClassOfTrade variable  
| Field | Value |
| --- | --- |
| Field Title | Class of Trade |
| Field Alias | ClassOfTrade |
| Field Type | Text |

For the Priority variable  
| 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 |