Expressions

Expressions allow you to create your own indicators based on mathematical formulas or calculations for both clients and events and act as derived attributes. Expressions for events work as event attributes while expressions for customers work as customer attributes.

Business benefits

Expressions are a great tool for building loyalty programs and scoring structures. Expressions for attributes will perform perfectly well in this role. Thanks to this, you can award points and bonuses to your clients if they perform a specific action.


Expression dashboard

While working on the platform, you can add, edit and delete expressions. Below you will find a description of how to do it.

In order to set up a new metric, go to Analytics → Expressions.

Screenshot from the Synerise analytics module presenting the list of metrics

There you can see the list of all metrics divided into 4 columns where you can find basic information:

  1. Expression name.
  2. Created date.
  3. Updated date.
  4. Author.
  5. Menu - here you can edit, duplicate or delate expression.

To create your first new expression click the blue button Add new expression in the upper right side of the screen. There you can decide which type of expression you want to create.


Create a new expression

To create a new expression click the blue button add new in the upper right side of the screen and choose the name of your expression. You can also add the additional description.

Screenshot presenting the view of adding expressions in the analytics assets module in Synerise  

  1. Add the main name for the expression, which will be visible on the list of all expression and additional description to clarify the goal of creating this specific expression.

Event or attribute

Screenshot presenting the view of adding expressions in the analytics assets module in Synerise

  1. Then choose whether the expression should refer to the attribute or event. If you choose an expression for event, then you must indicate the specific event you want to refer to.

Event expression

Event that you use in an event expression will be enriched in the context of other types of analytics (e.g. metrics, segmentation, funnel, etc.). It means that if you create such an expression, you can use it later as a special parameter of an event in other types of analytics.

description

Tip: In the remaining types of analytics you can use event expressions as parameters only for those events you use in the event expressions.

Example

Metrics counts the number of purchased products by customers. To make this analysis deeper, the metrics will count how many liters of liquid products have been sold recently. In this example the number of purchased products is changeable, however, the product capacity is always the same and sourced from the product feed.

Steps

  1. Create an event expression, use the event Bought products. Define the event attributes: product quantity and product volume. Multiply those two attributes.

    Note: Remember that the name of the event expression will become also the name of the event parameter used in other types of analytics.

    description

  2. Create metrics, set Count as an aggregator, and All as an occurrence type. Then use the event Bought products and as a parameter choose expression and from the list choose the expression

    description


Define component

Screenshot presenting the view of adding expressions components

Now you can define the first component of your formula. You can choose from:

  1. Customer - Use a customer attribute to build an expression.
  2. Constant - Use a number or a string as an element of an expression.
  3. Dynamic key - Use a specific value of any attribute available in your business profile.
  4. Function - Use functions to define the kind of mathematical calculation you want to perform and the result format. Function takes the values from attributes and returns a value based on the input.

Customer

Screenshot presenting the view of adding expressions in the analytics assets module in Synerise

  1. Click the component you want to edit.
  2. When you select an attribute in the step 3, its name will display here. Optionally, you can change it, however, the change will not affect the attribute globally. The change concerns only the preview of the expression formula.
  3. Select an attribute from the available lists.

Constant

Screenshot presenting the view of adding expressions in the analytics assets module in Synerise

  1. Click the component you want to edit.
  2. Enter a number or a string in the field.

Dynamic key

Screenshot presenting the view of adding expressions in the analytics assets module in Synerise

  1. Click the component you want to edit.
  2. Enter the name of the dynamic key.
  3. Enter the value of the dynamic key.

Function

description

You can find the instruction on expression functions at the link.


Mathematical symbols

Screenshot presenting the view of adding expressions in the analytics assets module in Synerise

  1. Next, determine what mathematical symbols should appear between the various components of the formula (remember to keep the logical order and sequence of actions).
  2. You can duplicate or delete any formula component at any time.
  3. To add another formula component, click the plus symbol.

Previewing analysis

When you want to see the results of the expression, click the Preview analyze button.

Image presents the preview of the expression

Because an expression is the type of analytic that analyzes data in the context of a customer, you need to choose the attribute to identify customers (for example, a client ID) and enter the value of the identifier.


Show in client card

Screenshot presenting the view of adding aggregates in the analytics

In addition, you can decide whether the expression you set has to be displayed in the customer’s card. This means that this type of analytics will be visible in the context of this client, i.e. the result of the analysis will be calculated for that particular person on its card.


Saving the expression

When your expression is ready you can save it. Click the blue Save & Exit button on the upper-right side of the screen to save your expression.

😕

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.