Uploading a CSV file to generate content for delivery is a feature used to support Multilingual Push notifications. The format of the CSV file needs to adhere to certain guidelines for the file upload to be successful and consequently to be able to create a delivery. The following sections describe the file format and the considerations thereof.

File Format

Multilingual push requires 14 columns in the CSV file:

title

messageBody

sound

badge

deeplinkURI

category

iosMediaAttachmentURL

androidMediaAttachmentURL

isContentAvailable

isMutableContent

customFields

locale

language

silentPush

Please check the CSV sample by clicking the Download a sample file in the Manage Content Variants window. For more on this, refer to the multilingual push notification documentation.

Custom Fields: use JSON format for the custom fields, e.g."{""key1"":""value1"",""key2"":""value2""}". Refer to the sample file above for an example of custom fields.

isContentAvailable: flag for Content Available check, value 1 implies true, value 0 implies false. The default value is 0. If customer leaves this column blank, the value will be considered 0.

isMutableContent: flag for Mutable Content, value 1 implies true, value 0 implies false. The default value is 0. If customer leaves this column blank, the value will be considered 0.

locale: locale is the field for language variants, e.g. "en_us" for US-English and "fr_fr" for France-French.

language: name of the language which is associated with the locale. For example, if locale is "en_us", the name of the language should be " English-United States".

silentPush: flag for the push notification type. If it is a regular push notification, the value should be 0. If it is a silent push, the value should be 1. The default value is 0. If customer leaves this column blank, the value will be considered 0

Constraints and Guidelines for the creation of csv file

Name of each column is fixed. You should include the name of each column in the CSV file, if you don't use any columns for the content, leave it blank.

"locale" and "language" columns are mandatory and value is unique for each row. A blank value for this column will result in a failure of the file upload.

Order of columns matters. The order of the columns in the uploaded file needs to follow the same format as the sample file.

Since this is a CSV (stands for Comma-Separated Values) file, any column content which includes comma (,) has to be quoted. For example, "Hello, Tom!"

UTF-8 encoding is necessary for international characters.

If you generate the file by plain text, separate each column by ","

This format works for both iOS and Android push.

Insertion of personalization field in the csv file

When you want to use personalization fields, you should include <span> tag in the file. Refer to the following example:

To insert "firstName" personalization field in messageBody, the message needs to be " Hello <span class="nl-dce-field nl-dce-done" data-nl-expr="/context/profile/firstName">First name</span>, this is message".

In the span there are two mandatory attributes:
- One is class which is static. No matter which personalization field you plan to use, it will always be class="nl-dce-field nl-dce-done".
- Another one is data-nl-expr which is the path of personalization field. For example, if you insert "firstName" personalization field from UI, the navigation path will be context→profile→firstName (as shown in the image below). In this case the path will be /context/profile/firstName. data-nl-expr="/context/profile/firstName".