Difference between revisions of "Automation"

From hoteliga
Jump to: navigation, search
(Introduction)
(Automation Plans)
 
(40 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
==Introduction==
 
==Introduction==
Automation is the technology by which a process or procedure is performed with minimal human assistance. Automation saves time on creating repeated tasks, you just need to configure rules for the future tasks which will be generated. You can use it for sending emails to customers automatically, without manual work. For example, you want to send a welcome email to a customer when a reservation created, or "thank you for staying with us" email after checkout.
+
Automation is the technology by which a process or procedure is performed with minimal human assistance. Automation saves time on creating repeated tasks, you just need to configure rules (automation plans) for the future tasks to be generated. You can use it for sending emails to customers automatically, without manual work. For example, you want to send a welcome email to a customer when a reservation created, or "thank you for staying with us" email after checkout.
  
 
==Settings==
 
==Settings==
To be able to use automation you need to go to Options ⇒ Tools
+
You can find Automation in Options ⇒ Tools
  
[[File:OptionsTools.png|150px]]
+
[[File:OptionsTools.png|200px]]
  
 
and to the Automation section:
 
and to the Automation section:
Line 16: Line 16:
  
 
==Automation Plans==
 
==Automation Plans==
Automation Plans are rules by what tasks will be created. You can configure by what actions tasks will be triggered and what time they should be executed.
+
Automation Plans are rules by which tasks will be automatically generated. You can configure the actions that will take place and what time they should be executed.
  
In automation plan you can add a new rule, when automation tasks will be triggered.
+
In "Automation plans" you can add a new rule to generate tasks.
# Title - the title of an automation plan
+
# Title - the title of the automation plan
# Time execution (in hours) - when you want this event to happen (12h before/24h after some action)
+
# Time execution (in hours) - when you want a task of this plan to be executed (12h before/24h after some action)
# Execution moment - Before, after, on time of an action.
+
# Execution moment - Before, after or on time of an event.
# Event type - types of event (arrival, departure, checkin, checkout, creation)
+
# Event type - types of events that trigger the creation of tasks (arrival, departure, checkin, checkout, creation)
# Task action - what kind of task will be triggered:  
+
# Handle group separately - if the reservation for which the event took place is a group one, then tasks will be generated for all reservations in group
 +
# Task action - what kind of action will take place:  
 
## template email action - sending an email template (parameters: templateId)
 
## template email action - sending an email template (parameters: templateId)
 
## raw email message - sending raw email message without a template (parameters: template - message, emailAddress - receiver, subject - subject of an email)
 
## raw email message - sending raw email message without a template (parameters: template - message, emailAddress - receiver, subject - subject of an email)
 +
## webhook action - sending GET/POST request to a given endpoint (parameters: baseUrl - endpoint URL, callMethod - GET/POST, contentType - JSON/XML)
  
 
==Automation Tasks==
 
==Automation Tasks==
Automation tasks are tasks which will be executed by Azure Function at the set time.
+
Automation tasks are tasks which will be executed by Azure Function at the selected time.
  
 
===Actions===
 
===Actions===
Depends on an action type set in the plan, an email with selected template can be send, raw email with just text.
+
Depends on the action type set in the plan. An email with selected template can be send or raw email with just text.
  
====TemplateEmail====
+
====Template Email====
TemplateEmail action allows you to choose a template which will be send to a customer. For example you want to send a welcome email when a customer checks in, then plan may look like:
+
TemplateEmail action allows you to choose a template which will be send to the customer. You need to choose which template will be used as email template. When you choose "Template email action" you will see "templateId" parameter and you need to choose a template from the drop down menu. For example, if you want to send a welcome email when a customer checks in, then plan should look like:
  
[[File:Welcomeplan.png|550px]]
+
[[File:Welcomeplan.png]]
 +
 
 +
====Raw Email Action====
 +
If you want to send just simple text email, then you should choose "Raw Email Action". You will see three parameters to fill:
 +
 
 +
[[File:RawEmailAction.png]]
 +
 
 +
* template - the content of email message.
 +
* emailAddress - the sender email (your email).
 +
* subject - the subject of the message
 +
 
 +
====Webhook Action====
 +
You should use this type of action if you want to send reservation's information to a custom callback.
 +
 
 +
Note that the response from the endpoint you provide must be returned within 5 seconds. Otherwise the call will fail.
 +
 
 +
[[File:Webhook.png]]
 +
 
 +
* baseUrl - endpoint URL.
 +
* callMethod - type of HTTP request (GET/POST).
 +
* contentType - format of sending data JSON/XML
  
 
===Troubleshooting===
 
===Troubleshooting===
 
If something goes wrong during executing a task you will see the status "Task failed" and in the popup window the reason:
 
If something goes wrong during executing a task you will see the status "Task failed" and in the popup window the reason:
  
[[File:TaskFailed.png|600px]]
+
[[File:TaskFailed.png]]
  
 
==Examples==
 
==Examples==
Creating a plan:
+
The first things you need to configure are check-in and check-out times in Tools ⇒ Automation Settings.
 +
 
 +
Then you can start creating a plan (Tools ⇒ Automation Plans).
 +
 
 +
[[File:AutomationPlan.png]]
 +
 
 +
This plan will be triggered when you create a reservation and will send a confirmation email to a customer.
 +
 
 +
[[File:CreateReservation.png]]
 +
 
 +
An automation task will be created (Tools ⇒ Automation Tasks)
 +
 
 +
[[File:AutomationTask.png]]
 +
 
 +
After the task will be executed the customer will get an email. Task's status will change and you will see when the task was actually executed:
 +
 
 +
[[File:FinishedAutomationTask.png]]
 +
 
 +
An example of a received email:
 +
 
 +
[[File:ConfirmationEmail.png]]
 +
 
 +
===Webhook example===
  
[[File:Automationplan.png|500px]]
+
====POST request====
  
This plan with name "reminder" which will create a task 27 hours before arrival (14:00) which will send an email template "-Thank you email".
+
UI Setup of the webhook plan:
  
To trigger creating of tasks you need to create/update a reservation. For example we create a new reservation from 15 Aug till 19 Aug
+
[[File:webhook_example_en.png]]
  
[[File:Newreservation.png|500px]]
+
The created task result:
  
A corresponding task will be created:
+
[[File:webhook_task.png]]
  
[[File:AutomationTaskExample1.png|500px]]
+
Request URL: <pre>https://your-endpoint.com</pre>
  
By changing an arrival date - not started tasks will be recreated:
+
Request payload:
 +
* JSON:
 +
<pre>
 +
{
 +
"id":"12638",
 +
"dateFrom":"18/10/2019",
 +
"dateTo":"20/10/2019",
 +
"customerFullName":"TestFullName"
 +
}
 +
</pre>
 +
* XML:  
  
[[File:UpdatedReservation.png|500px]]
+
<pre>
 +
&lt;?xml version="1.0" encoding="utf-16"?&gt;
 +
&lt;reservation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
 +
&lt;id&gt;12638&lt;/id&gt;
 +
&lt;dateFrom&gt;18/10/2019&lt;/dateFrom&gt;
 +
&lt;dateTo&gt;20/10/2019&lt;/dateTo&gt;
 +
&lt;customerFullName&gt;TestFullName&lt;/customerFullName&gt;
 +
&lt;/reservation&gt;
 +
</pre>
  
Old task will be deleted and new one created:
+
====GET request====
  
[[File:ChangedTask.png|600px]]
+
[[File:webhook_example_get_en.png]]
  
Task will be run automatically by Azure Function at 12/08/2019 11:00:00:
 
  
[[File:FinishedTask.png|500px]]
+
Request URL: <pre>https://your-endpoint.com?reservationId=12678&dateFrom=18/10/2019&dateTo=20/10/2019&customerFullName=TestFullName</pre>

Latest revision as of 11:03, 22 July 2020

Introduction

Automation is the technology by which a process or procedure is performed with minimal human assistance. Automation saves time on creating repeated tasks, you just need to configure rules (automation plans) for the future tasks to be generated. You can use it for sending emails to customers automatically, without manual work. For example, you want to send a welcome email to a customer when a reservation created, or "thank you for staying with us" email after checkout.

Settings

You can find Automation in Options ⇒ Tools

OptionsTools.png

and to the Automation section:

AutomationSettings.png

In settings you can configure default arrival and departure time:

ArrivalDepartureTimes.png

Automation Plans

Automation Plans are rules by which tasks will be automatically generated. You can configure the actions that will take place and what time they should be executed.

In "Automation plans" you can add a new rule to generate tasks.

  1. Title - the title of the automation plan
  2. Time execution (in hours) - when you want a task of this plan to be executed (12h before/24h after some action)
  3. Execution moment - Before, after or on time of an event.
  4. Event type - types of events that trigger the creation of tasks (arrival, departure, checkin, checkout, creation)
  5. Handle group separately - if the reservation for which the event took place is a group one, then tasks will be generated for all reservations in group
  6. Task action - what kind of action will take place:
    1. template email action - sending an email template (parameters: templateId)
    2. raw email message - sending raw email message without a template (parameters: template - message, emailAddress - receiver, subject - subject of an email)
    3. webhook action - sending GET/POST request to a given endpoint (parameters: baseUrl - endpoint URL, callMethod - GET/POST, contentType - JSON/XML)

Automation Tasks

Automation tasks are tasks which will be executed by Azure Function at the selected time.

Actions

Depends on the action type set in the plan. An email with selected template can be send or raw email with just text.

Template Email

TemplateEmail action allows you to choose a template which will be send to the customer. You need to choose which template will be used as email template. When you choose "Template email action" you will see "templateId" parameter and you need to choose a template from the drop down menu. For example, if you want to send a welcome email when a customer checks in, then plan should look like:

Welcomeplan.png

Raw Email Action

If you want to send just simple text email, then you should choose "Raw Email Action". You will see three parameters to fill:

RawEmailAction.png

  • template - the content of email message.
  • emailAddress - the sender email (your email).
  • subject - the subject of the message

Webhook Action

You should use this type of action if you want to send reservation's information to a custom callback.

Note that the response from the endpoint you provide must be returned within 5 seconds. Otherwise the call will fail.

Webhook.png

  • baseUrl - endpoint URL.
  • callMethod - type of HTTP request (GET/POST).
  • contentType - format of sending data JSON/XML

Troubleshooting

If something goes wrong during executing a task you will see the status "Task failed" and in the popup window the reason:

TaskFailed.png

Examples

The first things you need to configure are check-in and check-out times in Tools ⇒ Automation Settings.

Then you can start creating a plan (Tools ⇒ Automation Plans).

AutomationPlan.png

This plan will be triggered when you create a reservation and will send a confirmation email to a customer.

CreateReservation.png

An automation task will be created (Tools ⇒ Automation Tasks)

AutomationTask.png

After the task will be executed the customer will get an email. Task's status will change and you will see when the task was actually executed:

FinishedAutomationTask.png

An example of a received email:

ConfirmationEmail.png

Webhook example

POST request

UI Setup of the webhook plan:

Webhook example en.png

The created task result:

Webhook task.png

Request URL:
https://your-endpoint.com

Request payload:

  • JSON:
{
"id":"12638",
"dateFrom":"18/10/2019",
"dateTo":"20/10/2019",
"customerFullName":"TestFullName"
}
  • XML:
<?xml version="1.0" encoding="utf-16"?>
<reservation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<id>12638</id>
	<dateFrom>18/10/2019</dateFrom>
	<dateTo>20/10/2019</dateTo>
	<customerFullName>TestFullName</customerFullName>
</reservation>

GET request

Webhook example get en.png


Request URL:
https://your-endpoint.com?reservationId=12678&dateFrom=18/10/2019&dateTo=20/10/2019&customerFullName=TestFullName