Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The XML interface

BACKCLICK offers the feature to receive structured content and control information from external systems (i.e. content management systems, process automation systems). The data format used is XML.

Tasks, usage of the XML interface and the way it works

BACKCLICKs XML interface can be used for two different tasks:

  • Transfer of structured content to BACKCLICK to display (and/or send) it as sorted lists within newsletters. These lists contain single datasets that have to be provided to BACKCLICK as XML data. You can, for example,
     take the newest sports news, delivered as XML, and use them within your newsletter in regards to every single subscriber’s interests.
  •  Control of compilation and distribution of newsletters to compose and even send entire HTML or text newsletters with external systems with the aid of specific XML attributes.

The way the XML interface works

All XML data that gets “pushed” by external systems have to be put in the “~/XMLImport” folder. These datasets can be put via FTP, NFS, SMB or any other way. The variant used is your choice. The control process MCP is responsible for importing. If the datasets contain any newsletter generating control dataset, the MCP generates those and even sends them, should the delivery date be set to NOW or the past. Without any control datasets within the XML data they get added to BACKCLICKs own content database. Use the administrator surface (Campaign - Management -> Contentmanager) to take a look at or delete any content of this database as needed. Editing is not provided.

Usage of the XML interface

The following deals with how to generate structured lists from imported XML data and how to send those as newsletters by email. BACKCLICK uses its own programming language (GIS-API). This programming language is explained in detail on the basis of examples. Likewise the possibility to generate and send entire newsletters via XML without the use of the administrator interface is explained. Since the following chapter uses automatic substitution of user defined keywords with certain content, called GIS-SUBSTITUTION, we start with the explanation of this feature.

GIS-SUBSTITUTION

You will certainly encounter text passages that are repeated over and over again within your newsletters. To ease insertion of these text passages the GIS-SUBSTITUTION feature was introduced. This feature replaces certain expressions with expressions or text passages defined by you. You can find the “Substitutions-Manager” in the menu under “System-Administration -> Substitutions”. Clicking the edit button opens up an overview of keywords that get replaced with certain content when composing and sending newsletters. Use this overview to add new keywords or take a look at, modify or delete existing ones.

Clicking the button opens up a new input box, use the left-hand side for the keyword you want to replace and the right-hand side for the content you want to replace it with. Clicking “save” ends the assignment. But it’s not only replacing keywords or links that can be automated. The main advantage of GIS-SUBSTITUTIONs is providing each editor with complex GIS_API assignments (BACKCLICKs integrated programming language). GIS_API allows you to fully automate the content of your newsletters. Content from any source, added to the BACKCLICK system in the folder “~/XMLImport” as XML data, can automatically be imported, sorted and displayed in a certain format using the GIS_API. The following example explains how to compose and dispatch newsletters automatically.


XML interface – controlling composition and dispatch of newsletters

The following XML attributes, provided to BACKCLICK in the XML control dataset, controls the dispatch of a newsletter. The XML data has to be added to the “~/XMLImport” folder. The following example shows how an XML file like this has to be built.


Code Block
themeEclipse
languagexml
collapsetrue
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<FILE>
<META NAME="NEWSLETTER-NO">1</META>
<META NAME="NEWSLETTER-SUBJECT">Heise News Flash $$VORNAME$$</META>
<META NAME="NEWSLETTER-PUBLISH-DATE"></META>
<META NAME="NEWSLETTER-STATUS">0</META>
<META NAME="NEWSLETTER-AUTHOR-LOGIN">bcadmin</META>
<META NAME="NEWSLETTER-DESCRIPTION">XML Test</META>
<META NAME="NEWSLETTER-PRIORITY">3</META>
<META NAME="NEWSLETTER-ATTACHMENTS">test.pdf</META>
<META NAME="CONTENT-MAIN">Beispiel für Text</META>
<META NAME="CONTENT-ALTERNATIVE">Das ist die Textversion</META>
</FILE>

The XML attributes will be explained in detail below:

NEWSLETTER-NO

This returns a number between 1 and n that specifies the number of the “Newsletterlist” used for delivery of the newsletter.

NEWSLETTER-SUBJECT

This relates to the subject of the newsletter. You can use personalizing fields like “$$VORNAME$$” or “$$ORT$$” al well.

NEWSLETTER-PUBLISH-DATE

This determines the mailing date of the newsletter. You can specify several formats for the mailing date:

  • “now” – immediate delivery as soon as the XML file gets activated
  • tt.mm.yyyy hh.mm” – 01.01.2003 11.11.00 specification to-the-minute
  • “dddddddddd” – Unixtime (10-digit specification in seconds since 1970)

NEWSLETTER-STATUS

This allows you to specify whether you want your neswsletter to be visible in your administrator interface under “Edit existing campaign” after creation. You can schedule the newsletter to be created with a certain mailing date, added to the list of newsletters to be delivered and sent automatically as well. The states/statuses are as follows:

  • state/status 0 – “Draft” (shows up under “Campaign - Management: Edit existing campaign”)
  • state/status 1 – “Mailable” ( shows up under “Publish Campaign”)
  • state/status 2 – “Mailable” with a set mailing date ( shows up under “Publish Campaign”)
  • as soon as you specify a NEWSLETTER-PUBLISH-DATE the state/status is set to “2”

NEWSLETTER-AUTHOR-LOGIN

This specifies a name. This name represents the author of the newsletter and is displayed in the overview of created or “Mailable” newsletters.

NEWSLETTER-DESCRIPTION

This specifies the brief description of the newsletter to be able to relocate it in your archive.

NEWSLETTER-PRIORITY

This specifies the priority displayed at your recipient.

NEWSLETTER-ATTACHMENTS

This specifies a filename. This file already has to be located in the BACKCLICK-System as attachment.

CONTENT-MAIN

This specifies the HTML/text part. Please make sure to replace all “<” with “<” and all “>” with “>”.

CONTENT-ALTERNATIVE

This specifies the alternative text part for newsletters. Now you know how an XML file has to be built and which <META> tags to use in order to dispatch a newsletter automatically. The following will explain which GIS_API assignments to use in order to make BACKCLICK import and display content of this XML file.

 

Code Block
themeEclipse
languagexml
collapsetrue
 <GIS>

READ <<UEBERSCHRIFT>>
FOREACH {PRINT"<<UEBERSCHRIFT>><BR><BR>" }
CLEAR

READ <<HEADER>>
FOREACH {PRINT "<<HEADER>><BR><BR>" }
CLEAR

READ <<BODY>>
FOREACH {PRINT "<<BODY>><BR><BR>" }

</GIS>

With the help of these assignments you can import information from BACKCLICKs internal content database and return them sorted. Please keep in mind that each GIS_API assignment gets explained in detail in the chapter “Individualization”. You can provide your editors with GIS_API assignments by saving them with the help of “Substitution” (Name: sample_ru).

All the editor has to do now is inserting the expression “sample_ru” into a template that gets published with the newsletter and the newsletter and its corresponding content is displayed as specified by the GIS_API assignments. Below you can see the HTML code of an example template. Create a template under the “Campaign templates” and insert the following code. Name the template “XMLImport”.

 

Code Block
themeEclipse
languagexml
collapsetrue
 <HTML>
<BODY bgcolor="#cccc99" text="black">
<font face="verdana" size="2">
<STRONG>Sehr $$geehrter$geehrte$$ $$ANREDE$$ $$NACHNAME$$,
<BR><BR> beispiel_ru <BR><BR>
Mit freundlichen Grüßen<BR><BR>
Ihre Newsletter-Redaktion</STRONG></font>
</BODY>
</HTML>

 

Create an XML file with the following attributes:

  • UEBERSCHRIFT
  • HEADER
  • BODY
  • CONTENT_SOURCE
  • CONTENT_ID

The XML file should look like this:


Code Block
themeEclipse
languagexml
collapsetrue
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<FILE>

<META NAME="UEBERSCHRIFT">Blindflug mit Windeln</META>
<META NAME="HEADER">Abenteurer und Multimilliardär Steve Fossett über seinen waghalsigen Rekordversuch, allein in einem
Düsenflugzeug nonstop die Erde zu umrunden.</META>
<META NAME="BODY">Alles, was ich brauche, ist längst im Flugzeug. Nun warte ich nur noch auf günstiges Flugwetter. Derzeit führt der
Jetstream über den USA zu Turbulenzen. Ich hoffe, dass es ab dem 16. Februar ruhiger wird - das sagt zumindest mein Chefmeteorologe,
der von Belgien aus das Wetter für mich überwacht.</META>
<META NAME="CONTENT_SOURCE">BACKCLICK</META>
<META NAME="CONTENT_ID">283476</META>

</FILE>

By adding this XML file to the folder “~/XMLImport” the content of the file is read/imported and added to the content database. Using the template above to create a newsletter will display the following:


 

Abb. 11.18.1 - Newsletter mit Template erstellt 

Please open the “preview window” and activate “personalize” and “individualize”. You’ll see a newsletter formatted accordingly.

 

Abb. 11.8.2 - Vorschau auf individualisiertem Newsletter mit externem XML Content

The example above should give you an insight into the possibilities of GIS_API based on a sample case. More details about the possibilities and scope of operation of the XML interface and the script language GIS_API can be found in the chapter “individualization”. Please keep in mind that this is a technical chapter and little or not at all suited for editors.