Attributes CSV Format
For use with:
The fields in your CSV depend on the type of audience you want to upload. You can upload lists for channels, named users, email addresses, or MSISDNsThe mobile phone number of an individual in your Airship audience. Each MSISDN represents an individual mobile device. , but you cannot mix identifiers. Attributes in your CSV should appear to the right of channel and registration identifiers — anything not included in the required or additional fields below.
When using email or SMS identifiers, Airship registers new channels for addresses or MSISDN/sender combinations that are new to your project. Use the additional fields to indicate opt-in statuses, so that you can send messages to new channels generated from your CSV upload.
|Channel type||Required fields||Additional fields|
1. Numeric, without leading 0.
- File size must not exceed 10 million rows or 1.5GB.
- The first field of the header row must be an identifier field.
- No more than 50 attribute fields.
- Date attributes use ISO8601 date-time format —
YYYY-MM-DDTHH:MM:SS. Set an offset by appending the date-time with
- One identifier per line.
- One attribute per cell.
- To ensure the support of special characters and accents, the file must be encoded to UTF-8 without BOM.
Attribute Lists for Channels and Named Users
If you know your audience’s Airship identifiers, you can use
named_user in your list. Whichever you use, the identifier must be the first field in your header row. Subsequent rows represent attribute names.
channel_id,fav_food,age,birthdate <id1>,pizza,18,2002-05-05T00:00:00 <id2>,burgers,22,1998-06-12T00:00:00 <id3>,sushi,27,1993-03-04T00:00:00
Attribute Lists for Email and SMS
You can also assign attributes to a list of email or SMS addresses, which can be helpful if you don’t know the Airship identifiers for your audience or you need to create new channels. When you upload an audience of email addresses or phone numbers, Airship generates new channels for email addresses or MSISDN/sender combinations it doesn’t recognize.
You should provide additional information in the CSV if you want to be able to send messages to new channels. While Airship will create new channels for addresses that don’t exist in our system, and fields containing
opted_in are optional, you cannot send messages to email or SMS channels that have not explicitly opted in to messages. If you want to be able to send messages to new channels, you must provide the appropriate date-time value when users opted in to messaging.
msisdn,sms_sender,ua_opted_in,fav_food,age,birthdate 5558675309,12345,2020-05-05T10:34:22,tacos,18,2002-05-05T00:00:00 5559867543,12345,2020-05-05T12:03:45,pizza,22,1998-06-12T00:00:00
Inline List CSV Format
For use with:
- Inline lists must be in CSV format.
- CSV files must be smaller than 1.5 GB.
- The header row must contain
ua_prefixed channel registration fields as column headers, with valid information in each field. Rows without valid data in each field are ignored.
- Include additional headers for information that you want to reference in templates.
- Array of JSON objects, each object representing an audience member.
- Requests are limited to 1,000
ua_prefixed channel registration fields as keys for each
- Include additional properties in each object that you want to reference in templates.
See the full Create and Send API documentation for definitions and requirements.
|Channel||Channel Registration Fields|
opted_in values for email and SMS channels are the date-time when the
user subscribed to messages.
2 Required for commercial emails, optional for transactional emails.
Inline List Object and Array Notation
For use with: Personalization
When you Upload Users to send a message, you can include complex arrays and objects in your CSV using object notation to represent object properties in the header. When referencing an array index, you must wrap the array index in brackets. Your CSV should include headers for each item in the array and each property in the object that you want to reference in your message.
For example, if you want to use an array of objects called
items for each member of your uploaded audience, your CSV will include
items.[#] for each item in the array. If each object in the array had
url properties, you would add
items..name, items..image, items..url to your CSV, and reference additional objects in the array by incrementing the index (e.g.
items. and so on).
Array indexes start at 0.
If you wanted to personalize an email to members of your audience based on their addresses and the names of items they’re interested in, you might format your CSV as follows:
ua_address,ua_commercial_opted_in,name,address.city,address.state,items..name,items..name email@example.com,2018-04-01T18:45:30,Joe Someone,Portland,OR,Rubber Gloves,Bleach Alternative firstname.lastname@example.org,2018-04-21T16:13:01,Sir Else,Seattle,WA,Flashlight,Shovel
Localization CSV Format
For use with: In-App Automation Localization
When localizing In-App Automation messages, you will upload a CSV file containing translations for each language and country combination that you want to localize your message for. Your localization CSV must represent the message elements that you want to populate with localized text or values. The first row contains your column headers, and each subsequent row in the CSV represents a different localization, broken down by language and country code.
id.language,id.country,header,body,button,button1.link,footer,footer.push_opt_in ,,Hi there!,Whatcha doin?,Not much,https://www.example.com/nada,Keep in touch,true de,DE,Guten tag,Was machst du gerade,Nicht viel,https://www.example.com/de/nada,den Kontakt halten,true
Your CSV must contain:
- A row with empty
id.countryvalues; this row represents the default localization for the message and is issued to users who do not match any of the language/country combinations in your CSV.
- Additional column headers corresponding to
data-ua-idvalues for the custom HTML elements that you want to localize. Custom HTML messages only.
Except for the default row,
id.language is required;
id.country is optional.
If you want to avoid sending a message with the default localization values to members of your audience who don’t match the language and country information specified in your localized CSV, you can target specific users by localeThe combination of a language and country. A user’s locale is determined by their device settings. in the Audience step. This will ensure that your message only goes to users with the locales specified in your CSV.
Column headers for ALL messages:
id.language— The two-letter language code associated with this translation. Acceptable values are defined by ISO 639-1.
id.country— The two-letter country code associated with this translation. Acceptable values are defined by ISO 3166-1.
<custom>.key— Any header ending in
.keyis treated as a “custom key” or “extra”, where the key is the section of the header preceding .key (e.g., the key for custom.key would be “custom”). The value in each row represents the localized information that you want to pass to the key.
Column headers for Banner, Modal, and Fullscreen messages:
header- Sets value for Header text.
body- (Required) - Sets value for Body text.
footer- Sets value for Footer text. Fullscreen and Modal styles only.
footer.<Action>- Associates an action with tapping the footer. Deep Link and Link actions are supported for the footer. Fullscreen and Modal styles only.
button<N>- Sets value for Nth button text. The number of supported buttons varies per layout. At least 1 is required for all layouts.
button<N>.<Action>- Associates an action with the Nth button. The number of supported buttons varies per layout. At least 1 is required for all Layouts).
Column headers for Custom HTML messages:
When building your Custom HTML message, you will assign a
data-ua-id attribute with a unique string value to any element that you want to localize. You will then represent your
data-ua-id attributes as column headings in your localization CSV; Airship uses these
data-ua-id values to associate localized text or values with your Custom HTML. For example, you can populate localized text for an
h2 element with
data-ua-id="flooble" by placing a
flooble heading in your CSV.
By default, Airship treats elements with
data-ua-id as text, but you can also add additional “type” attributes to elements to tell Airship how to render localized values in your HTML message.
data-ua-text— Airship inserts the localized value as a plain text node into the parent element, with new lines converted into
data-ua-link— Indicates that the element supports “actions”. This places an anchor tag (
<a>) immediately inside the element, wrapping the contents of the element. You determine the type of action and the action value in your CSV. You can combine this with other attribute types, wrapping the total contents of the element in an anchor tag.
data-ua-image— Airship will insert an
<img>tag in the parent element, using the translated value as the
data-ua-video— Airship will insert a
<video>tag in the parent element using the translated value as the video’s
src. The video tag also includes a
<div data-ua-id="header" data-ua-text></div> <div data-ua-id="hero" data-ua-image></div> <div data-ua-id="body" data-ua-text></div> <div data-ua-id="button" data-ua-link></div>
id.language,id.country,header,hero,body,button,button.link ,,Hey dude,https://example.com/image.jpg,check this out :point_up:,cool,https://example.com/coolimage es,MX,hola amigo,https://example.com/es/image.jpg,mira esto :point_up:,bueno,https://example.com/es/coolimage
For use with: In-App Automation Localization
You can assign an action to any element in your custom HTML that has a
data-ua-link attribute. You assign actions by adding a column in your CSV with the
data-ua-id of an element and
.<action_type>. For example,
flooble.deep_link would represent a deep link action for an element with a
flooble; the value in each row would be the deep link for each localization.
You must set your HTML actions in your localization CSV. You cannot set HTML actions in the composer. (You can set and edit actions in the composer for non-HTML messages.)
deep_link- Deep Link action.
link- Link (external URL) action; the corresponding value must be a valid URL.
share- Share action; the corresponding value is the text provided to the share dialog.
push_opt_in- Push Opt-In action; the corresponding value must be “true” to enable.
location_opt_in- Location Opt-In action; the corresponding value must be “true” to enable.
app_rating- App Rating action; the corresponding value must be “true” to enable.
app_rating.title- Sets the title of the App Rating modal; this key is optional and ignored if
app_ratingis not “true”.
app_rating.body- Sets body of App Rating modal; this key is optional and ignored if
app_ratingis not “true”.
Uploaded List CSV Format
For use with:
Uploaded lists must be in CSV format. CSV files can contain up to 10 million
Named UsersA customer-provided identifier used for mapping multiple devices and channels to a specific individual.
or channel IDs, and be up to 1.5 GB. Each row in the CSV must be
identifier_type is one of:
identifier is the associated
named_user,customer-42 named_user,room-27 ios_channel,5i4c91s5-9tg2-k5zc-m592150z5634 web_channel,d132f5b7-abcf-4920-aeb3-9132ddac3d5a android_channel,52b2b587-0152-4134-a8a0-38ae6933c88a