Articles on: Integrations

Guide to automatic database import and delivery generation

Description and functional scope



It allows adding a contact to an existing profile in the system, including all the personalized information that has been defined in it. If the contact exists (email address) the custom fields provided will be updated. The existing information in the custom fields that are not supplied will remain unchanged.

The purpose of the process is to automate the import of databases and the consequent creation of shipments in ICOMM, based on the information coming from external systems integrated through it.

The flow starts when the client deposits a couple of files (those required for the correct creation of the shipment) in a defined folder of an SFTP repository. Every N minutes (agreed and pre-defined time), the existence of files to be processed is automatically verified. Once the files are
processed, they are removed from the original location, storing a local copy on ICOMM's servers. These copies are kept for 30 days.

SFTP Repository



The repository is an SFTP repository and has the security required to be able to carry out this type of integration. For any questions, write to support@icommkt.com. In the defined space, it is convenient to generate a subfolder for exclusive use for this process.

Entry Process



File Naming
As mentioned in the Functional Scope section, for each shipment that you want to trigger automatically, two files are required:

[FILE_NAME].xml= where FILE_NAME represents the name of the campaign/send. For example, EXAMPLE_CUSTOMER_WELCOME.xlm
[FILE_NAME].csv= where FILE_NAME represents the name of the profile that will be created on the platform to associate with said submission. For example, EXAMPLE_CUSTOMER_WELCOME.csv

The name of both files must MATCH for the process to complete fully.


File structure



[FILE_NAME].xml

<?xml version="1.0" encoding="UTF-8"?>
-<ArchivoXML>
<Email></Email>
<FromName></FromName>
<ReplyEmail></ReplayEmail>
<StartDate></StartDate>
<Subject></Subject>
<PreHeader></PreHeader>
<HtmlMessage></HtmlMessage>
<Group></Group>
<Action></Action>
<Campaign></Campaign>
<ViralMarketing></VIralMarketing>
<SocialNetworks></SocialNetworks>
<Testing></Testing>
<SendGoogleAnalytics></SendGoogleAnalytics>
</ArchivoXML>


Email*: FROM EMAIL (must be a sender declared in the platform on the domain of the instance)
FromName: Sender of the shipment (if it is not sent, it takes the default declared for each instance)
ReplyMail: Reply TO Email (must be a reply account declared in the platform on the domain of the instance)
StartDate: Send start date YYYY-MM-DD HH24:MI:SS (default: NOW + 10 minutes)
Subject*: Subject of the shipment. The nomenclature for customizing fields in the HTML of the piece and/or in the subject is: <*FIELD_NAME*>. For any doubt in this regard, consult the ICOMM documentation.
PreHeader*: Send PreHeader
HtmlMessage*: URL of the HTML piece to send. The nomenclature for customizing fields in the HTML of the piece and/or in the subject is: FIELD_NAME>. For any doubt in this regard, consult the ICOMM documentation.
Group*: Name of the Profile to send (must be the same as the name of the CSV file and the XML)
Action*: Name of the shipping configuration (must be the same as the name of the CSV file and the XML)
Campaign*: Name of the campaign associated with the shipment
ViralMarketing: true/false if the "Send to a friend" option is enabled
SocialNetworks: if you want to activate the option to share on social networks. Must contain a comma-separated string of the following values ​​->

1-Facebook
2- Twitter
3 - Linkedin
4-Google Plus
5-Pinterest
6-Whatsapp
Send empty if you do not want to include the logo of any social network (default: empty)

Testing: true/false if you want to mark the submission as TESTING on the platform (default: false)
SendGoogleAnalytics: true/false if you want to include the google analytics tags in the links of the pieces automatically as the platform does (default: false)

[FILE_NAME].csv
The CSV file contains the structure of the profile or database to which the part will be sent. In all cases, the email field must be included as required. Any other custom fields in the part must be present as fields in the CSV file.
Email*: destination EMAIL

Process Circuit



Based on the information contained in the pair of files already defined, the process will perform the following actions:

Every N minutes, the existence of new files to process is verified in the aforementioned folder. If there are files, proceed with the following steps detailed here. If not, the process enters standby until the next interval of N minutes has elapsed.

If there are files, the profile is created with the structure defined in the first line of the CSV file (it is required that the file contains the relevant headers in the first row). If it is a previously existing profile, it is verified that there are no new columns to be incorporated and in such
case they are attached to the current structure.

The data included in the CSV file is imported into the profile created in the previous step.

The URL of the piece to be sent is obtained from the HTMLMESSAGE attribute of the XML file and we proceed to create the newsletter within the platform, assigning the FILE_NAME as a reference for its name. If there is a previous version of a piece with that name, the system checks the current HTML content in relation to the last one imported to verify if it is necessary to generate a new version of the newsletter. In such a case and if there are variations, a FILE_NAME_v[N] is generated as a reference name and as appropriate.

The shipment is generated with the parameters established in the XML file. If the STARTDATE attribute cannot be obtained from it, the shipment is scheduled 10 minutes in advance (it is also recommended, for reasons of guarantee of completion of the previous stages, that a shipment is NEVER scheduled with a Date and Time prior to the following 10 minutes). .

The processing is in real time and the shipment is set on the platform. In all cases, by accessing the platform, you can view the objects created, as well as the results of the imports (see ICOMM documentation) and follow the results of each shipment in real time. The file check is scheduled to take place every 10 minutes and once the files are processed, they are deleted from the SFTP repository.

Updated on: 05/31/2023

Was this article helpful?

Share your feedback

Cancel

Thank you!