Incremental query activity: All you need to know
Adobe Campaign Classic provides a range of activities that allow you to query data from your database. Today we will take a look at the incremental query, which allows you to periodically select a target based on a specific criteria, while excluding individuals who have already been already targeted.
The population that has already been targeted is stored in memory based on the workflow instance and activity. This means that two workflows started from the same template do not share the same log. However, if two tasks are based on the same incremental query for the same workflow instance, they will use the same log.
If there is no Incremental query activity available, we would need to use a set of activities to achieve similar results. Additionally, we would have to save the target population every time the workflow starts. Below is an example of one possible implementation for an incremental query:
- Use
Scheduler actity
to set repetition of workflow run. - Use a
Query activity
to retrieve the target population based on the desired criteria. - Add a
Deduplication activity
to remove any duplicate records from the saved population. - Use a Read list to separate the new records from the previously targeted ones. This can be based on a specific field or condition.
- Use
Exclusion activity
- Save the result of the query into a
List
- Continue the workflow with the desired activities or processes for the newly targeted population.
Even with all the above mentioned activities, we will not be able to fully replicate this activity. However, for the purpose of understanding how the Incremental query works, it will be sufficient.
The query is defined in the same way as standard queries, but its execution is scheduled to occur at specific intervals. The scheduler features are exactly the same as in the scheduler activity. Additionally, we can configure the history settings.
Two main settings How many days we keep the history of records. If the value is set to 0 history is never purged. After the value set in days will pass, the workflow history log table will be purged and recipients can reenter the workflow again. We can also descide wether to keep history when workflow is restarted / stopped and started again. Additionally we can specify table name, that will replace the default name in database.