Skip to main content

Importing and exporting a message template

Description

This functionality allows you to upload a message template to the platform or download it to your device. This can be a template for one channel, or for several channels at once. A zip file is used for export and import.

The corresponding buttons are available in the template editing window in the upper right corner:

— template import

— template export

Template import

To import a template into the platform, click on the icon . Next, click on the download area and select the zip file on your device.

Set up the import:

  1. Select the channels for which you want to import the template (Email, SMS, Push).
  2. Resolve import conflicts. Conflicts arise if the data being imported and the data already stored in the platform are different. The table shows the old and new value. If you want to update the data, check the "Replace" column.

Click Accept to start the import process.

Zip file structure

A zip file is used for import. The archive must have a certain structure:

<catalog_name>/
<channel_name>/
<fieldname>.<type>
<attach>/
<fileid>/
<filename>
images/
<image_name>
template.json

Structure description:

ElementExampleDescription
<catalog_name>template_newsletterRoot directory. You can use an arbitrary name.
<channel_name>email
sms
push
The directory contains template data for a specific send channel. The directory name must match the channel.

Import of Email, SMS and Push templates is available.

Information about which files can be imported for each channel can be found here.
imagesimage_1.pngDirectory for storing images
template.jsonThe file contains general data about the template (link to dynamic JSON content, additional settings, fragments and parts).

You will find more detailed information below.

Zip file example

template_123/
email/
html.html
text.txt
subject.txt
images/
image_1.jpeg
template.json

Description of fields for each channel

FileExampleDescription
html.html
<html>Hello, world!</html>
HTML version of the message
text.txtHello, world!Text version of the message
subject.txtBest books 2022Subject line
amp.txt
<html>Hello, world!</html>
AMP HTML version of the message
is_amp.txtfalseIs there an amp version in the template or not
is_not_inline.txttrueDo not convert CSS to inline
from_email.txtawesome@example.comSender's email
from_name.txtAwesome BooksSender's name
replyto_email.txtreply_awesome@example.comReply-to email
replyto_name.txtAwesome Books
attach (directory)023f-ad8c-4412-9bba-16ac/
   attach_file.pdf
Directory for storing attached files.

It contains additional directories, each containing a separate file.
Arbitrary names can be used to name additional directories.

template.json file

This file contains data that is displayed in the "Options" and "Content" blocks.

template.json example

template.json
{
"json_url": "https://altkraft.com/example/content.json",
"suppress_id": 1,
"is_unsub_to_supp": true,
"field_overrides": {
"lead": {
"_fname": "client"
}
},
"parts": []
}

Description of fields in template.json

FieldExampleRequiredDescription
json_url"https://altkraft.com/example/content.json"NoDynamic JSON content URL
suppress_id1NoSuppression list ID
is_unsub_to_supptrueNoAdd unsubscribers to the attached suppression list
field_overrides
{
   "lead": {
      _fname": "Client"
   }
}
NoCustomer data placeholders
parts
[
   {
      "name": "part_1",
      "shortname": "part_1",
      "type": "text",
      "content": ""
   },
   {
      "name": "part_2",
      "shortname": "part_2",
      "type": "text",
      "content": ""
   }
]
NoTemplate parts
tip

You can export any template from your account to get an example of a zip file to import.