Code snippets updated to include liquid whitespace controls 9 April 2024.
With your Jacquard token and Braze Currents set up, you're ready to move on to getting your email ready.
Arguably the most important piece of the Braze Dynamic Optimisation integration is the code snippet you'll need to include in your messages.
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. These will be stored inside a Content Block for ease of use.
The tl;dr version is 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 using Jacquard's Dynamic Optimisation.
The Content Block
Create a content block in Braze and Paste the following Connected Content snippet into it:
{% connected_content https://realtime.phrasee.co/live/single_variant?campaign_id={{phraseeExperimentId}}&delivery_id={{campaign.${dispatch_id}}}&recipient_id={{${user_id}}} :method get :headers { "Authorization": "Bearer <token>" } :content_type application/json :no_cache :rerender :save variants %}You'll notice there is a critical piece of data in the snippet:
Jacquard Connect Server token - you'll paste this over <token> in the code snippet
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.
Make sure you give the Content Block a sensible name for easy location when using in your messages. Here is an example:
Your Jacquard content block is now ready for use in all your messaging.
