Value types in analyses and filters

This article is a continuation of the Event and attribute operators article.

Once you define a logical operator in an analysis or a filter, you must define a value that will be used with the operator to check if the selected attribute or parameter meets the condition.

Filter in a segmentation
The screen presents a value in a condition in a segmentation

You can select the following value types:

How to change a value type
Changing value type

Value types

Array


If you want to analyze a parameter or an attribute in the filter or an analysis that is an array, you must use the Array operator. Then the field that appears next to the operator accepts the value of an array.

The area marked on the screen is a field that accepts elements of an array
The area marked on the screen is a field that accepts elements of an array
  • If the array contains different data types (numbers, objects, arrays) it must be converted into a string and analyzed as a string.
  • If you want to analyze occurrences of more than one string, you can do it in the following way:
    Analyze occurrences of strings in events
    Analyzing occurrences of two strings in an event

Example

The example below presents the condition in a metric that calculates the occurrences of an array that contains the potato, steak value in the products parameter in a groceries.bag event.

Analyze occurrences of strings in events
Analyzing occurrences of two strings in an event

Dynamic key


A dynamic key is a condition whose value can be changed when the analysis is requested.
You can use a dynamic key to create a dashboard entirely dedicated for the analysis of a given aspect, for example, an item, a customer, a campaign, a brand, a product model, and so on.

The marked area on the screen presents the dynamic key value selected in a metric condition
The marked area on the screen presents the dynamic key value selected in a metric condition

How to create a dynamic key?

While preparing any analysis (except for aggregates, expressions, and dashboards):

  1. Select the property to test (profile attribute or event parameter)

  2. After selecting the property, next to the operator, click the string icon icon until you get two fields: Dynamic key and Value.

    How to change a value type
    Changing value type
  3. In the Dynamic key field, enter the source of the value for the dynamic key. The property will be compared with this value.
    You can:

    • use predefined dynamic keys.
    • access event parameters in the following way: event.params.PARAMNAME
    • use any name for the key (no special characters, only letters and digits allowed). Such a key is only useful in dashboards, because dashboards allow you to enter a value manually.
  4. In the Value field, enter the default value.
    This value is used:

    • In Automation: if the parameter from the Dynamic key field doesn’t exist in the event/profile that is analyzed in the filter.
    • In Dashboards: As the initial value of the dynamic key.
      Important: Using a comma (,) in the value of a dynamic key splits the string. Such a value is treated as an array. Escaping the comma isn’t supported.
  5. Click Save.
    Results:
    You can use the dynamic key:

    • when you create a dashboard and add this analysis, the Dynamic key button appears on the editing panel. Then, you can specify the value of the dynamic key or use the default one.
    • in analytics such as profile filters in Automation.

Example 1

An example of a dynamic key in a Profile Filter node
An example of a dynamic key in a Profile Filter node

In the above example:

  1. A mobile application adds the newsletterTrigger parameter to events it sends. This parameter is the SKU of an item. This is a custom parameter invented for the purposes of this example
  2. The newsletterTrigger parameter changes periodically.
  3. A workflow is created to send a newsletter when a customer adds the required product to their cart.
  4. A “Profile Filter” node is added to the workflow. In this node:
    1. The product.addToCart event is analyzed.
    2. The value of the sku parameter is tested.
    3. The value to test against is a dynamic key:
      • The value is taken from the event’s newsletterTrigger parameter.
      • If the parameter doesn’t exist, the default value (NONE) is used.
  5. If the value of sku in the event is the same as the value of newsletterTrigger, the profile matches the filter.
    Further nodes in the workflow send the newsletter to matching profiles.

Example 2

The example below presents the condition of a metric that calculates the number of times a product was purchased. In this example, the id dynamic key is created and it will be compared with the values sent through the $sku parameter of the product.buy event. At this stage, the default value of the dynamic key is not important in this analysis, so it’s set to .. The result for this metric will be 0, but the metric will be added to the analytical dashboard (figure 10) in which the value of the dynamic key (the SKU of the item) will be defined and produce results.

The metric conditions
The metric condition

This metric is added to a dashboard. In the Dynamic key field, you can enter a SKU and the dashboard will show metrics result for events in which the $sku parameter was the same as the SKU you entered.

The dashboard that contains metrics
The dashboard that contains the metrics that use a dynamic key

Number


The numerical value is expected when you select the number operator and/or the event parameter or attribute is sent to Synerise in the form of a number.

The metric conditions
The marked area presents the numerical type selected

Example

The example below presents the condition of a metric that calculates the number of transactions above a specific value. In this example, the More than logical operator is used (the Number type operator) to narrow down the analysis to transactions where the monetary value was more than 100.
Currency is a separate parameter. This example shows events with $totalAmount over 100 regardless of the currency.

The metric conditions
The metric condition

String


This type of value allows you to enter a string of characters. It accepts special characters and spaces.

Filter in a segmentation
The screen presents a value in a condition in a segmentation

How to select a string value

After you select an operator, it’s the default parameter/attribute value.

Example

The screen below presents the condition of a metric: it calculates the first occurrences of the newsletter.open event (an event which is generated when a profile opens an email) in a mobile channel. The is that the source parameter of the event must include the string mobile.

Filter in a segmentation
The area marked on the screen presents a value in a condition in a segmentation

Synerise objects


As the value of the condition, you can select an element created in Synerise. Then, the value of this element will be treated as the value for the condition.

The marked area on the screen presents the parameter value selected in an aggregate condition
The marked area on the screen presents the parameter value selected in an aggregate condition

The range of Synerise objects which you can use as values depends on the property type you select. You can select the following property types (remember that property types can also be Synerise objects):

Event and event parameters as properties

If you select an event as a property, you can specify its occurrence with the objects from the left column and analyze it against objects from the right column:

Note: You can check the reference of the Synerise objects in filters.
You can test Against
Event parameters - Other event parameters
- Tags
- Profile attributes
- Segmentations
- Aggregates
- Expressions
- Specials (CLIENT_ID, TIMESTAMP)
Event expressions - Event parameters
- Tags
- Profile attributes
- Expressions
- Aggregates
- Segmentations
- Specials (CLIENT_ID, TIMESTAMP)
Event aggregates - Event parameters
- Tags
- Profile attributes
- Expressions
- Aggregates
- Segmentations
- Specials (CLIENT_ID, TIMESTAMP)
Specials (TIMESTAMP) - Event parameters
- Tags
- Profile attributes
- Expressions
- Aggregates
- Segmentations
- Specials (CLIENT_ID, TIMESTAMP)

Profile attributes as properties

When you select any profile attribute as a property (left column of the table), you can select its value in accordance with the values from the right column:

Note: You can check the reference of the Synerise objects in filters.
You can test Against
Tags n/a
Attributes - Tags
- Other attributes
- Expressions (attribute expressions, event expressions)
- Aggregates
- Segmentations
- Specials (CLIENT_ID)
Attribute expressions - Tags
- Attributes
- Attribute expressions
- Profile aggregates
- Segmentations
- Specials (CLIENT_ID)
Profile aggregates - Tags
- Attributes
- Profile aggregates
- Attribute expressions
- Segmentations
- Specials (CLIENT_ID)
Segmentations - Tags
- Attributes
- Profile aggregates
- Attribute expressions
- Other segmentations
- Specials (CLIENT_ID)
Specials (CLIENT_ID) - Tags
- Attributes
- Profile aggregates
- Attribute expressions
- Segmentations
- Specials (CLIENT_ID)

Synerise object reference

Name Description Value type Reference
Event parameters Event parameters are additional pieces of information about an activity the event describes. string, object, number, integer, boolean, array, You can find a list of parameters of a selected event in Data Management > Events
Tags It is a label assigned to a profile, it helps in organizing your profiles into group which facilitates targeting of actions toward them string, boolean You can find a list of profile tags in Data Management > Profile tags.
Attributes It is a feature of a profile which describes them, for example, first name, date of birth, marketing agreement status, and so on. string, number, boolean You can find a list of attributes in Data Management > Params Manager.
Segmentations It is a group of customers that share the same characteristics. string, boolean You can find a list of segmentations in Analytics > Segmentations.
Aggregates - Profile aggregates - You can summarize data set created on a basis of a selected event within a specified time range. This analysis includes profile context, allowing for displaying the result for individual profile.
- Event aggregates - They are summarized data sets created on a basis of a selected event within a specified time range which lack profile context.
string, number, array, boolean You can find a list of aggregates in Analytics > Aggregates.
Expressions - Attribute expressions - You can create your own indicators based on mathematical formulas or calculations for both profiles and events and use them as custom attributes.
- Event expressions - You can create custom event attributes which you can use further in filters and analyses.
Tip: To check whether an expression is an attribute or event expression, go to Analytics > Expressions, find the expression on the list and go into its details. If the Expression for option is set to Attribute, it’s an attribute expression. Otherwise, it’s an event expression.
string, boolean, array You can find a list of expressions in Analytics > Expressions.
Specials This group contains the timestamp parameter which contains the time of event occurrence string n/a

Example

The example below presents an aggregate that returns the list of last 100 IDs of transactions from the last 30 days which contain the products visited which were displayed in a defined recommendation campaign. The condition of the aggregate uses an aggregate that returns the SKUs of the clicked items within a particular recommendation campaign.

Note: This example is a part of the Calculating items purchased within a campaign use case.
  1. Create an aggregate that returns the last visited recommendations in the defined time range.
  2. Create a new aggregate:
    1. Set the size of returned results to 100.
    2. Select the Consider only unique occurrence of the event parameter.
    3. Select the Bought product event.
    4. As the event parameter, select $orderId.
    5. After the $orderId parameter, add $sku parameter that occurs in the results of the aggregate from step 1.
      Configuration of the aggregate
      The list of products clicked in the recommendation
😕

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