When building your workflow logic with decisions and wait for changes, you may have found yourself wondering what query context means:
The query context is like a field-of-view, or in other words what the decision query can and cannot see.
For example, I may want to query for an action a contact took that happened in this campaign specifically, not the same type of action that took place elsewhere (i.e. some other campaign).
Or on the other hand, I might want to look for an action a contact took in some other campaign, and use this to determine what happens next in this campaign I am working on.
Here is what the 3 campaign query contexts can and cannot see:
Current Campaign Step: This is the narrowest field-of-view. It can only see campaign activities or actions that took place on the trigger step. In other words it's a snap-shot of the contact at the very moment they entered the campaign. Anything that happened before or after they enter the campaign is ignored by the query.
Campaign: This is the most commonly used query context. This context can see actions or activities that took place at the trigger and any subsequent actions prior to the query in this campaign only. It will not be able to see anything that happened outside of the campaign.
For example, I can NOT query if my contact was sent an email from some other campaign using this query context. I can only see if they were sent an email in this current campaign.
Global: This is the widest field-of-view. This context can see anything and everything that has happened to a contact. Period. Any campaign, any history item, any custom field set.
For example, I CAN query if my contact was sent an email from some other campaign using this query context. Whether it's the current campaign, or some other campaign.
How commonly is query context used?
In most cases you will likely be using the 'Campaign' query context. However you are likely to end up needing to use 'Global' from time to time. 'Current Campaign Step' is the least used but in some occasions may be needed.
So if you are building a query and having trouble you could start by playing with the query context. From most common to least common use the contexts are:
- Current Campaign Step
Please reach out to your dedicated Enquire Account Manager or Enquire MAP Support team for further assistance.