Back to Help
email design

What are External Attributes?

Vero’s External Attributes feature allows you to pull data from your own API or web endpoints so you can personalise your emails on a truly one-to-one basis.

It gives you the ability to access data that hasn’t been pushed into Vero, and use that data in your email content, subject lines and dynamic attachments.

Example use cases:

  • You’d like to send off the top 5 new products in your store that day.
  • Pull in extra information about your users
  • You’d like to show relevant items based on the current stock.
  • You’d like to send customised content for each demographic (i.e. products based on location or even different languages)

Vero can handle two types of data responses:

Returning HTML

To do this you use a custom filter we’ve built using the Liquid tempting language.

This method allows you to pass data stored in Vero back to your server so that you can manipulate it and send back some custom HTML. The custom HTML that is returned is inserted into the body of your email exactly where you place the following tag:

{% fetch_html 'https://www.domain.com/endpoint' %}

In this example below, we pass back both a customer-level attribute and an event-level attribute. This data can then be used by your server!

{% fetch_html 'https://www.domain.com?param={{user.id}}&param2={{event.number_of_widgets}}' %}

You should of course replace the domain in this example with whatever URL you prefer. This URL should return raw HTML that will be dumped into the body of your HTML campaign exactly as it is returned.

Here is how you might insert this code into the body of your email:

Fetch HTML in Vero

This would then be replaced with the correct HTML upon sending.

Returning JSON

Alternately, you can include an API end-point and pull JSON data from your web server to be used when creating a campaign.

There are two ways of accessing external JSON data.

External Attributes Field

If you have External Attributes enabled for your account, you will find an external attributes input field beneath the content section of your campaign builder:

External attributes in Vero

Place the API endpoint into the External Attributes section. For example, if the endpoint was:

http://jsonplaceholder.typicode.com/posts/1

The contents of the endpoint would show:

JSON response

Then, when you place inside of your content (or template as well), the result in the preview would show the title pulled in like so:

External attributes preview

Fetch JSON liquid filter

The fetch_json liquid filter works in a similar way as the fetch_html filter above, but instead expects a JSON response.

{% fetch_json product = 'https://www.domain.com/products/{{event.product_id'}} %}

After adding this to your template or email body you can then access the returned data using the product liquid variable. e.g:

{{json.product.product_name}}

Authentication

At this time External Attributes only supports basic HTTP Authentication. You can include basic HTTP Authentication details using the format http://username:password@yoururl.com/data-feed.json. This is supported by fetch_html, fetch_json and JSON fetch methods.

External Attributes is an advanced feature. Please get in touch with our support team via email so we can show you it in action.

Didn't find what you were looking for?

Get in touch, we're always happy to help. Email us at: support@getvero.com

Improve our docs

Our help docs are open to everyone, help us make them better by contributing on Github and you'll be our new best friend!

Search