Add a Promotion Phase Filter to the Link Tactics Page
Go over an example to help you add a promotion phase filter. Use the filter to see tactics for a particular phase of a promotion.
Required Editions
Available in: Lightning Experience Available in: Enterprise and Unlimited Editions where Consumer Goods Cloud is enabled |
| User Permissions Needed | |
|---|---|
| To add a picklist filter to the Link Tactic page: | CGCloud Business Admin |
-
Create a query parameter to specify the promotion phases that you want to view in the
filter.
- In Setup, find and select Custom Metadata Types.
- Locate the Query Definitions record and click Manage Records next to it.
- Click Filtered Tactic Selection Query.
- Under Query Parameters, click New.
- For Label, enter Allowed Promotion Phases.
- For Name, enter Allowed_Promotion_Phases.
- For the parameter type, select Static.
- Use the Query Definition lookup to associate the query parameter with the Filtered Tactic Selection query definition.
-
For the parameter order, enter 13.
Make sure that the parameter order is unique and follows the sequence of the other parameters, if any were added.
- Enter a default value for the parameter. For example, test.
-
For the parameter values, enter the API names of the phases that you want to show
in the filter. For example, Planning,
Committed, and ForApproval.
Enter each parameter value on a new line.
- Save your changes.
-
Modify the query definition to show promotion phase labels.
- In Setup, find and select Custom Metadata Types.
- Locate the Query Definitions record and click Manage Records next to it.
- Locate Promotion Phase Subquery from the list of records and click Edit next to it.
- For Field Columns, enter Phase__c and toLabel(Phase__c) on separate lines.
- For the Query Footer, enter GROUP BY Phase__c.
- Save your changes.
-
To add filtering logic for the promotion phases retrieved by the Promotion Phase
Subquery, create a query condition.
- In Setup, find and select Custom Metadata Types.
- Locate the Query Conditions record and click Manage Records next to it.
- To create a new query condition record, click New.
- For Label, enter Promotion Valid Phases.
- For Name, enter Promotion_Valid_Phases.
- Select Active.
- Use the Query Definition lookup to associate the query condition with the Promotion Phase Subquery query definition.
-
For Condition Text, enter
Phase__c IN ({13}) AND Sales_Org__c = {9}Here we retrieve only records where the Phase__c field matches the values specified in the 13th query parameter. This parameter is populated with API names of promotion phases Planning, Committed, and ForApproval. Also, only records associated with the sales organization where Sales_Org__c = 9 are retrieved. - Save your changes.
-
Configure the Query UI to link the query parameter, query condition, and query
definition to the user interface.
- In Setup, find and select Custom Metadata Types.
- Locate the Query UI record and click Manage Records next to it.
- Click Filtered Tactic Selection Query.
- Locate the Promotion Phase record and click Edit next to it.
- Use the Dynamic Data Source lookup and set it to Promotion Phase Subquery.
- Clear any existing value in Manual Data Source.
- Clear Use Manual Data Source.
- Save your changes.
See Also
Did this article solve your issue?
Let us know so we can improve!

