Snippets are dynamic placeholders and a method for using and/or transforming the data in your recipient attributes when the data don’t look exactly the way you would like to render it in your send outs.

With handlebars you can create macros for your different recipient attributes and these can of course be edited directly in the message editors, BUT they can quickly get pretty long and complex and may disturb your layout overview while creating your message. Instead, create your placeholder macros in a snippet to make it easier to deal with them while creating your commuincation in the editor.

Snippet setup

In Symplify you’ll find Snippets on Account Settings > Snippets.

Name your snippet to later use the name in the editing process.

Then you can add the handlebar code into the snippet. The snippet editor will try to detect errors in your code but remember to always test your snippets to verify.



Let's say that you want to render different outputs depending on if a member has more or less than 100 membership points. If they have more than 100, the output should say "Goldmember" and if less "Silvermember". This can be done by adding the code below to your content. But it will probably not look that nice while editing (and it will be harder to reuse it in some other sendout).​

{{#switch contact.bonusLevel}}{{#compare ">" 100}}Goldmember{{/compare}}{{#compare "<" 100}}Silvermember{{/compare}}{{#default}}New{{/default}}{{/switch}}

​So, instead you can add the handlebar code into a snippet which will fetch the handlebar with a far more simple command: {{snippet ‘snippetName‘}}.

For example, the two columns in the image below will render the exact same data but by using a snippet (right column) you’ll get a much better overview while editing your message.




You can use snippets to create dynamic sender and reply addresses. Learn how!

And another also, snippets are great to batch update email content such as link URLs etc. If you have a generic URL in 350 auto sends which you need to change, its better to have a snippet as the URL and change the actual URL in the snippet. So, you only have to make one URL update in the snippet instead of changing URL in 350 autos.

So, get to know the possibilities with handlebars and start creating your snippets!

Was this article helpful?
0 out of 0 found this helpful