Table of Contents

Importer

In Verison 1.87 a new feature was integrated, which will help you to Import csv-Files and do individual tasks for every line from the file.

The basic idea behind this feature is to create a system, which could be used to import data in every possible csv-format. That means the csv don't need to have a default structure like this:
row1 ⇒ record1
row2 ⇒ record2
row3 ⇒ record3

You could create a process which could handle the following structure (Only an example): row1 ⇒ record1 basic data
row2 ⇒ additional information to record1 (products, …)
row3 ⇒ additional information to record1
row4 ⇒ record2 basic data

You only have to implement this process in the Workflow Designer. (At the moment I only have a far idea how this could be implemented, but it should be possible.)

Please following the following steps to use this feature: (You could integrate other tasks, but this should be the basic structure)

You could use the first example as start of the workflow.

  1. At first you have to create a Workflow with the Trigger “Import Process”. This makes the Workflow invisible in situations, different than import.
  2. After you set the Trigger to “Import Process” you have to reload the Workflow Designer Page, because there will be additional tasks available. (CSV Import)
  3. You should create and configure a task “get next line from CSV”
  4. Сreate a task “Import finished” and connect the bottom output from the next line task. This path will execute if the file was completely imported
  5. Easiest way: create a task “execute expression with external record” to check if there is a record in your crm, which have to be changed by the CSV values (or directly create a record, …)
  6. Use the two functions wf_setField() and wf_save_record() to directly interact with the record you found.

Now you could start the Import from the ListView of the assigned Module. Click on “start Workflow” and switch to “Importer” to upload your file.

Example 1

I have created an example which will reflect this steps and search a Contact with the email from column1 and set the “title” field to the value from column 2.

Download: Example Importer

CSV-Example:

user@domain.com,newTitleValue
user2@domain.com,newTitleValue2

Example 2

This example will search Contacts by eMail (first Column).
If the Contact exists, update phone and fax (4th and 5th column).
If not, create Contact and set eMail, firstname, lastname, phone and lastname from CSV.

Download: Example 2

CSV-пример:

test1@stefanwarnat.de,Firstname1,lastname1,01235551,01239991
test2@stefanwarnat.de,Firstname2,lastname1,01235552,01239992
test3@stefanwarnat.de,Firstname3,lastname1,01235553,01239993
test4@stefanwarnat.de,Firstname4,lastname1,01235554,01239994
test5@stefanwarnat.de,Firstname5,lastname1,01235555,01239995
test6@stefanwarnat.de,Firstname6,lastname1,01235556,01239996
test7@stefanwarnat.de,Firstname7,lastname1,01235557,01239997
test8@stefanwarnat.de,Firstname8,lastname1,01235558,01239998
test1@stefanwarnat.de,Firstname11,lastname11,012355511,012399911