Operators in analyses and filters

Profiles and attributes

A profile represents an entity such as a person, organization, and so on. The summary of all data collected about a single profile is available in the Profiles module. In Synerise such actions as preparing most analyses, sending communication (email, text messages, web push notifications, mobile push notifications, and in-app messages), preparing promotions and recommendations, making predictions are profile-oriented.

An attribute describes a trait of a profile, for example, an email address, marketing agreements, size, age, favorite brand, results of aggregates and expressions, and so on.

Note: You can find more information about attributes here.

Events and event parameters

Events describe actions that occur within your website or mobile application, such as page views (available in a workspace as page.visit), clicks, and purchases. They are connected with profiles (for example customers) and they are generated as a result of implementing a tracking code into your website.
Events contain parameters, which are the details of the action they describe. Thanks to them, you can analyze events in terms of various aspects. For example, you can measure visits to a specific subpage within your website.

Note: You can learn more about events here and check the full Synerise event reference.

Operators

While creating an analysis or creating conditions for filters, you can base them on events, event parameters, and attributes. Operators allow you to describe a particular quality of an event parameter/attribute. Operators are grouped by the data type they are used with: string (string icon icon), number (number icon icon), boolean (boolean icon icon), array (array icon icon), and date (date icon icon).

List of operators
The marked area on the screen presents the list of available operators

The figure above is an example of grouping customers who visited a website that contained the shoe phrase in the URL. This is done by creating a segmentation based on a page.visit event and the uri event parameter, and then choosing the String-type Contain operator with the value shoe.

Where can I find operators?

Operators can be found across the whole Analytics module in which you create analyses based on events, their parameters and profile attributes. Additionally, you can find operators in various filters across the application, for example on the list of profiles, while defining audiences for messages and automations, where the operators are used in Profile filters.
You can also find operators while defining filters within item feed, such as defining the filters for items to be displayed in AI recommendations.

WARNING: When selecting an operator for an attribute or event parameter, pay attention to their data type. When an attribute or parameter is a string, use logical operators of the string type, if it is a number/digit, use logical operators of the number type, and so on.

Array


An array is an ordered collection of elements of the same or different type.

  • If you want to operate on a value that is already an array of strings, no additional action is required to analyze the value.
  • If the array contains different data types (numbers, objects, arrays) it must be converted into a string and analyzed as a string.

Converting arrays into strings

Click here to expand the instruction of converting an array into a string

  1. Go to Analytics > Expressions > New expression.
  2. Set the Expression for option to Event.
    Profile attributes can also be arrays. In such case, the Expression for option would be set to Attributes.
  3. From the Choose event dropdown list, select an event whose parameter contains an object.
  4. Create the following configuration of an expression:
    The configuration of the expression
    The configuration of the expression
  5. Click the Select node.
  6. From the dropdown list, select Event attribute.
    If it’s an attribute expression, select Profiles.
  7. Click the Unnamed node.
  8. On the bottom, click Choose parameter button.
  9. From the dropdown list, select event parameter which contains the array that you need to convert into a string.
    Only arrays of strings don’t need to be converted into strings before use in analytics.
  10. Save the expression.
    Result: You can select this expression as an event parameter which you can use in analyses and filters. In such case, you can use only the String operator type.
    If you created an attribute expression, it can be used as an attribute in analyses and filters.

The Array operator type contains the following logical operators:

  1. Equal and Not equal - Choose these options to check if the attribute or parameter value is/isn’t exactly the same as the value you enter.
  2. Contain and Not contain - Choose these options to either include or exclude values that contain a specific phrase, respectively.
  3. Starts with and Ends with - Choose these options if you want to either include values that start or end with a particular string of characters.
  4. Regular expression - Choose this option if you want to analyze values of an event parameter that match a regular expression.

Boolean


This operator type is used in analyses/filters to verify whether an attribute/event parameter/event exists, the value of an attribute is false or true (string or boolean) or null.

This operator type contains the following logical operators:

  1. Is true - Choose this operator to analyze event parameters and/or attributes whose value is true (string) or true boolean (attribute or parameter value sent to Synerise as a boolean value).
  2. Is false - Choose this operator to analyze event parameters and/or attributes whose value is false (string), false boolean (attribute or parameter value sent to Synerise as a boolean value), null, empty.

Date


This operator can be used only for event parameters and profile attributes whose value is a date/time string formatted according to ISO 8601.

While defining the condition for this operator type, you can select a date from a calendar. All the operators are meant to narrow the scope of dates considered in the general date filter of the analysis/filter.

WARNING: While creating an analysis/filter, if you select Custom/Date/Current date for an event parameter and define data in general date filter make sure dates are not mutually exclusive.

This type contains the following logical operators:

  1. Date - Choose this option to analyze an event parameter or an attribute in terms of a particular date (it can be a past date).

  2. Custom - Choose this option to select a date range for analysis of an event parameter or an attribute.

    Click here to see an example

    The screen below presents a segmentation that groups profiles in terms of their date of birth. The conditions of the segmentation uses the Custom logical operator to define the date range for the birth date attribute.

    The configuration of the segmentation with the Custom operator
    The configuration of the segmentation with the Custom operator

  3. Current date - This option lets you choose elements from the current date (the system takes into consideration the date of checking the result of the analysis).

    • Matches current hour - The system considers only the event occurrences that happened at the hour of the current date within the given date range. Assuming the current date is the 28th of February, 2023, 11.30 A.M., then while previewing the analysis of page visits in the last 30 days, the system will return results for the page visit events that occurred for 30 days backwards, every day between 11:00:00 and 11:59:59 from the current date (28th of February, 2023).
    • Matches current day - The system considers only the event occurrences that happened at the current day of the month. Assuming the current date is the 28th of February, 2023, then while previewing the analysis of page visits in the last 3 months, the system will return results for the page visit events that occurred on the 28th day of the month for 3 previous months.
    • Matches current month - The system considers only the event occurrences that happened in the current month. Assuming that February is the current month, then while previewing the analysis of page visits in the last 3 years, the system will return results for the page visit events that occurred only in February of the previous 3 years (including current year).
      Tip: You can check the usage of Matches current day and Matches current month operators in the Birthday email use case.
    • Matches current year - The system considers only the event occurrences that happened in the current year. Assuming that the current date is the 28th of February 2023, then while previewing the analysis of page visits in the 6 months, the system will return results for the page visit events that occurred from current date backwards until the 1st of January, 2023 00:00:00.

Number


This operator can be used only for event parameters or attributes whose values are expressed as numbers (including those sent as a string). For example, you can create a following condition: size more than 8 (analyze the size attribute whose value is higher than 8, which is 9, 10, and higher).

This type contains the following logical operators:

  1. Equal and Not equal - Choose these options to check if the attribute is or isn’t exactly the same as the value you enter.
  2. Less than and More than - Choose these options to analyze an event parameter or attribute whose value is lower or higher than the provided value (for example, for the following condition - the size attribute is More than 8, the results will contain entities whose size attribute is 8,01 or higher).
  3. Less or equal to - Choose this option if you want to analyze an event parameter or attribute whose value is lower than or equal to the provided value.
  4. More or equal to - Choose this option if you want to consider the elements which are equal or bigger than the number you provide.

Object


If you want to analyze an object in the event parameters, that object must be converted into a string and analyzed as a string.

String


This operator can be used with event parameters and attributes whose values is a piece of text. For example,favoriteBrand equals XYZ. This type contains the following logical operators:

  1. Equal and Not equal - Choose these options to check if the parameter/attribute value is or isn’t the same as the value you enter.
  2. Contain and Not contain - Choose these options to either include or exclude values that contain a specific phrase, respectively.
  3. Starts with and Ends with - Choose these options if you want to include values that start or end with a particular string of characters.
  4. Regular expression - Choose this option when you want to check if the value of an event parameter or attribute matches a regular expression.
  5. In and Not in - With these operators, you can check the string-type attribute or parameter against a comma-separated list of strings. The parameter/attribute value must be an exact match to one of the strings.
    Examples:
  • if the value of an attribute is shoes and the filter is In shoes, shirts, the attribute matches the filter.
  • if the value of an attribute is shi and the filter is In shoes, shirts, the attribute does NOT match the filter, because there is no exact match.
  • if the value of an attribute is t-shirts and the filter is In shoes, shirts, the attribute does NOT match the filter, because there is no exact match.
    Important:

    The list is ALWAYS split on a comma (,). Escape characters aren’t supported.
    Example:

    1. an event has an itemTags attribute with a string value: "garden,hobby"
    2. the filter is In garden,hobby

    Result:
    The filter is split on a comma, so itemTags is checked separately against garden and hobby. The attribute doesn’t match the filter, because garden,hobby isn’t an exact match for any of the strings after the list is split.

    If your attribute values contain commas, you can:

    • use the Equal/Not equal or Contain/Not contain operators to check against a single string.
    • use the Regular expression operator to check against multiple strings:
      For example, the regular expression (garden,hobby|sports,summer) matches two attribute values: "garden,hobby" and "sports,summer"

What’s next?


After you select an operator, you must define a value which you want to operate on.

😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker