Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejson
        {
            "data" : {
                "replyTo" : "",
                "id" : "1601da67-ccf3-495e-b86b-3c51bae8789d",
                "messageType" : "FORM_RESPONSE",
                "content" : {
                    "title" : "Titolo Form",
                    "response_to_bot" : "ciao",
                    "formData" : [ 
                        {
                            "value" : "Enghouse",
                            "label" : "Società",
                            "customMandatoryErrorMessage" : "Campo obbligatorio",
                            "isMandatory" : true,
                            "custom_regexp" : "",
                            "customValidationErrorMessage" : "",
                            "mode" : "manual",
                            "isEditable" : true,
                            "isVisibleCustomer" : true,
                            "isVisibleAgent" : true,
                            "name" : "company",
                            "dc_type" : "text"
                        }, 
                        {
                            "label" : "Indirizzo",
                            "custom_regexp" : "",
                            "name" : "address",
                            "isEditable" : true,
                            "customMandatoryErrorMessage" : "Indirizzo obbligatorio",
                            "isVisibleCustomer" : true,
                            "isVisibleAgent" : true,
                            "mode" : "manual",
                            "value" : "Viale Sarca 336, edificio 12",
                            "dc_type" : "text",
                            "isMandatory" : true,
                            "customValidationErrorMessage" : ""
                        }, 
                        {
                            "value" : "legal.operations@enghouse.com",
                            "dc_type" : "email",
                            "isVisibleCustomer" : true,
                            "mode" : "manual",
                            "isMandatory" : true,
                            "isVisibleAgent" : true,
                            "customMandatoryErrorMessage" : "Email obbligatoria",
                            "custom_regexp" : ".*@.*",
                            "customValidationErrorMessage" : "Email non valida",
                            "label" : "Email",
                            "name" : "email2",
                            "isEditable" : true
                        }, 
                        {
                            "options" : {
                                "mattina" : "Mattina",
                                "pomeriggio" : "Pomeriggio"
                            },
                            "name" : "fascia",
                            "isMandatory" : true,
                            "dc_type" : "select",
                            "value" : "mattina",
                            "isVisibleCustomer" : true,
                            "customValidationErrorMessage" : "",
                            "isEditable" : true,
                            "mode" : "manual",
                            "customMandatoryErrorMessage" : "Fascia richiamo obbligatoria",
                            "isVisibleAgent" : true,
                            "custom_regexp" : "",
                            "label" : "Quando vuoi essere richiamato?"
                        }
                    ],
                    "user" : {
                        "id" : "USER_DEFAULT_9a0a411c-f9c7-4af7-9754-024bf157a3ef",
                        "isAgent" : false
                    }
                },
                "ts" : 1679325479470.0,
                "deliverySuccess" : true,
                "deliveryErrorReason" : ""
            },
            "_id" : ObjectId("64187943bb85a6727df80efc"),
            "room" : "CHAT_DEFAULT_df3b98ab-4a53-4d1f-8138-c3b45a58c9a0"
        }

Reaction message:

Name

Type

Description

emoji

Status
titlestring

emoji sent

user

Status
titleobject

Semplified user object containing only user id and isAgent properties of the user who sent the message.

Example

Code Block
languagejson
        {
            "data" : {
                "replyTo" : "223908fd-93ce-432d-b3b2-0b4f90b70c74",
                "id" : "wamid.HBgMMzkzNDAzNjA5MTY5FQIAEhggMTdBREMzMjJGRjJDRDU2RjY5NUVFMDM4RDBFQTBBQTQA",
                "messageType" : "REACTION",
                "content" : {
                    "emoji" : "👍🏻",
                    "user" : {
                        "id" : "393403609169",
                        "isAgent" : false
                    }
                },
                "ts" : 1679329738463.0,
                "deliverySuccess" : true,
                "deliveryErrorReason" : ""
            },
            "room" : "CHAT_DEFAULT_c1201fe5-e653-4540-a766-b583bfeb4c8c"
        }

Contacts message:

Name

Type

Description

contacts

Status
titlearray

array of objects representing the contact. See the table below for the properties of the contact object.

user

Status
titleobject

Semplified user object containing only user id and isAgent properties of the user who sent the message.

option object:

Name

Type

Description

name

Status
titleobject

object containing the name of the contact. See table below for details.

phones

Status
titlearray

Array of objects containing the phone numbers of the contact. See table below

name object:

Name

Type

Description

first_name

Status
titlestring

contact name

formatted_name

Status
titlestring

contact formatted name

phone object:

Name

Type

Description

phone

Status
titlestring

phone number

wa_id

Status
titlestring

whatsapp id

type

Status
titlestring

phone type

Example

Code Block
languagejson
        {
            "data" : {
                "replyTo" : "",
                "id" : "wamid.HBgMMzkzNDAzNjA5MTY5FQIAEhggMUMzQUREMEI1NzAzMDkyOTc1NTUwOUVBNERENkM0QTUA",
                "messageType" : "CONTACTS",
                "content" : {
                    "contacts" : [ 
                        {
                            "name" : {
                                "first_name" : "Felice Griffi",
                                "formatted_name" : "Felice Griffi"
                            },
                            "phones" : [ 
                                {
                                    "phone" : "+39 339 366 9393",
                                    "wa_id" : "393393669393",
                                    "type" : "Cellulare"
                                }
                            ]
                        }, 
                        {
                            "name" : {
                                "first_name" : "Giulia Cavazzana",
                                "formatted_name" : "Giulia Cavazzana"
                            },
                            "phones" : [ 
                                {
                                    "phone" : "+39 039 606 6024",
                                    "type" : "Casa"
                                }, 
                                {
                                    "phone" : "+39 347 192 6356",
                                    "wa_id" : "393471926356",
                                    "type" : "Cellulare"
                                }
                            ]
                        }
                    ],
                    "user" : {
                        "id" : "393403609169",
                        "isAgent" : false
                    }
                },
                "ts" : 1679329765410.0,
                "deliverySuccess" : true,
                "deliveryErrorReason" : ""
            },
            "room" : "CHAT_DEFAULT_c1201fe5-e653-4540-a766-b583bfeb4c8c"
        }

Location message:

Name

Type

Description

latitude

Status
titlenumber

latitude coordinate

longitude

Status
titlenumber

longitude coordinate

name

Status
titlestring

location name

url

Status
titlestring

location public url

user

Status
titleobject

Semplified user object containing only user id and isAgent properties of the user who sent the message.

Example

Code Block
languagejson
        {
            "data" : {
                "replyTo" : "",
                "id" : "wamid.HBgMMzkzNDAzNjA5MTY5FQIAEhggNDIzQTgwNjQ5QzFCMkNFRDI1MzA5QTQzQjEyQzM3MTkA",
                "messageType" : "LOCATION",
                "content" : {
                    "address" : "Via pascoli, Bellusco, Lombardia",
                    "latitude" : 45.618205788846,
                    "longitude" : 9.4231867131938,
                    "name" : "Centro sportivo bellusco",
                    "url" : "https://foursquare.com/v/4cf222607bf3b60c0b28647f",
                    "user" : {
                        "id" : "393403609169",
                        "isAgent" : false
                    }
                },
                "ts" : 1679329786335.0,
                "deliverySuccess" : true,
                "deliveryErrorReason" : ""
            },
            "_id" : ObjectId("641889f6bb85a6727df80f7b"),
            "room" : "CHAT_DEFAULT_c1201fe5-e653-4540-a766-b583bfeb4c8c"
        }

Video chat events messages:

...

Name

Type

Description

user

Status
titleobject

Semplified user object containing only user id and isAgent properties of the user who sent the message.

Example

Code Block
languagejson
{
    "data" : {
        "id" : "b88d3de0-23b8-41d1-95c3-1209dd4c8cff",
        "messageType" : "endChat",
        "ts" : 1617786896642.0,
        "deliverySuccess" : true,
        "deliveryErrorReason" : "",
        "content" : {
            "user" : {
                "isAgent" : false,
                "id" : "USER_DEFAULT_9a0a411c-f9c7-4af7-9754-024bf157a3ef"
            }
        }
    },
    "_id" : ObjectId("606d7810d6e88353f8873297"),
    "room" : "CHAT_DEFAULT_d06723cf-518e-4767-99b6-6d21d5998081"
}