Dynamic SMS campaign with promotion at customer's preferred stationary store

Published September 13, 2023
Modules
Difficulty
Powered by
they logo

You can use SMS channel to effectively inform your customers about upcoming or ongoing promotions both in online or brick-and-mortar stores. The key to the success of these campaigns is personalization.

Imagine you have a large customer base and you want to notify them about an exciting promotion in specific stores. Instead of creating multiple campaigns for each store, you can achieve this with just one campaign using Synerise. With Jinjava, you can effortlessly customize your message content. You can dynamically change store names, locations, and other crucial details with a simple Jinjava code. This means less work for you and more personalized experience for your customers.

Dynamic SMS campaign

This use case describes a scenario that begins by explaining how to assign IDS of customers’ top-choice stores as attributes to their profiles. The further part of the process outlines how to create a dynamic SMS campaign targeting customers from the selected stores.

Additional assumptions used in this use case:

  • The promotion is created on the client side,
  • The created catalog contains only those stores where the promotion is implemented,
  • Information about the current promotion is sent to users who have assigned a store ID to their profile.

Prerequisites


  • Permissions that allow access to Catalogs section and adding new catalogs.
  • Prepare a CSV file with the stores where the promotion you are creating a campaign for will be available. The file used in this use case contains the following columns: StoreId, StoreName, Street, City.
Example file

Sample file
Sample file

  • Implement the transaction events using SDK or API. Implement a custom parameter to the event that refers to the store where the transaction occurred. In this case, we will use the StoreId parameter.
  • Meet all requirements listed in the introduction to SMS.
  • Promotion must be implemented on the client side.

Process


  1. Create an aggregate that identifies the top store for customers based on their transactions.
  2. Create a workflow that assigns a store ID to customer profile.
  3. Create a catalog with the store details.
  4. Prepare an SMS message template.
  5. Create a workflow for the SMS campaign.

Create an aggregate


Create an aggregate to find the top store for customer based on transaction history.

  1. Go to Analytics iconAnalytics > Aggregates > New aggregate.
  2. Enter the name of the aggregate.
  3. As the type of the aggregate, select Top.
  4. From the Choose event dropdown list, select the transaction.charge event.
  5. As the event parameter, select StoreId.
  6. Using the date picker in the lower-right corner, set the time range to Lifetime. Confirm your choice with the Apply button.
  7. Click Save.
Final configuration of the aggregate
Final configuration of the aggregate

Create a workflow that assigns a store ID to customer profile


Create a workflow that assigns a StoreId attribute to customers who do not have this attribute yet and update it for the customers who have switched to another store over time.

  1. Go to Automation icon Automation > Workflows > New workflow.
  2. Enter the name of the workflow.

Define the trigger node


  1. Add the Profile Event node.
  2. From the Choose event dropdown list, select the transaction.charge event.
  3. Click Apply.

Define the Update Profile node


In this part of the process, you will add an attribute StoreId to the customers who do not have this attribute yet and update it for the customers who have switched to another store over time.

  1. Add the Update Profile node.
  2. From the left dropdown list, select Attributes > StoreId.
  3. From the right dropdown list, select Change.
  4. In the text field, add a Jinjava with the ID of the aggregate created earlier. This Jinjava will return the top StoreId for the individual customer.
    Jinjava used in the use case:
    {% aggregate 6b686d01-758f-328a-859b-91e3542c5bbe %} {{ aggregate_result[0] }} {% endaggregate %} 
    Note: The above Jinjava contains the ID of the aggregate created in this use case. Make sure to replace this ID with the ID of your aggregate.
  5. Click Apply.

Add the final node


  1. Add the End node.
  2. Save and activate the automation by clicking Save&Run.
Final configuration of the workflow
Final configuration of the workflow

Create a catalog


In this part of the process, create a catalog and import there your CSV file you prepared as a part of prerequisites.

  1. Go to Data Management > Catalogs > New Catalog.
  2. Enter the name of the catalog and confirm it by clicking Apply.
    Important: Don’t use diacritical letters, underscores (_), and spaces.
  3. Click the catalog on the list and click Import Local File.
    Warning for MacOS users
    If you prepared a CSV file in Excel, open it in a text editor to check whether commas are used as separators. If not, replace them with commas.
  4. Click the Upload a new file button and select the file to be uploaded, then click the Next button.
  5. You will see the information that your file has been successfully uploaded. To continue the import process, click the Next button.
  6. In the Primary key field, type the name of the column whose values are treated as the key. In this case, it will be StoreId. To continue the process, click the Next button .
    Catalog primary key configuration
    Catalog primary key configuration
  7. In the next screen you will find the summary of your import. If no changes are needed, click Run import button.
    Import success
    Import success

Prepare an SMS message template


Create a dynamic SMS template using Jinjava that customizes the store details for each customer.

  1. Go to Communication > SMS.
  2. In the menu on the left, click Templates.
  3. Click Create new.
  4. Click Text editor. The text editor and SMS preview open.
  5. In the text box on the right, enter the contents of your message.
    This use case uses the following content:
    {% set mainShop = customer.StoreId %}
    {% catalogitemv2.UC-ShopsSale11092023(mainShop) %}
    Get ready for shopping at your favorite local spot, {{ catalog_result.StoreName }}! 🌟
    🎁 Enjoy jaw-dropping discounts of up to 30% off on absolutely everything in-store!
    📍 Find us at {{ catalog_result.Street }} in the heart of {{ catalog_result.City }}.
    {% endcatalogitemv2 %}
        
    Where:
    • StoreId - the name of the attribute assigned to the user profile reflecting the store ID,
    • UC-ShopsSale11092023 - is the name of the created catalog,
    • StoreName, Street, City - are the names of the columns defined in the catalog.
    SMS template example
    Example of a SMS template
  6. Save the template.

Create a workflow for the SMS campaign


Create a workflow that sends a personalized SMS message to a selected segment of customers, informing them of a promotion at a store of their choice.

  1. Go to Automation icon Automation > Workflows > New workflow.
  2. Enter the name of the workflow.

Define the Audience node


Choose the Audience node as the trigger. In this scenario, we are creating a group of customers who have agreed to receive SMS messages and have assigned StoreId attribute to their profile.

Note: The audience should consist of users who have an attribute used as the Primary key in the catalog, otherwise the message will have an sms.notSent event with Jinava rendering failed as the parameter.

  1. Start the workflow with the Audience node.
  2. In the configuration of the node, leave the Run trigger as one time.
  3. Choose the day and time when the process starts.
  4. In Define audience, choose New Audience and define the conditions according to your needs.
    The following screen shows the audience configuration used in this use case.
    Audience configuration
    Audience configuration

Define the Send SMS node


  1. Add the Send SMS node. In the node settings:
    1. In the Content section, choose the phone number from which the message will be sent.
    2. From the SMS template drop-down, select the template you created earlier in the process.
  2. Click Apply.

Add the finishing node and set capping


  1. Add the End node.
  2. In the upper right corner, click Save & Run.
Final configuration of the workflow
Final configuration of the workflow

Check the use case set up on the Synerise Demo workspace


You can check the configuration of each step 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