
The basic drag & drop builder is an external solution provided by BeeFree implemented in Synerise that lets you create an in-app message template by dragging and dropping elements.

It is a great choice for creating in-app templates because it's user-friendly and efficient, provides visual control, offers customization options, supports collaboration, simplifies updates, and makes campaign management accessible to non-technical users.

You can personalize the content of the message by using [inserts](/docs/campaign/in-app-messages/creating-inapp-templates/creating-inapp-template#adding-a-snippet-to-the-template-code). Inserts let you refer to customer attributes (such as name, city, size), product recommendations (for example, last seen items or added to a cart), and the results of aggregates, expressions, and metrics.

## Good practices

### Campaign planning recommendations

Using a large number of in-app messages in your application can impact rendering time, message delivery, and battery usage.

To maintain optimal application performance when using in-app campaigns:
- Avoid assigning more than 10 in-app messages to the same trigger event.
- Avoid having more than 20 in-app messages active at the same time in your application.
- Review and archive in-app campaigns that you no longer need.  

### Template construction

When creating or editing in-app message content:

- Place the the `SRInApp.close()` (or `SRInApp.hide()`) method at the beginning of the JS script.
- Use try/catch to handle possible fatal errors in the JS script.
- Handle situations where Jinjava inserts return empty data.
- When adding external links to your message:
    - Only link to sites you trust.
    - Don't link to large images that may negatively affect performance.
    - Don't link to resources whose CSS/HTML may be blocked. If you have resources loaded from your own URLs, set `Synerise.settings.inAppMessaging.contentBaseUrl` and use relative paths in HTML/CSS.

## Building templates
---
1. Go to **Experience Hub > In-App Messages**.
2. On the left pane, click **Templates > New template**.  
3. On the pop-up, select **Drag & drop builder**.
4. Proceed according to the instructions on building templates is available at the [BeeFree help center](https://support.beefree.io/hc/en-us/articles/360015405120-Building-Content-in-Beefree).

### Selecting in-app message type

To select the way of displaying your in-app message within a mobile application:

1. On the part of the screen with an in-app message preview, click **Display type**.
2. From the dropdown list, select one of the following options:
    - **Fullscreen** - In-app messages are displayed in the center of the mobile application, with no clickable elements within the application.
    - **Top bar** - In-app messages are shown at the top bar of the application, and user interaction is limited to the area below the message.
    - **Bottom bar** - In-app messages appear at the bottom bar of the application, with user interaction restricted to the area above the message.
3. If you want to manage the display of in-app messages over safe area in your mobile application, use the **Cover safe area** option.  
    A safe area is the portion of a view that is not covered by elements such as a navigation bar, tab bar, or toolbar. Safe areas are important for ensuring visibility and access to a device's interactive features.  
    
   <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">

   Available from the following application versions:  
   - iOS: `5.1.0` and higher
   - Android: `6.1.0` and higher

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


    - By enabling this option, the in-app message will extend into bars, notches and other UI elements.
    - By disabling this option, the in-app message won't cover system UI elements such as top bars, notches, and so on. This is the default setting.

<figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/campaign/_gfx/in-app-dd-display-type.png" class="full" alt="View of the Display type option in drag and drop builder"><figcaption>View of the Display type option in drag and drop builder</figcaption></figure>


### Adding links
---
Universal links and deep links are used to navigate to specific content within an app, while web links can display web content within the app itself. In the template builder, the **Link type** option lets you incorporate links into your in-app template. The builder automatically recognizes the link type you enter, triggering the corresponding action without requiring further configuration.


<div class="admonition admonition-warning"><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 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z" /></svg></div><div class="admonition-body"><div class="admonition-content">

The following SDK versions automatically recognize the link type and adjust the action accordingly:
- Android: `5.19.0` and higher
- iOS: `4.18.0` and higher

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


1. Drag the **Button** widget to the canvas.  
    **Result**:  
    <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/campaign/_gfx/button-added-dd-creator.png" class="large" alt="A button widget added to the canvas"><figcaption>A button widget added to the canvas</figcaption></figure>
2. Go to the widget editing mode by clicking the widget on the canvas.  
    **Result**: The editing options appear on the right pane.  
    <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/campaign/_gfx/editing-button-dd-creator.png" class="large" alt="The configuration of the Button widget"><figcaption>The configuration of the Button widget</figcaption></figure>
3. In the **ACTION** section, set the **Link type** option to **Open web link**:  
    - To add a web or universal link, in the **Url** field, enter a URL address including the HTTP or HTTPS protocol, for example: `https://example-link.com/`
    - To add a deep link, in the **Url** field, enter a URL in the format of mobile deep linking, for example: `myapp://product?id=123`  
    
   <div class="admonition admonition-tip"><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="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z" /></svg></div><div class="admonition-body"><div class="admonition-content">

   You can use Jinjava inserts in links for personalization.

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



### Creating HTML blocks
---
Apart from the standard building elements such as Title, Paragraph, List, Image, Button, Divider, Social, HTML, Icons, and Menu, the basic builder includes the custom, Synerise-native **HTML blocks** element. The configuration of this element takes place in the [Synerise-native code editor](/docs/campaign/in-app-messages/creating-inapp-templates/creating-inapp-template), that lets you derive the benefits provided by the code creator such as:
- creating re-usable HTML block templates,
- creating a block to be edited in an easy-to-use configuration form that doesn’t require programming skills
- previewing the block in the context of a specific customer in isolation from the in-app message template  
     
  <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 also preview the whole template in the context of a specific customer.

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


5. On the right side of the screen, select and drag the **HTML blocks** element to the template.  
    **Result**:  
    <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/campaign/_gfx/html-block.png" class="full" alt="The HTML block added to the template"><figcaption>The HTML block added to the template</figcaption></figure>
6. On the **HTML blocks** you added to the template, click **Configure**.  
    **Result**: A pop-up appears.
7. On the upper right side, click **New block**.  
8. Create the structure of an HTML block by following the instructions in the ["Creating template"](/docs/campaign/in-app-messages/creating-inapp-templates/creating-inapp-template#creating-a-template) section.
    - You can build a simple HTML structure in the **HTML** section.
    - On the **HTML** tab, you [can build an easy-to-use configuration form](/docs/campaign/in-app-messages/creating-inapp-templates/creating-inapp-template#template-editing-simplification) which can be filled out by users with no programming skills. To do so, [add variables](/docs/campaign/in-app-messages/creating-inapp-templates/creating-inapp-template#adding-a-variable) to the block template such as color pickers, dropdown lists (with aggregates, expressions, metrics, voucher pools, and recommendations created in Synerise), and fields, so the users who will use this template in a builder will need only to fill out the fields in this form. For example:  
        <figure><img src="/api/docs/image/54176ad07f146575310749eba44b7c2f42c1b327/docs/campaign/_gfx/variable-after.png" class="full" alt="Example field in a configuration form"><figcaption>Example field in a configuration form </figcaption></figure>
9. To save this block as a template, click an arrow on the left to the **Next** button, and select **Save as**. On the pop-up, enter the name of the template and select the folder in which the template will be saved.
10. To use this block in a dynamic content template, click **Next**.  


   <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">

   We recommend placing the HTML block as the sole element in the row. Additionally, ensure that the styling of the block is compatible with the styling of the template.

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


## Previewing templates

5. To check the preview of the template for a particular customer or a product, click the **Preview** button on the upper left side. 
1. Enter the ID of a customer or a product. 
2. Click **Apply**.