Skip to main content
All CollectionsMembershipsManaging Memberships
Adding Product Attributes To Emails (Memberships)
Adding Product Attributes To Emails (Memberships)
Updated over 2 months ago

In this article, we will show you how you can display product attributes in your Appstle Membership emails. Product attributes can be assigned from the customers' end through form fields, which you as the merchant can configure when creating membership plans.

For more information on form fields, please refer to our dedicated document on configuring products here.

Let's say you have a product in your store that you wish to configure in this manner.

On screen now is a simulated gold membership product listing with 3 fields: First Name, Last Name, and Email. Prospective customers simply fill these out with the requested information then purchase.

The information entered into these fields will be stored as attributes in the merchant portal for your viewing, accessible by navigating to the Memberships section of Appstle. Locate the customer's order then click on the Membership ID number. Then click on the 3 dots next to their product and click Attributes.

The form field information will be visible here in the form of key, referring to the text field, and value, referring to the customer input.

These terms will be important when trying to display these attributes in your emails.
โ€‹
โ€‹Note: Displaying this information in your emails will require several lines of code using some newly introduced tokens.

To access your email templates, navigate to Settings > Customizations > Email Templates.

Choose any template you are interested in making use of. We will showcase how it functions using the Membership Created template.

Scroll down to the Text section for the body of the email. The two tokens in question are allAttributes and customAttributes.

Both tokens contain the same product attributes but their approaches are a bit different.

allAttributes is more generalized, meaning if you do not know what the product attributes attached to the member contract are, this token has you covered.

You will need a assign a variable name to associate this token with, then underneath, in double curly braces, write that variable dot the key and value discussed earlier to display in the email template. As a reminder, "key" is the form field, while "value" is the input in those fields.

In the screenshot below, the variable name assigned to allAttributes is attribute, and underneath, in double curly braces, it is assigned to key and value to be display in the email.

Here the key and value are separated by a bar, as shown in the template preview here.

customAttributes, in contrast, can be used if you know the key name already and simply wish the display the value.

Assign a variable name to associate the token with (here it is attribute), type a bar, then map the variable to the key. Then underneath, write your variable name inside double curly braces to display in the email template.

In the screenshot below, the variable name assigned to customAttributes is firstName, it is mapped to "First Name," and it is made to display the content of First Name in the email template.

Your value will now display in your email template.

Did this answer your question?