Jinja Generator

GenAI is here to solve your Jinja needs quickly! You can prompt the Jinja generator in plain language to create Jinja syntax for you, then insert that into your content. You can also use some prefilled suggestions. There are so many possibilities for how Jinja generator can improve your day to day; here are a few:

To try it out:

  1. From the left navigation, expand Campaigns then click Content.
  2. Click Create Template then choose Template Editor.
  3. Click the Jinja Generator tab.
  4. Choose a prefilled suggestion, or write your own prompt then click Generate:

Best Practices

Like other AI, the Jinja Generator is learning every day and there are some best practices to consider when writing prompts. The first thing you should do before writing your prompt is consider your objective.

Best PracticeBetterOK
Be as specific as possible. When writing your prompt, consider your objective and write specifically to that"include an item that was abandoned in the last 30 days""include a possible item"
If there are specific fields you’d like to use (e.g. contact.previous_address), include those in your prompt to encourage the AI to use them when generating Jinja"include previous address using contact.previous_address"

"include company name" or "include customer's name"
"include previous address"

"include name"
The generator can't include specific image urls, but you can prompt it it to include a placeholder"include a placeholder to link an image url""with an image"

Considerations

  • The Jinja Generator is aware of contact properties, lookup tables, and the Jinja functions that are available within the Simon content editing environment.
  • The Jinja Generator isn't aware of
    • Field contents (so it can't, for example, know the format of dates, phone numbers, country codes, etc., or the available values in a SET field)
    • Previously written content (so it can't, for example, find an appropriate content block or image URL to include)
  • Sometimes it takes a few tries to get the result just right. Your prompt remains in the field even after the result is generated, so you can tweak it until you get the result you want to use.

📘

When using the Jinja Generator, your interactions with this AI are recorded and analyzed for the sole purpose of enhancing and refining the system. Rest assured, we do not train this data across different organizations; your information remains confidential and is used exclusively to improve the Jinja Generator.


Examples

Prompt users to download an app or visit a website

Prompt:

If a user has not visited the app in the last year, prompt the customer to download the app. Include the syntax for the app download.

Result:

{% if contact.app_sessions_mk and contact.last_seen and (now()|subtract_years(1)) > contact.last_seen %}

We noticed you haven't visited our app in the last year. We have a lot of new features we think you'll enjoy! Download the app here.

{% endif %}

Include a specific date

Prompt:

The person's initial signup date

Result:

{{ contact.account_created }}

Write or improve copy

Prompt:

Write me an inviting tagline to purchase a brand new item we think they'll like that is friendly in tone and includes emojis for a customer that purchases frequently

Result:

<p>Hey {{ contact.first_name|capitalize }}, we have something special for you! 🥳 Our brand new item might just be your new favorite! 🛍️ Don't miss out and get it today! 🔥</p>