Configuring filter definition 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.

  1. Make sure you create and publish a transaction table. See Creating or extending the resource.

    note note
    This procedure uses the example of a custom transaction table. For your case, adjust it to your business needs.
  2. Before defining a filter related to the transaction table in the Profiles resource, make sure you define the link to this table and publish your changes. See Defining links with other resources and Updating the database structure.

  3. In the Definition tab of your new filter’s definition screen, select the transaction table.

  4. 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.

  5. 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.

  6. Confirm your changes. This definition corresponds to a configurable field that the user must fill in later to execute the query.

  7. Combine this rule with another rule specifying that the transaction date must fall within a range corresponding to the last three months.

  8. Choose the category in which your filter will be displayed.

  9. 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.

  10. 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.

Once a filter is configured, you can use it from Campaign Standard APIs using this syntax:


For more on this, refer to the Campaign Standard APIs documentation.