Using query functions

Select menu Project - Query functions. This option is only available in the professional version.

There are some internal functions for e.g. encoding URLs or simple calculations.

 

You can specify any amount of query functions. All determined functions are for the current project.

Add new function

  1. Click "Add".

  2. Define a unique name for your function, this name will be used as place holder.

  3. Add now the required conditions. You can add unlimited conditions. If a condition isn't true SuperMailer will check the next condition (IF ... THEN ... ELSE, IF ... THEN ... ).

  4. Click "OK" to save the query.

 

Change a functions

  1. Select the function that you want to change and click "Change".

  2. The next steps are similar as if you would add a function.

 

Delete a function

  1. Choose the function that you want to delete and click "delete".

 

Hint:
If you send plain text emails the text of a condition should only contain plain text, in HTML emails the text can contain HTML code. To send multipart emails and the text of condition contains HTML code you must create 2 functions. One function with HTML code and one function with plain text.

 

Import a function

With this function you can import defined queries from other SuperMailer programs.

Important
SuperMailer didn't verify the correctness of your query functions. Please validate your queries yourself.

 

Using wildcards

The wildcard symbol * can be used in the comparison text, but only for the comparison "equals" (=) and "not equals" (<>). You can use this symbol only at the beginning or the end of the comparison text.

Examples:

Compare name = M* , this is full filled if the name of the field name begins with M

Compare name = *m , this is full filled if the name of the field name ends with m

Not permitted is name = M*M!

 

Examples

For this example the following field declarations given.

Name Title order code email
Miller Mr. 1 miller@...
Smith Mrs. 2 smith@...
Grey Inc. Firm 1 grey@...
Meyer Mr.   meyer@....

A suitable address in a email is to be used for each person.

Create functions as follow:

The conditions:

You can insert the new function [Example] now into your email text over the button "Add field" and check the result e.g. in the massmail preview

Result of the function for each recipient:

Dear Mr. Miller,

Dear Mrs. Smith,

Dear Sirs,

 

As last example a discount of 25% is to be granted to each customer, if the customer contains the 1 in the field order code. Customers those order code contains 2, are to receive 30% discount. Customers without order code do not receive a discount.

Here is the solving :

The conditions:

You can insert the new function [Discount] into your email text and check the result e.g. in the mass mail preview

Result (inclusive address from example 1):

 

Dear Mr. Miller,


a special offer for you:
a discount of 25%...

 

Dear Mrs. Smith,


a special offer for you:
a discount of 30%...

 

Dear Sirs,


a special offer for you:
a discount of 25%...

 

Dear Mr. Meyer,