
Display an engaging in-app story that combines interactive storytelling with AI-driven product recommendations. This feature allows businesses to present relevant products in a dynamic and visually appealing format, enhancing user engagement and increasing conversion opportunities. By leveraging predefined, ready-to-use templates, brands can easily create and adapt stories to their specific needs.

In this use case, you'll discover how to create an interactive in-app story promoting a running challenge and specific brand of running shoes. The guide offers detailed steps for using a predefined template, customizing content, and including AI-based recommendations for a personalized and engaging user experience. The target audience consists of women who visited the shoes category in the last 30 days without making a purchase.


<div class="youtube-embed youtube-facade not-prose" data-youtube-id="kGY2tXvxltg" role="button" tabindex="0" aria-label="Play YouTube video"><img src="https://img.youtube.com/vi/kGY2tXvxltg/hq720.jpg" alt="YouTube video" class="youtube-facade-thumb" loading="lazy" /><span class="youtube-facade-play" aria-hidden="true"><svg viewBox="0 0 68 48" width="68" height="48"><path d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.64 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z" fill="red"/><path d="M45 24 27 14v20" fill="white"/></svg></span></div>

## Prerequisites 
---
- [Configure AI engine](/docs/settings/configuration/ai-engine-configuration/engine-configuration-for-recommendations) for recommendations; enable the personalized recommendation type.
- Implement the [transaction events](/developers/web/transactions-sdk) using [SDK](/developers/web/transactions-sdk) or [API](https://developers.synerise.com/DataManagement/DataManagement.html#operation/CreateATransaction).
- [Implement Synerise SDK in your mobile app](/developers/mobile-sdk).

## Process
---

In this use case, you will go through the following steps:
1. [Prepare the segmentation](#prepare-the-segmentation) of women who have visited the shoes category during the last 30 days and have not made any transaction. 
2. [Create an in-app message](#create-an-in-app-message) with product recommendations using the predefined template.

## Prepare the segmentation
---
In this part of the process, we will create a segmentation of users who have visited the `women/shoes` category in the last 30 days (website of mobile) but have not made any transaction during that time. 

1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/decision-hub-icon.svg" alt="Decision Hub icon" class="icon">**Decision Hub > Segmentations > New segmentation**.
3. Enter the name of the segmentation.
4. Click **Add condition**.
4. From the dropdown list, select the `page.visit` event.
6. Click **+ where** and from the dropdown list, select `url`.
7. Choose the **Contain** operator and enter the fragment of the URL for the specific category. In our case it will be `women-shoes`. Alternatively, you can build the following condition: **category equal [category name]**.
7. Using the date picker in the lower-right corner, set the time range to **Last 30 days**. 
8. Click **Add condition**.
10. From the list, choose the `screen.view` event,
6. Click **+ where** and from the dropdown list, select `url`.
7. Choose the **Contain** operator and enter the fragment of the URL for the specific category. In our case it will be `women-shoes`. Alternatively, you can build the following condition: **category equal [category name]**.
12. Connect these conditions by the **OR** operator.  
7. Using the date picker in the lower-right corner, set the time range to **Last 30 days**. 
8. Click **Add condition**.
9. From the list, choose the `transaction.charge` event. 
10. By clicking **Performed** above the event name change the condition to **Not performed**.
6. Save the segmentation.

 <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/inappstories-segment.png" class="full" alt="The view of the segmentation configuration"><figcaption>Segmentation configuration</figcaption></figure>   

## Create an in-app message
---
In this part of the process, you will create an in-app campaign. We will use a predefined template for the message with interactive in-app stories, so there is no need to create a template from scratch.

1. Go to <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/icons/experience-hub-icon.svg" alt="Experience Hub icon" class="icon" > **Experience Hub > In-app messages> Create in-app**.
2. Enter the name of the in-app.

### Define the audience
---
As the first step, define the target group of customers for the in-app message. In this case, we will use the segmentation created in the [previous step](#prepare-the-segmentation).

1. In the **Audience** section, click **Define**.
2. Click **Segmentations**.
3. Click **Select segmentation** and choose the segmentation created in the [previous step](#prepare-the-segmentation).
3. Save settings in the **Audience** section by clicking **Apply**.

### Define content
---
In this part of the process, you will use a ready-made template to create the content of the in-app message that will be displayed in the mobile application.

1. In the **Content** section, click **Define**.
2. Click **Create message** and from the list of template folders, select **Predefined templates**.
3. Select the **STORIES** template.

**Result:** You are redirected to the code editor.

<div class="admonition admonition-note"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

You can edit the template in two ways, by editing the code of the template, [add inserts](/docs/campaign/in-app-messages/creating-inapp-templates/creating-inapp-template#adding-a-snippet-to-the-template-code), [add variables](/docs/campaign/in-app-messages/creating-inapp-templates/creating-inapp-template#adding-a-variable) and/or by filling out the form in the Config tab. In this use case, we will use the capabilities of the predefined Config tab.

</div></div></div>


#### Edit form in the Config tab 
---
The form in the **Config** tab is already filled in with default values. You can keep them or change them to fit your business needs.  

 <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/inappstories-config.png" class="full" alt="In-app configuration"><figcaption>In-app configuration</figcaption></figure>  

1. To lock a specific slide that you want to preview and edit, to prevent it from switching automatically, enable the **Config Mode**.
2. In the **Slide number** field, enter the slide number from which you want to edit.
2. In the **General Settings** section:
    - In  **Number of stories**, enter the number of slides in the stories (no more than 5).
    - In **Stories order**, define the order of stories (for example, 2,3,5,1).
    - In **Title** and **Subtitle**, define the title and subtitles of the stories respectively. If you don't want to display them, enter a dash (-).
    - If you want to display the avatar, enable the **Display avatar image** option and in **Avatar image**, enter a link to the source of avatar image.  
3. In the **Button** section:
    - Customize the action button by defining the text on the button (**Text on the button**), the URL to which a user will be redirected (**Destination link**), colors of the button (**Button text color** and **Button color**).  
4. Configure the settings for each story
    - Each story can be customized separately. You can customize copy in a story, select colors of text and background, provide the links to image or video included in the story, and define the display time.  
5. After you complete editing the form, disable the **Config mode** option.
5. After you make changes to the template, you can check the preview.
    1. Click the **Preview contexts** button on the upper left side.
    2. Enter the ID of a customer.
    3. Click **Apply**.

  
   <div class="admonition admonition-important"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

   Considering that the in-app is very interactive, the preview in the platform may not be enough to test the in-app performance. That’s why we suggest checking the campaign preview directly in the mobile app.

   </div></div></div>


6. If the template is ready, in the upper right corner click **Save this template > Save as**.
7. On the pop-up:
    1. In the **Template name field**, enter the name of the template.
    2. From the **Template folder** dropdown list, select the folder where the template will be saved.
    3. Confirm by clicking **Apply**.
8. To continue the process of configuring the in-app campaign, click **Use in communication**.
9. To save your content changes, click **Apply**.

### Select events that trigger the in-app message display
---
In this part of the process, you will define the event triggering the display of the in-app message.

1. In the **Trigger events** section, click **Define**.
2. Select **Add event** and from the dropdown list, choose `screen.view` event.
3. Click the **+ where** button and select `source`.
4. As the logical operator, select **Equal**.
5. As the value add `MOBILE`.
5. Click **Apply**.

 <figure>
   <img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/use-cases/all-cases/_gfx/inapp-stories-trigger.png" alt="The view of the in-app trigger event configuration" class="full">
   <figcaption> In-app trigger event configuration </figcaption>
   </figure>

### Schedule the message and configure display settings
---
As the final part of the process, you will set the display settings of the in-app message such as schedule, capping, priority of the message among other in-app messages.

1. In the **Schedule** section, click **Define** and set the time when the message will be active. 
2. In the **Display Settings** section, click **Change**.
3. Define the **Delay display**, **Priority index** and enable the **Frequency limit** toggle to manage the frequency of in-app message display in the application.  
16. Click **Apply**. 
17. Optionally, you can define the UTM parameters and additional parameters for your in-app campaign.
18. Click **Activate**.

### Test the in-app campaign
---

Read the ["Testing" section](/docs/campaign/in-app-messages/create-inapp-message#testing) to discover how to test your in-app campaign.

## Check the use case set up on the Synerise Demo workspace
---
You can check the [segmentation](https://app.synerise.com/analytics-v2/segmentations/e9ba4f5e-76e6-4782-8bc5-3bdb72281688) and [in-app message campaign](https://app.synerise.com/communications/in-app/0954550c-eb59-4b33-a92c-662e348a3029) configuration directly in Synerise Demo workspace. 

If you’re our partner or client, you already have automatic access to the **Synerise Demo workspace (1590)**, where you can explore all the configured elements of this use case and copy them to your workspace.  

If you’re not a partner or client yet, we encourage you to fill out the contact [form](https://demo.synerise.com/request) to schedule a meeting with our representatives. They’ll be happy to show you how our demo works and discuss how you can apply this use case in your business.


## Read more
---
- [In-app messages](/docs/campaign/in-app-messages)
- [Using in-app template builder](/docs/campaign/in-app-messages/creating-inapp-templates/creating-inapp-template)