Home > Help center > How-To Knowledge base > How to set up automatic emails?

How to set up automatic emails?

This article will specifically explain how to set up an automatic email to а user when a new order has been placed. For this purpose the Eventor needs to be used.

The Eventor works with Events, Listeners and Flows. To see more information on what these are, please click here. To see more details on the process of creating an Eventor Flow, please click here.

Note: By using the same principle from this article, multiple other automated actions can be set with Eventor, as well.

Before creating the Flow

1. Choose the Event

In order to set up any automated actions in the Billia system, you need to first decide what you want to accomplish. The appropriate system event has to be chosen. The Event we are looking for in this case is the one specifying the action of "a new order being placed". This would be Database\V1\OrderPurchase::create.

To check the list of all Events go to Billia Management Panel > Management > Eventor > Events.

preview of the eventor's events section

Note: Some Event's name's (the resources) may seem the same or at least similar. In order to make sure which one to use, you may have to consult with the appropriate developer/Administrator. Please read more here.

2. Choose the Listener

Decide which Listener is the most appropriate one for the task. To check the list of Listeners go to Billia Management Panel > Management > Eventor > Listeners.

preview of the eventor's listeners section

In this case the Listener used will be Mail

Note: Some Listeners may seem alike, so in those cases, you need to make yourself familiar with what they do exactly. To see the list of Eventor pre-defined Listeners, please click here. Example: the Listeners Mail and MailToUser sound alike, essentially do the same thing (send an email), but they complete that action differently. The one has the ability to have an Email template attached to it, the other one requires the content for the email to be written with all necessary variables. For more information on choosing the appropriate Listener, you may have to consult with the developer/Administrator.

Create the Flow

3. Create Flow - Step 1 - Set details

  1. Navigate to your Billia Management Panel > Management > Eventor > Flows.
  2. Click on the bottom right corner on the circle with a plus icon.

    preview of the eventor's flows section

  3. Complete the fields with the chosen Event and Listener, set the Flow name, and add more details in the Description. Click on Next.

    complete the fields of information for an eventor flow setup step one

4. Create Flow - Step 2 - Choose Parameters

  1. Select appropriate and preferred parameters (data) by checking the boxes of certain parameter groups. The system automatically displays the available data and its relations to various parameter groups, depending on the selected Event. Please read more here.

    step two of eventor flow setup is to choose parameters

It is necessary to first find the minimum data needed for the Flow to be set up and make sense: the user who placed the order, the order number itself, and the email address of the user's profile. The chosen Event's category group already has the information on the customer_profile_id and the purchase_id. The Parameter Category titled "Customer Profile Email" contains the user's profile email data needed. Checking it, will automatically check the shortest relations path to it, which goes through the "Customer Profile" Parameter Category. For the purpose of the example and having more valid information, the category "Order" will also be checked.

5. Create Flow - Step 2 - Assign Aliases

Upon checking a Parameter Category, a message will appear on the screen that provides the option to assign aliases on the selected categories. This is done to ease anyone working with the Eventor. It is not necessary to change the default aliases.

set aliases for parameter categories

6. Create Flow - Step 2 - Parameter Conditions

Certain Parameter Categories have additional settings - parameter conditions, also called "Relation Filters".

set relation filter on category parameters

an example of a parameter filter

7. Create Flow - Step 3 - Additional overall Conditions

Add any last minute conditions for the entire flow. Use the parameters that were chosen in the previous step. Not a mandatory step.

set up conditions for the eventor flow

8. Create Flow - Step 3 - Listener details

Set up the contents for the Listener itself by using the already selected parameters.

set up email content for the email listener

Upon completing all fields, simply click on "Finish" and the system will load the system Flow as a new and active one.

Deactivate a Flow

In order to deactivate an automatic system Flow:

  1. Navigate to Billia Management Panel > Management > Eventor > Flows.
  2. Expand the Flow you want to cancel.
  3. Move the scroll next to the Listener you want to deactivate, the status that would appear would say "paused". Then the Listener is deactivated and the Flow with that Listener will not work.

    turn on or off the listener with slider

    Note: One Flow can have more than one Listeners. Make sure to deactivate the correct one.