Skip to main content
All CollectionsAdvanced Features
How to use custom variables?
How to use custom variables?

Using custom variables in Inrō to personalize messages, conversion links, and HTTP requests with dynamic contact, trigger, and webhook data.

Updated over a month ago

Custom variables allow you to personalise automated messages and other actions by inserting dynamic data. In this guide, we will walk you through the types of custom variables supported by Inrō, how to use them, and some tips for getting the most out of this feature.

Custom variables in scenarios


Actions that support custom variables

  1. Text Messages (DMs)

    • When creating a new DM, simply insert the desired variables where you want personalized content to appear.

    • Example: “Hello {{ contact.name }}, we have an update on your recent order.”

  2. Conversion Links

    • Use variables in the title, subtitle, button text, and URL fields of your conversion links.

    • Example: “Click here to confirm your order: {{ contact.id }}”

  3. HTTP Requests

Types of Custom Variables

Inrō supports several types of variables that you can use in different actions:

  1. Contact Variables

  2. Trigger Variables

  3. Webhook Variables

Contact Variables

Contact variables change depending on the contact you’re interacting with. They can be used in text messages (DMs), conversion links, and HTTP requests.

Supported Contact Variables:

  • {{ contact.name }}: The contact’s name.

  • {{ contact.username }}: The contact’s Instagram username.

  • {{ contact.id }}: The contact’s unique ID.

  • {{ contact.email }}: The contact’s email address.

  • {{ contact.phone }}: The contact’s phone number.

  • {{ contact.profile_picture }}: The URL to the contact’s profile picture.

Example Usage:

Hi {{ contact.name }}, we have an exclusive offer just for you!


Trigger Variables

Trigger variables change based on the event that triggered the scenario or campaign.

For campaigns, the last message or comment received are used as well as the last ig.me link opened by this contact.

If no message, comment or ref parameter are found, the variable will be returned empty.

Supported Trigger Variables:

  • {{ trigger.message }}: The message that triggered the scenario.

  • {{ trigger.comment }}: The comment that triggered the scenario.

  • {{ trigger.date }}: The date and time when the trigger occurred, formatted as 2024-03-19 11:42:30+00:00.

  • {{ trigger.ref }}: The ig.me link ref parameter that triggered the scenario.

Example Usage:

Thank you for your comment on {{ trigger.date }}: "{{ trigger.comment }}"


Webhook Variables

If your scenario was triggered by a webhook, you can insert the webhook’s body parameters as variables in your actions. This allows you to incorporate data from external systems into your automated messages.

Example Webhook Data:

{ "contact_id": 65427, "first_name": "John", "meeting_date": "March 24th, 2024" }


When to Use Custom Variables

Custom variables are useful when you want to:

  • Personalize direct messages (DMs) with user-specific information.

  • Tailor conversion links to include personalized details.

  • Use data from webhooks to automate responses with specific user information.

Example Use Case - Identity Verification

  • Trigger the scenario with a “Verify” keyword, follow it up with an HTTP “Get” request to request the information from your CRM & confirm the verification details with Instagram.

  • After verifying, use custom variables for the profile name & send personalized messaging to confirm their verification.

  • As a bonus, try adding a short welcome video to create a stronger connection and a better onboarding experience.

Inrō Insider Tips

  • Use Detailed Variables: Make your messages more engaging by using variables creatively, often in combination and avoid ones that can make it automation obvious.

  • Test Your Variables: Always preview and test your messages to ensure variables are correctly inserted and displayed.

  • Keep It Relevant: Use variables that provide meaningful personalization without overcomplicating your message.

Feedback

If you have any questions or need further assistance, feel free to reach out to our support team or leave a review on this article.

Did this answer your question?