All integrations

Braze

Power relevant, personalized customer experiences in real time.

Introduction

Braze is a customer engagement platform that specializes in multichannel marketing, such as email and push notifications. Braze supports programmatic access to all Miso APIs, making it easy to send personalized products recommendations to your customers.

Integration Steps

Create a Connected Content object

Braze’s Connected Content feature allows you to connect to a Miso API within an email template and save the JSON output as a local variable. The basic structure of a Connected Content object is the following:

{% connected_content
     [API request]
     :save variable_name
%}

Using the % connnected_content tag, enter the API request you’d like to use and save the output by giving it a descriptive variable name. For example, using the User to Products API, the code might look like the following:

{% capture body %}
{
  <!-- Request all fields -->
    "fl": ["*"], 
    <!-- Dynamically generated the user_id -->
    "user_id": {{${user_id}}}
}
{% endcapture %}

{% connected_content
<!-- API Request -->
https://api.askmiso.com/v1/recommendation/user_to_products?api_key={{API_KEY}}
    :method POST
    :body {{body}}
<!-- End API Request -->
<!-- Save JSON to miso_data variable-->
        :save miso_data
%}

Notes:

  1. You must replace {API_KEY} with your secret API key found in Dojo.
  2. The User to Products API requires the user_id in the request body. Since we need to dynamically generate the user_id during send-time, we need to use Braze’s Liquid Syntax to set it as a variable - {${user_id}}.

Use Connected Content in an email template

  1. From the Braze dashboard, select Templates & Media and create a new template or open an existing template using the HTML Editor.

    Untitled

  2. In the email body, select Edit Email Body.

  3. In the HTML editor, paste the Connected Content script inside the <body> section.

  4. Use dot notation inside a handlebar expression to access attributes from the Miso API. For example, the first cover_image attribute inside the products array would be accessed by {{ miso_data.data.products.cover_image.[0] }}.

Tips and Tricks

  • To loop through all the recommended products in the returned products array and create a section for each product in the email template (such as when building recommended product shelves), use a FOR loop in liquid syntax:

    <table>
        <tr>
            <td>
                {% for product in miso_data.data.products %}
                    <!--Enter the <div> here. You can call 
                    Miso attributes using dot notation. To call 
                    the product title for example, simply use 
                    {{ product.title }}. 
                    -->
                    {% endfor %}
            </td>
        <tr>
    </table>
    
  • When bulk-sending an email campaign to more than 10,000 users, ensure that a Rate Limiter is added in the Braze campaign via the Target Audience settings panel. It is recommended to set the limit to 2,500 requests per minute. Additionally, you can add a :retry parameter to the connected content object so that any failed requests will retried. For more information on the retrying requests, see Braze's documentation.

Additional Resources

For more information on Miso’s API, check out the official API Documentation.

For more Integrations like this, visit the Integrations page on our Docs site.

Published Date: July 6th, 2022

Icon/Activity Icon/Add Icon/API Icon/Arrow/Down Icon/Arrow/Left Icon/Arrow/Right Icon/Arrow/TopRight Icon/Arrow/Up Icon/Bento Icon/Billing Icon/Bin Icon/Book Icon/Bookmark/Default Icon/Bookmark/Filled Icon/Calendar Icon/Caret/Down Icon/Caret/Up Icon/Chavron/DownIcon/Chavron/LeftIcon/Chavron/RightIcon/Chavron/UpIcon/Checknox/CheckedIcon/Checknox/Unchecked Icon/Checklist Icon/Chip Icon/Clipboard / Copied Icon/Clipboard/Default Icon/Clock/Stopwatch Icon/CMD Icon/Data/Catalog Icon/Data/Engine Icon/Data/Group Icon/Data/Interact Icon/Data/Users Icon/Dive Icon/Docs/Key Icon/Dojo Icon/Email Icon/Env/Development Icon/Env/Playground Icon/Env/Prod Icon/Folder Icon/Fullscreen/Collapse Icon/Fullscreen/Expand Icon/Guides/Multiple Icon/Guides/Single Icon/Hashtag Icon/Heart/Outline Icon/Heart/Solid Icon / Cart z Icon / Click Icon / Clock Icon / Data Icon / Doc Icon / EmptyCart z Icon/Social/Facebook Icon / Genome Incognito Icon / Money Icon/Social/ProductHunt Icon / Search Icon/Social/Twitter Icon / User Icon/Info/Error Icon/Info/Info Icon/Info/Question Icon/Info/Warning Icon/Interact/Download Icon/Interact/Edit Icon/Interact/External v2 Icon/Interact/External Icon/Interact/Filter Icon/Interact/Logout Icon/Interact/Options Icon/Interact/Re-order Icon/Interact/Reload Icon/Interact/Remove Icon/Interact/Replace Icon/Interact/Search Icon/Interact/Shuffle Icon/Interact/Undo Icon/Interact/Upload Icon/Interact/Video Icon/Invoice Icon/Loading Icon/Loading Icon/Lock/Locked Icon/Lock/Unlocked Icon/Lock Icon/Mapping Menu Icon/Notification Icon/Overview Icon/Person/Team Icon/Person/User Icon/Plan/Enterprise Icon/Plan/Growth Icon/Plan/Startup Icon/Plan/Trial Icon/Recipe Icon/Rocket Icon/Settings/App Icon/Settings/User Icon/Settings Icon/Shrine Icon/Sidebar/Close Icon/Sidebar/Open Icon/Slideout Icon/Sort/Ascending Icon/Sort/Default Icon/Sort/Descending Icon/Star/Filled Icon/Star/Outlined Stopwatch Icon/Support Icon/Tag Icon/Interact/Thumb/Dislike Icon/Interact/Thumb/Like Icon/Tick Icon/Trend/New Icon/Trend/Trending Icon/Tutorial Icon/Lock/Unlocked Icon/View/Grid Icon/View/List Icon/Watchlist/Add