Difference between revisions of "Automation"

From hoteliga
Jump to: navigation, search
(POST request)
(POST request)
Line 99: Line 99:
 
{"id":"12638","dateFrom":"18/10/2019","dateTo":"20/10/2019","customerFullName":"Test test "}
 
{"id":"12638","dateFrom":"18/10/2019","dateTo":"20/10/2019","customerFullName":"Test test "}
 
* XML:  
 
* XML:  
 
+
<code>
<?xml version="1.0" encoding="utf-16"?>
+
<?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>Test test </customerFullName></reservation>
<reservation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
</code>
  <id>12638</id>
 
  <dateFrom>18/10/2019</dateFrom>
 
  <dateTo>20/10/2019</dateTo>
 
  <customerFullName>Test test </customerFullName>
 
</reservation>
 
  
 
====GET request====
 
====GET request====

Revision as of 13:40, 22 October 2019

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.

Settings

To be able to use automation you need to go to 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 what tasks will be created. You can configure by what actions tasks will be triggered and what time they should be executed.

In automation plan you can add a new rule, when automation tasks will be triggered.

  1. Title - the title of an automation plan
  2. Time execution (in hours) - when you want this event to happen (12h before/24h after some action)
  3. Execution moment - Before, after, on time of an action.
  4. Event type - types of event (arrival, departure, checkin, checkout, creation)
  5. Task action - what kind of task will be triggered:
    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 set time.

Actions

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

Template Email

TemplateEmail action allows you to choose a template which will be send to a 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 template from drop down. For example you want to send a welcome email when a customer checks in, then plan may look like:

Welcomeplan.png

Raw Email Action

If you want to send just simple text email, you can 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 can use this type of action if you need to send reservation information to a custom callback.

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 thing you need to configure checkin checkout times in Tools ⇒ Automation Settings.

Then you can start to create 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 a customer will get an email and the task's status will change and you will see when the task was actually sent:

FinishedAutomationTask.png

An example of a received email:

ConfirmationEmail.png

Webhook example

POST request

Webhook example.png

Webhook task.png

JSON request is received:

Received payload is:

  • JSON:

{"id":"12638","dateFrom":"18/10/2019","dateTo":"20/10/2019","customerFullName":"Test test "}

  • 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>Test test </customerFullName></reservation>

GET request