...
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:
Attributes | Data type | Description |
---|---|---|
required* | string | Describes whether the input has to be set before the action can be sent to the partner. |
type* | enum [“string”, “text”, “number”, “boolean”, “date”, “time”, “dateTime”, “user”, “enum”] | Defines the type of the information. Determines how the input will be displayed to the customer. Details are shown below. |
label* | string | Label of the information. Customer should know what information is requested after presented with this label. |
defaultValue | string | A pregiven value for the information. Must be a valid input for the type. |
meta | object | Additional information that define the input. Possible attributes are set by the type and are described below. |
Given the type of information the presentation of the input is set:
...
The customer should insert a number. To specify this number, the following meta information can be made:
Information | Description |
---|---|
min | The minimum value of the inserted number. |
max | The minimum value of the inserted number. |
step | Defines the interval for valid numbers (starting with the min value). |
If all meta information are given, the customer will be presented with a slider for assisting the input.
...
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.
...
This is how the buttons will be displayed to the customer:
...
As soon as the customer triggers the action “Accept” a form with the information pops up:
...
After clicking “Send”, a request is sent to the webhook of the partner:
...