Configuring filter definition
In the Filter definition tab, you can create advanced filters that users can directly access when creating complex queries, such as when defining an audience.
This step is not mandatory as you will still be able to populate your resource and access its data through workflows, audiences and REST API.
These filters are used in the query editor in the form of pre-configured rules. They allow you to limit the number of steps necessary to get the desired configuration, which can be particularly beneficial for repetitive segmentations.
For example, you can create a filter enabling to select all transactions greater than a certain amount within the last three months.
To do this, you need to extend the Profiles resource and define a filter linking to a transaction table (that you have previously created) with a rule indicating that the transaction price must be greater than or equal to a given parameter and that the transaction date must fall within a range corresponding to the last three months.
- Make sure you create and publish a transaction table. See Creating or extending the resource .This procedure uses the example of a custom transaction table. For your case, adjust it to your business needs.
- In the Definition tab of your new filter's definition screen, select the transaction table.
- In the Add a rule - Profiles/Transactions window, drag and drop the transaction table into the workspace. In the next window that is displayed, select the field that you want to use.
- In the Optional parameter settings of the Add a rule - Transactions window, check the Switch to parameters box.In the Filter conditions , select the Greater than or equal to operator. In the Parameters field, enter a name and click the plus sign to create the new parameter.
- Confirm your changes. This definition corresponds to a configurable field that the user must fill in later to execute the query.
- Combine this rule with another rule specifying that the transaction date must fall within a range corresponding to the last three months.
- Choose the category in which your filter will be displayed.
- In the Parameters tab of the filter definition screen, modify the description and the label to clearly indicate the subject of your filter to the users. This information will appear in the query editor.If you define multiple configurable fields, you can modify the order in which they appear in the interface.
- Save your changes and publish the resources. For more on this, refer to the Updating the database structure section.
Once the Profiles resource extension is published, the users will see this filter under the shortcuts tab in the query editor interface.
This will allow the user to easily define their audience when creating an email to send to all of the clients that spent more than a certain amount over the last three months.
Rather than configuring it themselves, they simply have to enter the desired amount in the dialog box that appears.