Skip to content

Request Entity by Name

Nombre del elemento: Solicitud de entidad por nombre (Request Entity by Name)

Category: Variable Manipulation

Description: Basic functionality that contains configurable fields to invoke the request for an entity to the client.

Functionality: Allows calling a configured entity to obtain a response from the client, which can be a specific data such as phone number, ID number, etc., message or survey. This information can be used later in the flow. It has an advanced configuration depending on the type of entity that you want to present.

Action Configuration Fields

[Name]: Unique descriptor for the configuration box used to identify it in the flow.

Configuration Subset (required)

[Presentation when requesting the entity]: A list-type field that allows selecting the type of entity to present for the request. If Default is selected, it will be presented in the default entity format. If Menu is selected, two new optional Configuration Subsets are displayed: Menu Presentation on WhatsApp and Required Configuration for Rich Menu, whose configuration can be consulted HERE

[Entity name obtained from an expression]: Required field of type string expression where an entity (previously created) must be defined for data collection.

Consult 🔎: To create an entity

[Allow null or empty value obtained from an expression]: It must be indicated whether the client can enter blank data for the created entity. If false is indicated, the client must enter data mandatory, otherwise it will be considered incorrect data. By indicating true, the client can leave the data request blank.

[Maximum number of failed attempts obtained from an expression]: It defines a number of failed attempts by the client. That is, if configured as 3 failed attempts, the client will have three opportunities to enter the correct data that is being requested.

[Invalid value message obtained from an expression]: It defines an expression in single quotes. The message will be related to the erroneous input of data by the client.

Example:

‘The entered data does not correspond to what was requested, please try again.’

[Json to define validations that will be applied to the entities requested in the supported channels]: A json expression is defined which will contain validations on the created entity; it may or may not be executed, depending on the configured criteria. This configuration is only valid for entities of type date.

Example:

{

validationType: datetime,
weekdays:[
        mo,tu,we,th,fr,st,su
    ],
disable_current: false,
disable_before: 1,
disable_after: 0,
disabled:[
    2022-06-14,2021-12-31
],
interval: 5
hour_before: 0,
hour_after: 1,
days: {
  mo:[{
            start:15:00,
            end:17:00
        }],

     tu:[{
            start:08:00,
            end:09:00
        }],
we:[{

            start:08:00,
            end:22:00
        }],
th:[{
            start:08:00,
            end:09:30
        }],
fr:[{
            start:08:00,
            end:09:30
        }],
st:[{
            start:08:00,
            end:22:00
        }],
su:[{
            start:08:00,

            end:22:00
        }]
}

}

[Error Handler]: A selection box where the intention that will be activated in case of an error in the "Customer Satisfaction Survey" action is identified. When an error overflow occurs, the Write_Customer_Satisfaction_Survey_Error entity will be loaded with the error detail if it is available.

Example of implementation Request Entity by Name

The example consists of requesting the name of the person which will be used in the greeting.

Preconditions:

Entity: nombrePersona (Type String)

System Entity: @ClientName <- Luis Pérez

--Input

[Presentation when requesting the entity]: Default

[The name of the entity obtained from an expression]: nombrePersona --> String type entity --> Please enter your name

[Allow null or empty value obtained from an expression]: false

[Maximum number of failed attempts obtained from an expression]: 3

[Message for invalid value obtained from an expression]: 'The entered format does not match, please enter your name again'

[Json to define validations that will be applied to the entities requested in the supported channels]: no configuration.

Later, insert a dialog box configuring the text section with the following example:

'Welcome '+nombrePersona + '. This is a test from Lynn'

--Result:

Welcome Luis Pérez. This is a test from Lynn

Advanced Functionality

This extension module has an advanced functionality that is activated by selecting Menu in the [Presentation when requesting the entity] tag. You can check HERE for more details.