Creating event parameters out of event expressions

Published November 23, 2023
Modules
Difficulty

In the realm of marketing automation, Synerise stands out as a platform that empowers users with advanced capabilities, allowing for dynamic and efficient campaign management. One notable feature that enhances the flexibility of Synerise is its support for multi-parameter expressions. This functionality becomes particularly valuable in scenarios where obtaining multiple pieces of information from a single aggregate operation is crucial.

Consider a use case in which a marketing campaign revolves around a price drop strategy. The challenge in this use case is combining both the SKU (Stock Keeping Unit) and corresponding price from a page.visit event within a single analysis in Synerise. Synerise aggregates let you produce results concerning one particular parameter at a time. This means that obtaining a combination of SKU and price information would require creating two separate aggregates - one for SKU and another for price. However, using expressions enables you to analyze more than one parameter of a selected event. You can then use the result of this expression as a special parameter of that event in other types of analyses. This approach simplifies the implementation of a price drop strategy.

In this use case, we will create an event expression that combines SKU of a product and its price into one string from a page visit event. Later on, we will create an aggregate that returns SKUs and prices of 10 last visited products and the aggregate will reuse the event expression created in the first part of the process.

Prerequisites


Process


In this use case, you will go through the following steps:

  1. Prepare an expression that retrieves the values of product:retailer_part_no and product:price parameters from a page visit event and joins them by separating it with semicolon (;).
  2. Prepare an aggregate that returns SKUs of 10 last visited items with their prices.

Prepare an expression


In this part of the process, create an expression that will retrieve values of the SKU (Stock Keeping Unit) and the corresponding price from a page.visit event and join them in one string which is separated by semicolon (;).

  1. Go to Analytics > Expressions > New expression.
  2. Enter a meaningful name of the expression.
  3. Set the Expression for option to Event.
  4. From the Choose event dropdown list, select page.visit event.
  5. In the Formula definition section of the page, click Select.
    Result: A dropdown list appears.
  6. From the dropdown list, select Function, and form the list select Concat. This function joins two or more strings together and returns the joint string as the result.
  7. Click the first Select element that appeared. From the dropdown list, select Function, and form the list select Concat.
  8. Click the left Select element. From the dropdown list, select Event attribute.
  9. Open the settings of the event attribute by clicking the unnamed expression element that appeared.
  10. From the Choose parameter dropdown, select product:retailer_part_no.
  11. Click the middle Select element, from the dropdown list select Constant and set its value to ;.
  12. Click the right Select element, and from the dropdown list, select Event attribute.
  13. Open the settings of the event attribute by clicking the unnamed expression element that appeared.
  14. From the Choose parameter dropdown, select product:price.
  15. From the Choose parameter dropdown, select product:price.
    The view of the configuration of the expression
    Configuration of the expression
    .
  16. Save the expression.

Prepare an aggregate


In this part of the process, create an aggregate that returns SKUs and prices of 10 last visited items. In this aggregate, the expression from the previous part of the process will be used.

  1. Go to Analytics iconAnalytics > Aggregates > New aggregate.
  2. Enter the name of the aggregate.
  3. As the type of the aggregate, select Last Multi and as the size, set 10.
  4. Click Choose event and from the dropdown list, select page.visit.
  5. From the Choose parameter dropdown list, select the expression created in the previous step.
  6. Click + where.
  7. From the Choose parameter dropdown list, select product:retailer_part_no
  8. From the Choose operator dropdown list, as the value, select Is true (Boolean).
  9. Set the analyzed period to Lifetime.
    Configuration of the aggregate
    Configuration of the aggregate
  10. Click Save.
    Result:
Configuration of the aggregate
Configuration of the aggregate

What’s next


As a next step, you can use this solution in many use cases in which you can simplify multiple operations by creating an event expression and use it in the parts of the process where it is necessary. This will make the process of gathering data easier. A one example in which you can use this solution to make it easier might be price drop.

Check the use case set up on the Synerise Demo workspace


Check the prepared expression and aggregate directly in the Synerise Demo workspace.

If you don’t have access to the Synerise Demo workspace, please leave your contact details in this form, and our representative will contact you shortly.

Read more


😕

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