Aivo para desarrolladores

¡Despliega todo el potencial!

Un complemento es un elemento HTML que te permitirá mostrar componentes visuales en la ventana de AgentBot.

Conoce a algunos de ellos:

  • Complemento Botones
  • PDF
  • Complemento FormData
  • Carrusel
  • Derivación OpenChat

Campos

Field Description Type Default Required
message Must be UTF-8 and corresponds to the message that will be sent to the client. String Null No
Type Corresponds to the message type that will be rendered.
It can be «message», «buttons», «formData» or any supported complement.
String «message» No
Params Complement Data Object Object String No

CAMPO

Mensaje

Descripción

Debe ser UTF-8 y corresponde al mensaje que se enviará al cliente.

Escriba

Cuerda

DEFECTO

Nulo

OBLIGATORIO

No

CAMPO

Escriba

Descripción

Debe ser "botones" y corresponde al tipo de mensaje que se emitirá.

Escriba

Cuerda

DEFECTO

"Mensaje"

OBLIGATORIO


CAMPO

Params

Descripción

Botones Componente Objeto

Escriba

Objeto

DEFECTO

Nulo

OBLIGATORIO


Complemento Botones

Este complemento te permite agregar botones al mensaje para generar acciones. Los botones pueden enviar un mensaje del cliente al agente, abrir una URL o transferir una conversación a Live.

Ejemplo

Fields

Field Description Type Default Required
message Must be UTF-8 and corresponds to the message that will be sent to the client. String null No
type Must be «buttons» and corresponds to the message type that will be rendered. String «message» Yes
params buttons component object Object null Yes

FIELD

Message

Description

Must be UTF-8 and corresponds to the message that will be sent to the client.

Type

String

DEFAULT

Null

REQUIRED

No

FIELD

Type

Description

Must be «buttons» and corresponds to the message type that will be rendered.

Type

String

DEFAULT

«Message»

REQUIRED

Yes

FIELD

Params

Description

Buttons Component Object

Type

Object

DEFAULT

Null

REQUIRED

Yes

Buttons Component Object

Field Description Type Default Required
blockInput Block the text field to send message. It can be true or false. Boolean false No
onechoice Allow select a single option. After selecting an option the complement will be blocked. It can be true or false. Boolean false No
quickreplies Show buttons like a quick replies Boolean false No
data Array of Button Objects Array null Yes

FIELD

BlockInput

Description

Block the text field to send message. It can be true or false.

Type

Boolean

DEFAULT

False

REQUIRED

No

FIELD

OneChoice

Description

Allow select a single option. After selecting an option the complement will be blocked. It can be true or false.

Type

Boolean

DEFAULT

False

REQUIRED

No

FIELD

QuickReplies

Description

Show buttons like a quick replies

Type

Boolean

DEFAULT

False

REQUIRED

No

FIELD

Data

Description

Array of Button Objects

Type

Array

DEFAULT

Null

REQUIRED

Yes

Button Object

Field Description Type Default Required
type Type of actions that will be dispatched for buttons.
It can be «message», «link», «transferToLive», «step» or «call».
If quickReplies is true, button type must by «message» or «link».
String «message» No
label Text to show into button. String null Yes
value Value to be sent when dispatch the button event String null Yes
conditions Array of Conditions Array Null No

FIELD

type

Description

Type of actions that will be dispatched for buttons.
It can be «message», «link», «transferToLive», «step» or «call».
If quickReplies is true, button type must by «message» or «link».

Type

String

DEFAULT

«message»

REQUIRED

No

FIELD

label

Description

Text to show into button.

Type

String

DEFAULT

Null

REQUIRED

Yes

FIELD

value

Description

Value to be sent when dispatch the button event.

Type

String

DEFAULT

Null

REQUIRED

Yes

FIELD

conditions

Description

Array of Conditions

Type

Array

DEFAULT

Null

REQUIRED

No

Complemento FormData

El FormData Complement te permite solicitar datos a un cliente para disparar un evento. El formulario puede transferir la conversación a Live o realizar otros eventos que aún no están disponibles.

Ejemplo

Fields

Field Description Type Default Required
message Must be UTF-8 and corresponds to the message that will be sent to the client. String Null No
Type Must be «formData» and corresponds to the message type that will be rendered. String «message» Yes
Params FormData Component Object Object Null Yes

FIELD

Message

Description

Must be UTF-8 and corresponds to the message that will be sent to the client.

Type

String

DEFAULT

Null

REQUIRED

No

FIELD

Type

Description

Must be «formData» and corresponds to the message type that will be rendered.

Type

String

DEFAULT

«Message»

REQUIRED

Yes

FIELD

Params

Description

FormData Component Object

Type

Object

DEFAULT

Null

REQUIRED

Yes

FormData Component Object

Field Description Type Default Required
type Type of actions that will be dispatched to submit form. It can be «transfer» or «step». string «transfer» No
blockinput Block the text field to send message. It can be true or false. Boolean False No
groupld Group Id of AgentIQ to send form data integer null No
Data Array of Input Field Objects. Array Default
Input
Fields
Array
No
nextStep For forms of steps string Null No

FIELD

type

Description

Type of actions that will be dispatched to submit form. It can be «transfer» or «step».

Type

String

DEFAULT

«transfer»

REQUIRED

No

FIELD

blockinput

Description

Block the text field to send message. It can be true or false.

Type

Boolean

DEFAULT

False

REQUIRED

No

FIELD

groupld

Description

Group Id of AgentIQ to send form data.

Type

integer

DEFAULT

null

REQUIRED

No

FIELD

Data

Description

Array of Input Field Objects.

Type

Array

DEFAULT

Default
Input
Fields
Array

REQUIRED

No

FIELD

nextStep

Description

For forms of steps

Type

string

DEFAULT

Null

REQUIRED

No

Input Field Object

Field Description Type Default Required
ref Input field reference keyword. Should be on lowerCamelCase and written in English. String null Yes
label Text to show into input field. (like a placeholder). String null Yes
type Type of field. It can be «text», «email», «number», «checkbox», «select» or «search». String «text» No
required Required field. Validate that the field is not empty. Validate that the text entered corresponds with the type of field. It can be true or false. boolean false No
regex Regular expression for validation. Not include the / at the beginning and end of the string. string null No
options Only to inputs with type «select» and «search» Array of Option Objects. array null No
conditions Only to inputs with type «select» and «search» is condition field. boolean null No
error All inputs of any type. This field set the error tooltip message shown when the validation fail.
If isn’t setted, a default message will be shown.
string null No
dependency This object set a relationship between two fields. When the parent match the value, the child field is shown. object null No

FIELD

ref

Description

Input field reference keyword. Should be on lowerCamelCase and written in English.

Type

string

DEFAULT

Null

REQUIRED

Yes

FIELD

label

Description

Text to show into input field. (like a placeholder).

Type

string

DEFAULT

Null

REQUIRED

Yes

FIELD

type

Description

Type of field. It can be «text», «email», «number», «checkbox», «select» or «search».

Type

string

DEFAULT

«text»

REQUIRED

No

FIELD

required

Description

Required field. Validate that the field is not empty. Validate that the text entered corresponds with the type of field. It can be true or false.

Type

boolean

DEFAULT

False

REQUIRED

No

FIELD

regex

Description

Regular expression for validation. Not include the / at the beginning and end of the string.

Type

String

DEFAULT

Null

REQUIRED

No

FIELD

options

Description

Only to inputs with type «select» and «search» Array of Option Objects.

Type

Array

DEFAULT

Null

REQUIRED

No

FIELD

conditions

Description

Only to inputs with type «select» and «search» is condition field.

Type

boolean

DEFAULT

Null

REQUIRED

No

FIELD

error

Description

All inputs of any type. This field set the error tooltip message shown when the validation fail.
If isn’t setted, a default message will be shown.

Type

string

DEFAULT

Null

REQUIRED

No

FIELD

dependency

Description

This object set a relationship between two fields. When the parent match the value, the child field is shown.

Type

object

DEFAULT

Null

REQUIRED

No

Dependency Object

Un input con esta property object se mostrará cuando el valor del componente padre coincida con el del hijo. El object tiene dos propiedades:

  • ref: El nombre del campo padre.
  • value: El valor del input padre. Si este coincide con el del hijo, entonces mostrará al hijo.

La property requerida en un input con dependency property sólo se valida cuando el input es mostrado.

En el siguiente ejemplo, si el usuario hace click en la casilla de verificación, los dos campos (nombre e email) se mostrarán.