Add data

The additional columns let you collect additional information on the targeted population, e.g. contract numbers, subscriptions to newsletters or origin. This data can be stored in the Adobe Campaign database or in an external database.

The Add data… link lets you select the additional data to collect.

Start by selecting the type of data to add:

  • Select Data linked to the filtering dimension to select the data in the Adobe Campaign database.
  • Select External data to add data from an external database. This option is only available if you have purchased the Federated Data Access option. For more on this, refer to Access an external database (FDA).
  • Select the An offer proposition option to add a set of columns which let you store the best proposition generated by the offer engine. This option is only available if you have purchased the Interaction module.

If no optional module is installed on the platform, this stage is not displayed. You will be taken straight to the next stage.

To add data from the Adobe Campaign database:

  1. Select the type of data you want to add. This can be data belonging to the filtering dimension or data stored in linked tables.

  2. If the data belongs to the query’s filtering dimension, simply select it in the list of available fields to display it in the output columns.

    You can add:

    • A field computed based on data taken from the targeted population or an aggregate (number of pending purchases within the last month, average amount of a receipt, etc.). For an example, go to Select data.

    • A new field, created using the Add button to the right of the list of output columns.

      You can also add a collection of information, for example a list of contracts, the last 5 deliveries, etc. Collections coincide with fields that can have multiple values for the same profile (1-N relationship). For more on this, refer to Edit additional data.

To add a collection of information linked to a targeted population:

  1. At the first step of the assistant, select the Data linked to the filtering dimension option:

  2. Select the table which contains the information you want to collect and click Next.

  3. If necessary, specify the number of elements of the collection that you want to keep by selecting one of the values in the Data collected field. By default, all the lines of the collection are recovered then filtered according to the conditions specified at the following step.

    • If a single element of the collection coincides with the filtering conditions for this collection, select Single row in the Data collected field.

      IMPORTANT
      This mode optimizes the SQL query generated thanks to a direct juncture on the collection elements.
      If the initial condition is not respected, the result may be flawed (missing or overlapping lines).
    • If you choose to recover several lines (Limit the line count) you can specify the number of lines to collect.

    • If the collected columns contain aggregates, for example the number of failures declared, average expenditure on a site, etc. you can use the Aggregates value.

  4. Specify the sub-selection of the collection. For example: purchases over the last 15 days only.

  5. If you have selected the Limit the line count option, define the order in which the collected data is to be filtered. Once the number of lines collected is more than the number of lines that you specified to keep, the filtering order allows you to specify which lines to keep.

Example: Targeting on simple recipient attributes

In the following example, the query seeks to identify men aged between 18 and 30 and living in France. This query will be used in a workflow that aims to make them an exclusive offer for example.

NOTE
Additional query samples are presented in this section.
  1. Name your query then select the Edit query… link.

  2. Select Filtering conditions in the list of types of filter available.

  3. Enter the different criteria for the proposed target. Here criteria are combined using the AND option. To be included in the selection, the recipients will have to fulfill following four conditions:

    • Recipients whose title is “Mr” (can also be found using the Gender field and selecting Male as a value).
    • Recipients aged under 30.
    • Recipients aged over 18.
    • Recipients living in France.

    You can view the SQL matching your criteria combination:

  4. You can check your criteria is correct by previewing the recipients that match your query in the relevant tab:

  5. Save your filters so that you can use them again at a later date by clicking Finish > OK.

  6. Continue editing your workflow by adding other activities to it. Once it has been launched and the previous query step finished, the number of recipients found will be displayed. You can display further details using the mouse pop-up menu (right click the transition > Display the target…).

Output parameters

  • tableName
  • schema
  • recCount

This set of three values identifies the population targeted by the query. tableName is the name of the table that records the target identifiers, schema is the schema of the population (usually nms:recipient) and recCount is the number of elements in the table.

This value is the schema of the work table. This parameter is valid for all transitions with tableName and schema.

Optimizing your queries

The section below provides best practices to optimize the queries running on Adobe Campaign to limit the workload on the database and improve user experience.

Joins and indexes

  • Efficient queries rely on indexes.

  • Use an index for all joins.

  • Defining links on the schema will determine the join conditions. The linked table should have an unique index on the primary key and the join should be on this field.

  • Perform joins by defining keys on numeric fields instead of string fields.

  • Avoid performing outer joins. Whenever possible, use the Zero ID record to achieve outer join functionality.

  • Use the correct data type for joins.

    Ensure that the where clause is the same type as the field.

    A common mistake is: iBlacklist='3' where iBlacklist is a numeric field, and 3 signifies a text value.

    Make sure you know what the execution plan of your query will be. Avoid full table scans, especially for real-time queries or near real-time queries running every minute.

    For more on this, depending on your Campaign version, refer to these sections:

    Campaign v7 documentation

    Campaign v8 documentation