Marketing - Marketing Queries
Marketing Queries can be used to limit the customer contacts that will be emailed, when creating a marketing campaign. Limiting the contacts gives the added control over the target audience of the campaign.
Various different groups of contacts, known as Queries, can be created within the Marketing Queries tree-view node of the Marketing module.
Marketing Queries are fully customisable and allow for any data within OrderWise to be queried. Each marketing group will be generated based on any number of criteria, however simple or complex.
Name / Description: A relevant name will need to be given to the marketing query so that it is easier to locate when used in a marketing campaign.
Include: The option selected here determines exactly which contacts will be returned by the query. Queried contacts only, Main contacts only or All contacts.
Join: This will be used when joining the query of one line to another.
Entity: This will be used to determine what appears in the ‘Column’ column. Customer or contact will contain all customer and contact fields and static segments, whereas customer and contact on their own will only contain their specific fields and static segments. The dynamic entities will show the relevant dynamic queries.
Column: Determined by the selected Entity.
Condition: Determined by the selected Column type.
Value: Determined by the selected Column type.
Variable: Only editable for date columns. If a variable is selected, any date already entered into the Value column will be cleared.
Add line: Additional lines can be added to a marketing query, where multiple conditions may need to be met.
Delete line: This will delete the selected line after confirmation.
Add/Edit sub query: Each query may have a sub query, where a query's line has to fulfil multiple conditions before it can be considered in the main marketing query. Selecting this button will convert the currently selected line to a parent line and a new query builder form will open in Sub Query mode:
Any number of sub queries, going down any number of levels, can be added.
The name entered against the sub query will be used in the ‘Column’ column of the parent line once saved.
When previewing the query, this will work from the current level downwards. Therefore, if the bottom-most sub query level is selected, the results will only be related to the lines in that form.
When previewing the results, this will work from the current level downwards. Therefore, if the bottom-most sub query level is selected, the results will only be related to the lines in that form.
Edit parameters: Only enabled when the selected lines' 'Column' is a Dynamic Query, that requires parameters. This button allows the parameters to be amended. Parameters must be entered against dynamic rows before the query can be saved or previewed: