How to set up automatic emails?
Table of contents
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.
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.
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.
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
- Navigate to your Billia Management Panel > Management > Eventor > Flows.
Click on the bottom right corner on the circle with a plus icon.
Complete the fields with the chosen Event and Listener, set the Flow name, and add more details in the Description. Click on Next.
4. Create Flow - Step 2 - Choose Parameters
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.
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
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.
6. Create Flow - Step 2 - Parameter Conditions
Certain Parameter Categories have additional settings - parameter conditions, also called "Relation Filters".
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.
8. Create Flow - Step 3 - Listener details
Set up the contents for the Listener itself by using the already selected parameters.
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:
- Navigate to Billia Management Panel > Management > Eventor > Flows.
- Expand the Flow you want to cancel.
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.
Note: One Flow can have more than one Listeners. Make sure to deactivate the correct one.