Contact properties are fields that are stored on a user's profile. Iterable offers some built-in profile fields, which are detailed in our Iterable-Specific Fields article.
If you pass Iterable the "ip" field for the ip address for each user, we will also add the fields "city", "country", "state" and "timeZone" to the user profile. Setting the "ip" or "timeZone" fields on user profiles allow for messages to be sent at a specific local time. Learn more about that here.
Note: Data types (string, boolean, double, etc.) cannot be changed for user and event fields once set.
You can add contact properties to a user's profile in a few different ways. Here are the two most common ways:
1. Uploading a CSV list with contact properties
You can import users with their contact properties if you have a CSV file with 1 column of emails and other columns of contact properties. Uploading a CSV with new values for existing contact properties will overwrite the existing contact properties.
2. Calling the Update Users
Calling the update users API and passing in contact properties in the dataFields section will add or update the contact properties on a user's profile.
Check out our API Overview for JSON payload examples.
Viewing a User's Contact Properties
You can view the contact properties on a user by viewing the user profile.
Inserting Contact Properties in Messages
You can insert contact properties into emails, push and SMS messages by including the contact property in double curly braces like so:
Here we are storing the first name of the user in the field, firstName. Remember that contact properties are case and space sensitive. For a contact property with spaces, you can use:
How the Commerce API Affects User Profiles
The updateCart API is designed to be used whenever a user adds an item to her shopping cart. It adds the the array shoppingCartItems onto the user profile as a contact property. Each shoppingCartItem can contain other attributes such as price, quantity, sku, category, etc, which can all be used in an email, push or SMS template.
When the trackPurchase API call is made, it removes all the shoppingCartItems on a user's profile.