External Content

In some cases content for the article containers is not added manually in Express or retrieved directly from an article list, but is loaded from an XML or an RSS feed.

 

 

XML Pull

If you have the content for your newsletter available in another system, you can generate an XML file in the proper format (see below) and place that file on a server. In Express, that file is loaded to fill the newsletter.

Adapt the template properties

When an XML is used to provide the articles, the email template must be configured as following:

Set the location of the XML where content must be retrieved. When creating a new email in Express the content for the articles will be retrieved from this XML location.

By checking the option 'Enable re-sync after initial load', you will always be able to retrieve the most up-to-date content for your email in Express. In Express the button 'Synchronize content' will be active. Clicking it retrieves the XML again (if it has been edited) and checks which articles are already in the email. Existing ones will be updated, new ones will be added to the email.

When the articles are loaded from the XML, existing articles are updated and new articles are inserted. To identify the articles that are inserted via XML or RSS, it is recommended to add a GUID unique identifier field (GUID) to the article list. GUID stands for 'Globally unique identifier'. Existing articles are updated based on this GUID. Without a GUID field, all articles are inserted, even if they are already added to the email. Without a GUID field there is no way of determining which is a new or already inserted article. Make sure to set this field as a key field. see Configuring the fields in the article container.

To set the key field, right click the field in the container and choose 'Properties'. Check the option 'This is a key field'.

 

 

Create the XML file

Now, the structure of the XML that provides the content must respect the structure of the template: Dynamic text, html or image and article fields. An example XML can be generated by using the 'Automation XML' option in the 'Action' menu available from the toolbar of the email template:

A dialog pops up. For XML Pull, no parameters need to be set, these are needed when using Broadcast API (see below). Click the Update button, the XML is generated in the lower section of the dialog.

 

The structure of the XML looks like this:

<?xml version="1.0" encoding="utf-8"?>
<API>
<PARAMETERS>
<PARAMETER TYPE="TEXT" NAME="PARAMETERNAME1"><![CDATA[content]]></PARAMETER>
<PARAMETER TYPE="HTML" NAME="PARAMETERNAME2"><![CDATA[content]]></PARAMETER>
<PARAMETER TYPE="IMAGE" NAME="PARAMETERNAME3"><![CDATA[content]]></PARAMETER>

<PARAMETER LISTID="ARTICLELISTID" NAME="ARTICLECONTAINERNAME">
<ARTICLE>
<CREATED_DT><![CDATA[20010101]]></CREATED_DT>
<MODIFIED_DT><![CDATA[20010101]]></MODIFIED_DT>
<ARTICLEFIELD1><![CDATA[content]]></ARTICLEFIELD1>
<ARTICLEFIELD2><![CDATA[content]]></ARTICLEFIELD2>

<GUID><![CDATA[1234]]></GUID>
</ARTICLE>
</PARAMETER>
</PARAMETERS>

</API>

The parameter names correspond with the name of the article containers in the 'Used in this email' section in the Editor. When a type is specified for the parameter, this corresponds to dynamic text, image or html parameters added to the email template:
- Each XML file starts with a version number and character encoding
- The XML is encapsulate in a <API></API> node
- the <PARAMETERS> node
- <PARAMETER TYPE="TEXT" NAME="PARAMETERNAME1"> is a Dynamic text parameter with name PARAMETERNAME1
- <PARAMETER TYPE="HTML" NAME="PARAMETERNAME2"> is a Dynamic HTML parameter with name PARAMETERNAME2
- <PARAMETER TYPE="IMAGE" NAME="PARAMETERNAME3"> is a Dynamic Image parameter with name PARAMETERNAME3
- <PARAMETER LISTID="ARTICLELISTID" NAME="ARTICLECONTAINERNAME"> will hold all article data. Each article is within an <ARTICLE></ARTICLE> node. LISTID will be 0 (zero) for article containers with "internal storage" selected, otherwise the article list ID will be filled in.
- Each article has nodes matching the article field names e.g. <ARTICLEFIELD1>, <ARTICLEFIELD2> etc.
- Content of each parameter is encapsulated in a CDATA section

 

NOTE: if images are used in the template, these must be uploaded to a web folder in Campaign and the image urls in the XML must point to the uploaded images. This way the images are on the same server as where the message is sent from. Emails with images pointing to a different server than where the email was sent from might be considered spam. To facilitate this, Selligent can provide an aspx script that will download the images from the locations specified in the XML to a web folder and refer to the correct locations. This aspx file use then used content location in the template properties. For more information contact your Selligent account manager.

Load the articles in Express

When creating an Express email based on a template with content from an XML use the button 'Synchronize content' in the toolbar of Express. A dialog pops up to download the content for the email. The overview at the bottom shows the number of articles that have changed since the last download. If a key field (E.g. GUID) is defined, articles already present in the email will be updated, new articles will be inserted.

NOTE: it is possible to modify the location of the XML before clicking the Download button.

Press the 'Download' button to retrieve the structure of the XML, check the checkboxes for articles and dynamic parameters that must be inserted or updated and click 'OK'.

The articles can still be edited in Express (if the fields that you want to edit are not indicated as 'Not editable' in the article container of the template). After editing an article and synchronizing its content again with the XML, the changes you made manually will be overwritten (update). If the article is stored in an article list, updating from the XML will also update the stored article data.

 

 

RSS

It is also possible to pull content from RSS-feeds to fill the email. In this case the RSS location must be specified in the article container properties.

Adapt the Article container properties

To be able to do this, you need to open the template in the Editor and define following properties for the article container:

  • Source: internal storage
  • Feed: the RSS feed from where articles must be loaded. This is an URL that points to the location of the RSS file.

Use the 'Check' button to show the structure of the RSS feed and to create the fields.   A pop-up will show you the possible fields from the RSS feed:

All fields listed in the RSS structure will be added to the article container, if they didn't already exist.

RSS feed structure: An RSS feed always starts with an <rss> node, which contains an attribute called version. E.g. <rss version="2.0"/>. The child of the <rss> node is the <channel>. This node is the containing element for the content within the feed. The <channel> has <item> nodes. These are the articles used in the article container. Each time has child-nodes, e.g. <title>, <description>...  These are the field names used in the article container.

 

Existing fields that are not in the RSS feed will not be removed from the article container. Make sure you remove them or only use the fields from the feed.

It is possible to change the storage of the article container to the article list. This has the advantage that all articles collected from the RSS feed will be stored in the article list. Your article list must have the same fields (with the same name) as the RSS feed.Create them first in the article list.

    • After first selecting the RSS feed in your template, change the source from "Internal storage" to the new article container without removing the RSS feed.
    • If you need to change the RSS afterwards, change the source back to "Internal storage".

Important note: If the RSS feed has name spaces in the nodes (e.g. DC:SUBJECT) you can only use internal storage for your article container because the semicolon ':' is not allowed as field name in an article list.

Loading articles

Same as for XML Pull (see above), when creating an Express email based on a template with content from an XML use the button 'Synchronize content' in the toolbar of Express. A dialog pops up to download the content for the email. The overview at the bottom shows the number of articles that have changed since the last download. If a key field (E.g. GUID) is defined, articles already present in the email will be updated, new articles will be inserted.

The RSS source is filled out and cannot be edited. Dynamic parameters such as Dynamic text, cannot be imported with RSS simply because they are not used in an RSS feed structure. Click 'OK' to load the articles.

XML Push (Broadcast API)

A third option is to externally send an XML via the broadcast API to create and send the entire newsletter in Selligent. In this case Express is not used to create the newsletter. In fact, the newsletter can be created and send without opening Campaign. In addition to the newsletter content (articles, dynamic parameters) the XML also defines values for the journey name, start date, email folder location etc.

For information on how to work with the Broadcast API consult the Broadcast_API PDF on the Selligent Support portal.

An example XML can be generated by using the 'Automation XML' option in the 'Action' menu available from the toolbar of the email template. See XML Pull above for more information. Fill out the journey name, email name, email folder, Audience (target) list, segment (optional) and constraint (optional). These will be added to the XML example.

The structure of the XML looks like this:

<?xml version="1.0" encoding="utf-8"?>
<API>
<CAMPAIGN STATE="DESIGN" FOLDERID="123" NAME="Journey name" START_DT="20220101"/>
<EMAILS>
<EMAIL FOLDERID="123" NAME="Email name" TEMPLATEID="123">
<TARGET SEGMENTID="123" LISTID="123" CONSTRAINT="Some constraint"/>
<PARAMETERS>
<PARAMETER TYPE="TEXT" NAME="PARAMETERNAME1"><![CDATA[content]]></PARAMETER>
<PARAMETER TYPE="HTML" NAME="PARAMETERNAME2"><![CDATA[content]]></PARAMETER>
<PARAMETER TYPE="IMAGE" NAME="PARAMETERNAME3"><![CDATA[content]]></PARAMETER>

<PARAMETER LISTID="ARTICLELISTID" NAME="ARTICLECONTAINERNAME">
<ARTICLE>
<CREATED_DT><![CDATA[20010101]]></CREATED_DT>
<MODIFIED_DT><![CDATA[20010101]]></MODIFIED_DT>
<ARTICLEFIELD1><![CDATA[content]]></ARTICLEFIELD1>
<ARTICLEFIELD2><![CDATA[content]]></ARTICLEFIELD2>

<GUID><![CDATA[1234]]></GUID>
</ARTICLE>
</PARAMETER>
</PARAMETERS>

</EMAIL>
</EMAILS>
</API>

The parameter names correspond with the name of the article containers in the 'Used in this email' section in the Editor. When a type is specified for the parameter, this corresponds to dynamic text, /image or html parameters added to the email template:
- Each XML file starts with a version number and character encoding
- The XML is encapsulate in a <API></API> node
- <CAMPAIGN> attributes are the journey STATE (DESIGN,TEST,ACTIVE or HOLD), the journey folder ID, the journey name and the journey start date (if state is ACTIVE)
- the <EMAILS> node
- <EMAIL> attributes are the email folder ID, the email name and the template ID
- <TARGET> attributes are the audience list ID (LISTID), an audience list segment ID (SEGMENTID, optional) and an additional CONSTRAINT (optional)
- the <PARAMETERS> node
- .<PARAMETER TYPE="TEXT" NAME="PARAMETERNAME1"> is a Dynamic text parameter with name PARAMETERNAME1
- <PARAMETER TYPE="HTML" NAME="PARAMETERNAME2"> is a Dynamic HTML parameter with name PARAMETERNAME2
- <PARAMETER TYPE="IMAGE" NAME="PARAMETERNAME3"> is a Dynamic Image parameter with name PARAMETERNAME3
- <PARAMETER LISTID="ARTICLELISTID" NAME="ARTICLECONTAINERNAME"> will hold all article data. Each article is within an <ARTICLE></ARTICLE> node. LISTID will be 0 (zero) for article containers with "internal storage" selected, otherwise the article list ID will be filled in.
- Each article has nodes matching the article field names e.g. <ARTICLEFIELD1>, <ARTICLEFIELD2> etc.
- Content of each parameter is encapsulated in a CDATA section

Back to Express email