# HuggyIntegrations Object

Huggy provides a set of information about customer service directly in the browser through the huggyIntegrations object. With this feature, you can expand the capabilities of your operation by developing customized solutions.

For example, it is possible to offer agents a Huggy-integrated browser extension that sends information to a CRM during service.

# How to Use

With the global Huggy Integrations object, you have access to the logged-in user, contact, and current chat data from the Huggy platform via JavaScript. To view this object in the browser, open a chat and type huggyIntegrations in the console.

An object with the following information will be displayed:

{
    “contact”: {
        “id”: 123456789,
        “name”: "john Doe",
        “email”: "john@doe.com",
        “phone”: "551133333333",
        “mobile”: "5511999999999"
    },
    “chat”: {
        “id”: 987654321,
        “agent”: {
            “id”: 456789,
            “name”: "Charlie Eduard",
            “email”: "charlie@eduard.com"
        }
    },
    “user”: {
        “id”: 123456,
        “name”: "Mary Smith",
        “email”: "mary@smith.com"
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

# Object Properties

FieldDescriptionType
chatObject containing information about the current serviceobject
chat.idService identifierinteger
chat.agentUser who is performing the current serviceobject
contactContact currently being viewedobject
contact.idContact ID at Huggyinteger
contact.nameContact namestring
contact.emailContact emailstring
contact.mobileContact mobilestring
contact.phoneContact phonestring
userUser connected to Huggyobject
user.emailUser emailstring
user.idUser identifierinteger
user.nameUser namestring

Field: chat

Object containing information about the current service

object

Field: chat.id

Service identifier

integer

Field: chat.agent

User who is performing the current service

object

Field: contact

Contact currently being viewed

object

Field: contact.id

Contact ID at Huggy

integer

Field: contact.name

Contact name

string

Field: contact.email

Contact email

string

Field: contact.mobile

Contact mobile

string

Field: contact.phone

Contact phone

string

Field: user

User connected to Huggy

object

Field: user.email

User email

string

Field: user.id

User identifier

integer

Field: user.name

User name

string