Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:extensions:workflowdesigner:importer [2014/01/01 17:14] swarnat |
en:extensions:workflowdesigner:importer [2014/03/13 11:25] (current) swarnat |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Importer ====== | ====== 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. | ||
- | In Verison 1.87 a new feature was integrated, which will help you to Import csv-Files and do individual tasks with entries 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: |
- | + | ||
- | The basic idea behind the system 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 | row1 => record1 | ||
row2 => record2 | row2 => record2 | ||
Line 18: | Line 17: | ||
**Please following the following steps to use this feature: (You could integrate other tasks, but this should be the basic structure)** | **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.// | ||
- At first you have to create a Workflow with the Trigger "Import Process". This makes the Workflow invisible in situations, different than import. | - At first you have to create a Workflow with the Trigger "Import Process". This makes the Workflow invisible in situations, different than import. | ||
Line 24: | Line 24: | ||
- create a task “Import finished” and connect the bottom output from the next line task. This path will execute if the file was completely imported | - create a task “Import finished” and connect the bottom output from the next line task. This path will execute if the file was completely imported | ||
- 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, ...) | - 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, ...) | ||
- | - Use the two functions wf_setField() and wf_saveRecord() to directly interact with the record you found. | + | - 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. | ||
<WRAP info> | <WRAP info> | ||
+ | === 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. | 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: {{:en:extensions:workflowdesigner:import_workflow.bin|Example Importer}} | Download: {{:en:extensions:workflowdesigner:import_workflow.bin|Example Importer}} | ||
+ | |||
+ | CSV-Example: | ||
+ | <code> | ||
+ | user@domain.com,newTitleValue | ||
+ | user2@domain.com,newTitleValue2 | ||
+ | </code> | ||
+ | </WRAP> | ||
+ | |||
+ | <WRAP info> | ||
+ | === Example 2 === | ||
+ | {{ :en:extensions:workflowdesigner:import_searchcontact_create.png?300|}} | ||
+ | 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: {{:en:extensions:workflowdesigner:import_searchcontact_create.bin|Example 2}} | ||
+ | |||
+ | CSV-Example: | ||
+ | <code> | ||
+ | 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 | ||
+ | </code> | ||
</WRAP> | </WRAP> |