Skip to main content
All CollectionsBrazeBraze - SMS Experiments
Braze - SMS - Content Block Preparation
Braze - SMS - Content Block Preparation

Prepare your reusable Content Block for use with Dynamic Optimisation

Updated over a month ago

With your Jacquard token and Braze Currents set up, you're ready to move on to creating your reusable Content Block.

Arguably the most important pieces of this Dynamic Optimisation integration are the Content Block and code snippets you'll need to create.

Our integration leverages a Braze feature known as Connected Content. If you're not familiar with Connected Content, check out Braze's documentation to read all about it.

We've created code snippets that work with Braze's Connected Content to dynamically pull language into your messages so we can optimise your language in real time.

One of the code snippets is reusable and will be placed in a Content Block, which is what we'll explore below. If you'd like to read up on Content Blocks before continuing, please see Braze's Content Block documentation.

If you've previously made a Jacquard Content Block for email or push, you must make a new one for SMS, as we require different fields to match back engagement data for SMS than other channels.

Written walkthrough

1. Navigate to the Content Blocks Library in Braze

You can find the Content Blocks Library under the Templates section of the navigation bar on the left side of your screen in Braze.

Navigate to Templates > Content Blocks.

2. Create a new HTML Content Block

Click Create Content Block and then HTML Content Block from the dropdown that appears.

The Content will not render correctly if a drag-and-drop Content Block is created.

3. Paste the Connected Content code snippet into the HTML editor

You'll need to paste the following Connected Content code snippet into the HTML editor of your new Content Block:

{% connected_content https://realtime.phrasee.co/live/single_variant?campaign_id={{phraseeExperimentId}}&delivery_id={{campaign.${api_id}}}&recipient_id={{${user_id}}} :method get :headers { "Authorization": "Bearer <token>" } :content_type application/json :no_cache :rerender :save variants %}

4. Add in your API token

With this pasted, you'll notice there is a critical piece of data you'll need to add into the snippet: the API token.

Your token should be accessible for the admin(s) of your account, via the Admin > Settings menu. If you're not sure where to find your token, we've got an article for that.

With your token in hand, paste it over the <token> placeholder in the code snippet, Paste over the angle brackets, too, but leave the space before it and the quotation marks after it intact.

Your code snippet should look something like this with your token in place:

Click Done.

5. Name and launch your Content Block

Make sure you give the Content Block a sensible, unique, descriptive name for easy location when adding it to your messages. It is best to have no spaces or special characters in the name. You'll note in our example below we've chosen the name jacquardSMS.

Click Launch Content Block when you're happy with your changes.

Continue on the article path below to move on to message configuration.


Article path

Related articles

Page last reviewed: 26 November 2024

Did this answer your question?