This use case details the creation of a workflow which, after collecting files and following several enrichments, lets you create a summary list. The example is based on a list of contacts who made purchases in a store.
The following data structure is used:
Its purpose is to:
To create a summary list, you need to follow these steps:
The data to be loaded is “Purchase” related data with the following format:
Product Name;Product price;Store Computer;2000;London 3 Tablet;600;Cambridge Computer;2000;London 5 Computer;2000;London 8 Tablet;600;Cambridge Phone;500;London 5
This data is contained in a “Purchases.txt” text file.
Add the File collector and Data loading (file) activities to the workflow.
The File collector activity lets you collect and send files from and to the Adobe Campaign server.
The Data loading(file) activity lets you enrich the work table of the workflow with the collected data.
For more on this activity, refer to .
Configure the File collector activity to collect text (*.txt) type files from the selected directory.
The File collector activity lets you manage the absence of a file in the source directory. To do this, check the Process file nonexistence option. In this workflow, a Wait activity has been added to try another file collection if it is missing from the directory at the time of collection.
Configure the Data loading (file) activity using a sample file with the same format as the data to be imported.
Click the Click here to change the file format… link to rename the columns using the internal names and labels of the “Purchases” table.
Once the data has been imported, enrichment is carried out by creating a link to a reference table which matches the “Stores” schema.
Add the Enrichment activity and configure it as follows:
Select the main set made up of the data from the Data loading(file) activity.
Click Add data, then select the A link option.
Select the Define a collection option.
Select the “Stores” schema as a target.
For more on the various types of links, refer to Enriching and modifying data.
In the following window, you need to create a join condition by selecting the source field (in the main set) and the target field (belonging to the “Stores” schema) to configure data reconciliation.
Now the link is created, we’re going to add a column to the work table of the workflow from the “Stores” schema: the “ZipCode Reference” field.
The data in the work table of the workflow after this enrichment will be as follows:
This step details how to write the imported and enriched data to the “Purchases” table. To do this, we need to use an Update data activity.
A reconciliation between the data in the work table of the workflow and the Purchases targeting dimension must be carried out before the data in the Purchases table is updated.
In the Update data activity, the following configuration is needed:
The “Contacts” schema is physically linked to the “Purchases” schema. This means you can use another option of the “Enrichment” option: adding data linked to the filtering dimension.
The purpose of this second enrichment is to create an aggregate on the purchase schema to calculate the total amount of purchases for each identified contact.
Add a query type activity that lets you recover all Contacts stored.
Add an Enrichment activity then select the main set resulting from the previous query.
Click add Data.
Click the Data linked to the targeting dimension option.
Click the Data linked to the filtering dimension option in the Select fields to add window.
Select the Purchases node then click Next.
Change the Collected data field by selecting the Aggregates option.
Add the following expression to calculate the purchase total for each contact: “Sum(@prodprice)”.
To prepare the summary list, you need to add fields from the “Purchases” fields and from the first enrichment: the “ZipCode Reference” field.
Click the Edit additional data… link in the enrichment activity.
Add the “Store name” and “Purchases / Zip Code Reference” fields.
Click the Properties tab.
Change the second link to create only one line.
The last step involves writing all the enriched data to a list.
Once the workflow is executed, the list will include: