Creating an automatic email: Tutorial

Related videos

 

The following example illustrates how to create an event confirmation email that will be sent when someone registers for an event.

Note: Some of the steps in this tutorial include PLUS features and additional licensing is required. For more information, contact your AiSP or ASI Technical Support.

Building the query

Create a query called Event registrations that returns event registration data, and includes all the properties that you wish to use in your email; for example, the registrant’s name and the name of the event. For more information on creating queries, see Building IQA queries: Tutorials.

  1. From the Staff site, go to RiSE > Intelligent Query Architect.
  2. Navigate to $/Common/Communications/Queries.
  3. Add a new query (New > Query).
  4. (Summary tab) Enter the name of the query as Event registrations.
  5. (Sources tab) Click Add Source, then select the CsRegistration and CsEvent business objects and click OK.
  6. Note: You can use the Ctrl key to select multiple business objects. Use the Quick find field to filter the list.

  7. Set up the relationship between the selected business objects. In the Relations drop-down, select Custom, then choose CsRegistration.Event Code Equals CsEvent.Event Code, and click the + button.
  8. (Filters tab) Filter the query to include only active registrations. In the Property column, select CsRegistration.Status from the drop-down. In the Comparison column select Empty. Click the + button to add the filter.
  9. (Display tab) Select the results you wish to be displayed in the query by choosing the columns to include in the query. In the View drop-down, select View all columns. Select the Display checkbox for the properties you wish to include in the event confirmation email. For example:
    • CsRegistration.Full Name
    • CsRegistration.Ship To ID (add an Alias of "PartyId")
    • CsRegistration.Order Number (can be used to connect Additional Data Sources in the communication template)
    • CsEvent.Title
    • CsRegistration.Event Code (can be used to provide a link to the event in the email)
    • CsRegistration.Total Charges
    • CsRegistration.Total Payments
    • CsRegistration.Balance
    • CsEvent.Begin Date
    • CsEvent.City
    • CsEvent.State Province
  10. Save the query, and then click the Run tab and verify that you can view event registrations with the appropriate information.

Creating a communication template

Create a communication template for the confirmation email that will use your Event registrations query to populate the body of the email. To create your template:

  1. Go to Marketing > Communication templates.
  2. Navigate to the Templates folder, or to the folder where you wish to add the event confirmation email.
  3. Create a new communication template (New > Communication).
  4. Enter a From email address for the email.
  5. Click Choose Recipients, and then select the query that you just created to provide the necessary data fields ($/Common/Communications/Queries/Event registrations). Click Return to Compose.
  6. Compose the email and add a Subject. Add the desired fields related to the event registration to your email by selecting from the Insert field drop-down.
  7. Click Preview to review your email. Correct any fields that display an error in preview mode.
  8. Click Save and enter a name for the communication template (such as Event confirmation).

Creating the automated task PLUS

Note: The following information is considered a PLUS feature and additional licensing is required. For more information, contact your AiSP or ASI Technical Support.

Create an automated task that will send your confirmation email to registrants as soon as they register for an event. To do this:

  1. Navigate to RiSE > Process Automation.
  2. Select Add new task:
    1. Enter a Name for the task, such as Send event confirmation email. For the Type, select Scheduled task.
    2. Select the Enabled checkbox.
    3. Select Add trigger.
    4. For the trigger Type select On database change.
    5. From Table, select Order_Meet. The TriggerID property will display as ORDER_NUMBER. This indicates that the ORDER_NUMBER property can be used as a filter in IQA queries with the @TriggerID dynamic filter, in order to return only results for the row that triggered the task.
    6. Enable Row inserted to trigger the task only when a new event registration is added to the Order_Meet table.
    7. Select the Enabled checkbox, then click Save.
  3. Click Save, then Close the task.

Updating the query for use in the automated task

In order to use the Event registrations query in the automated task, you need a filter using the @TriggerID dynamic filter. You can copy the existing Event registrations query in order to preserve the original version, which can still be used in the Event confirmation template:

  1. Go to RiSE > Intelligent Query Architect, and navigate to $/Common/Communications/Queries. Select the Event registrations query and click Organize > Copy.
  2. Navigate to $/Common/Tasks/Queries and click Organize > Paste. Select the Event registrations query and click Edit.
  3. Update the Name to Event registrations for automated task.
  4. (Filters tab) Add a filter for Order Number using the @TriggerID keyword. This will filter the query to only return results where the Order Number matches the Order Number of the row that triggered the task to run. The query will not return any results when run directly in IQA.
    1. In the Property column, select CsRegistration.Order Number from the drop-down.
    2. In the Comparison column select Equal.
    3. For the Value, enter "@TriggerID".
    4. Click the + button to add the filter.
  5. Click Save.

Completing the automated task setup PLUS

Note: The following information is considered a PLUS feature and additional licensing is required. For more information, contact your AiSP or ASI Technical Support.

Now that the query is defined to filter only to the registration that triggers the task, you can use the query as a data source in the Conditions and Actions of the automated task.

  1. Go to RiSE > Process Automation and select the Event confirmation email automated task.
  2. (Conditions tab) Add the query to the Conditions in order to prevent the actions from running if there are no results.
    • Click Add data source.
      1. Enter a Name for the data source without using spaces, such as “EventRegistration”
      2. In the Query field, click select and choose the Event registrations for automated task query .
      3. Click Save.
  3. (Actions tab) Add an action to send the event confirmation communication.
    • Click Add action.
      1. Select Send a communication from the Type drop-down.
      2. Choose EventRegistration as the Recipient data source. For your Communication, select the Event confirmation template you previously created.
      3. Save your choices.

You can test the task by creating a test user with an email address that you have access to, and registering for an event.