Skip to main content

$caila.getClientEntityRecords

Returns the list of all the records of an entity for a certain client.

tip
Use the $caila.getEntity method to get the list of common entity records not specific for a certain client.

Syntax

The method accepts the entity name and the clientId as arguments:

$caila.getClientEntityRecords("ClientEntity");
ParameterTypeMandatoryDescription
EntityNamestringYesName of the entity where the record is to be added.
clientIdstringNoClient ID.
classifierTokenstringNoAPI key used to access an external trained classifier.

How to use

Script:

state:
q!: records
a: The following records were created for the ClientEntity entity and the {{$request.channelUserId}} client:
a: {{JSON.stringify($caila.getClientEntityRecords("ClientEntity"))}}

List of records for the ClientEntity entity:

{
"id":711091, //record ID
"type":"pattern", //method used to specify the record value
"rule":"two", //record value
"value":"2" //value associated with the record
},
{
"id":711090,
"type":"synonyms",
"rule":"one",
"value":"1"
},
{
"id":711092,
"type":"synonyms",
"rule":"three",
"value":"3"
}