Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.

...

Erweitern
titlePage Summary and Index

You will learn about action buttons. How they enable a task-like-workflow with status updates between both systems and which different varriations exist.

Inhalt
stylenone

...

To process status changes in hotelkit the partner can attach actions to a request. Those actions will be presented to the customer as buttons.

As soon as the customer hits the button, the result will be sent back to the partner via the defined webhook, and new actions could can be sent . (For details see webhook -> send actions)

...

in the response.

Requirements

To attach actions to a request, the partner must be granted the functionality hasActions.

To confirm your functionalities you can use GET /setup/partner.

Definition

Attributes

Every action will be presented to the customer as a button. Therefore all information for displaying the button must be sent:

Attributes

Data type

Description

type*

string

Identifer of the action. Will be sent back to the partner to identify the hit action.

label*

string

Label of the button before the action will be triggered.

labelDone*

string

Label of the action, after it was triggered.

labelType*

enum [“string”, “text”, “number”, “boolean”, “date”, “time”, “dateTime”, “user”, “enum”]

Gives information about the style of the button. See Bootstrap Buttons

isDone*

boolean

Says whether a request can be closed after the action. This is the case whenever there is no further immediate action of the customer required.

information

information{}

Additional information the customer has to insert before sending the action. Those information will be sent to the partner and are giben in detail in the next section.

Information types

Whenever additional information is submitted, the customer will be presented with a form with all the requested information. Every information is given as one input. To define those inputs, these attrbiutes are available:

...

Given the type of information the presentation of the input is set:

string

The customer should insert a short text.

text

The input will be presented to the customer as a textbox. This is suitable whenever the customer should insert a longer string than a single sentence.

number

The customer should insert a number. To specify this number, the following meta information can be made:

...

If all meta information are given, the customer will be presented with a slider for assisting the input.

boolean

A checkbox will be presented to the customer.

date/time/dateTime

The customer will be presented with a datepicker. The value and defaultValue will be in the format “dd.mm.YYYY HH:ii” (or subsets)

user

The customer will be asked for a (or multiple) user of hotelkit. The valid values are all hotelkitIDs the partner gets with GET /users
The value and defaultValue will be an array of those hotelkitIDs.
For this option, the partner must be granted the functionality userList as otherwise there are no hotelkitIDs available.
See the example for an implementation.

enum

The customer will have a set of options to choose from.
Are there more than 3 options available, the customer will see a dropdown instead of a radio button.
The options will be given as an array via the meta attribute. Each option consist of:

Key

Description

value

The value that will be sent to the partner.

label

The string that will be presented to the customer.

Example

There will be be 2 buttons created, where the “Accept” button initiates a form with every available type of input.

...

After clicking “Send”, a request is sent to the webhook of the partner:

Codeblock
{ "eventName": "requestStatusChange"
  "responseType":"accept",
  "hotelkitID":"73014444213",
  "messageToGuest":"Thank you very much for your request, we are happy to accept the order",
  "internalComment":"Implement after the holiday",
  "booleanValue":true,
  "time":"12:00",
  "date":"29.08.2018",
  "dateTime":"29.08.2018 12:00",
  "user":[
    7657
  ],
  "number":12.4,
  "select1":"1",
  "select2":"1"
}

...