Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

With our API, you can interact through various channels and keep your contact center always connected.

Remember that in order to use the API, you need:

  1. Authenticate and obtain a token for the session.

  2. Use the token in the Header Authorization.

  3. End session.

More info here.



Campaign stats

List of metrics, for one or more campaigns, between a certain period and interval.

You can check the available metrics here.

To consider:

  • Date from and to are mandatory.

  • You must send, at least, one campaign.

  • The metrics are optional, they will all return by default.

  • The interval is optional, by default they are 15 minutes.

API call:

https://domain.ucontactcloud.com/Integra/resources/WFMApi/campaigns
Method: GET
Content-type: application/json; charset=UTF-8
Parameters: from        (Date from in format YYYY-MM-DD HH:mm)
            to          (Date to in format YYYY-MM-DD HH:mm)
            campaigns   (List of campaigns separated by coma in format channel-Campaign Example: sms-WhatsApp_Campaign,webchat-CustomerSupport,...)
            metrics     (List of metrics separated by coma Example: arts,inMessages,serviceLevel,...)
            interval    (Interval 15, 30 or 60)

Answer: JSON

Request example:

curl --location --request GET 'https://dominio.ucontactcloud.com/Integra/resources/WFMApi/campaigns?from=2021-06-10%2000:00&to=2021-06-10%2023:00&metrics=&campaigns=sms-WhatsApp_Campaign&interval=30' \
--header 'Authorization: Basic YXBpOjgzYTk1YzMwLWYyMjYtNDBkYS04NTc5LWZjYmMxMjAzZDE0NQ==' \
--header 'Content-Type: application/json; charset=UTF-8'

Answer example:

[
    {
        "date": "2021-06-10 00:00",
        "campaign": "WhatsApp_Campaign",
        "channel": "sms",
        "data": {
            "arts": 713.86,
            "inMessages": 5,
            "outMessages": 15,
            "serviceLevel": 0.0,
            "inInteractions": 0,
            "averageHoldTime": 650.25,
            "outInteractions": 0,
            "transferedAgents": 0,
            "averageAttendedTime": 5947.665,
            "transferedCampaigns": 0,
            "averageFirstResponse": 0.835,
            "attendedInInteractions": 2,
            "completedInInteractions": 4,
            "completedOutInteractions": 0,
            "averageTimeInInteractions": 5949.665,
            "averageTimeOutInteractions": 0.0
        }
    },
    {
        "date": "2021-06-10 00:30",
        "campaign": "WhatsApp_Campaign",
        "channel": "sms",
        "data": {
            "arts": 596.0,
            "inMessages": 8,
            "outMessages": 9,
            "serviceLevel": 50.0,
            "inInteractions": 2,
            "averageHoldTime": 0.5,
            "outInteractions": 0,
            "transferedAgents": 0,
            "averageAttendedTime": 1009.75,
            "transferedCampaigns": 0,
            "averageFirstResponse": 0.25,
            "attendedInInteractions": 1,
            "completedInInteractions": 2,
            "completedOutInteractions": 0,
            "averageTimeInInteractions": 1010.75,
            "averageTimeOutInteractions": 0.0
        }
    }
]


Agents stats

List of metrics, for one or more agents, between a certain period and interval.

You can check the available metrics here.

To consider:

  • Date from and to are mandatory.

  • You must send, at least, one agent.

  • The metrics are optional, they will all return by default.

  • The interval is optional, by default they are 15 minutes.

API call:

https://domain.ucontactcloud.com/Integra/resources/WFMApi/agents
Method: GET
Content-type: application/json; charset=UTF-8
Parameters: from        (Date from in format YYYY-MM-DD HH:mm)
            to          (Date to in format YYYY-MM-DD HH:mm)
            agents      (List of agents separated by coma Example: jdoe,msmith,...)
            metrics     (List of metrics separated by coma Example: logged,adherence,breaks,...)
            interval    (Interval 15, 30 or 60)

Answer: JSON

Request example:

curl --location --request GET 'https://dominio.ucontactcloud.com/Integra/resources/WFMApi/agents?from=2021-06-14%2019:00&to=2021-06-14%2023:00&metrics=&agents=srodriguez&interval=30' \
--header 'Authorization: Basic YXBpOjgzYTk1YzMwLWYyMjYtNDBkYS04NTc5LWZjYmMxMjAzZDE0NQ==' \
--header 'Content-Type: application/json; charset=UTF-8'

Answer example:

[
    {
        "date": "2021-06-14 19:30",
        "agent": "srodriguez",
        "data": {
            "logged": 1231,
            "adherence": 0,
            "breaks": {
                "Lunch": 26,
                "Bathroom": 17,
                "Personal": 38
            },
            "calledIn": 2,
            "calledOut": 5,
            "holdIn": 32,
            "holdOut": 0,
            "inCalls": 3423,
            "outCalls": 0,
            "finishedCalls": 0,
            "wrapUp": 0,
            "attendedSmsInteractions": 33,
            "startedSmsInteractions": 0,
            "finishedSmsInteractions": 0,
            "transferredAgentSms": 2,
            "receivedAgentSms": 0,
            "transferedToQueueSms": 0,
            "smsMessagesIn": 0,
            "smsMessagesOut": 2,
            "smsInteractionTime": 0,
            "attendedEmailInteractions": 0,
            "startedEmailInteractions": 3,
            "finishedEmailInteractions": 0,
            "transferredAgentEmail": 3,
            "receivedAgentEmail": 0,
            "transferedToQueueEmail": 0,
            "emailMessagesIn": 0,
            "emailMessagesOut": 0,
            "emailInteractionTime": 0,
            "attendedWebchatInteractions": 0,
            "finishedWebchatInteractions": 0,
            "transferredAgentWebchat": 0,
            "receivedAgentWebchat": 0,
            "transferedToQueueWebchat": 0,
            "webchatMessagesIn": 0,
            "webchatMessagesOut": 0,
            "webchatInteractionTime": 0
        }
    },
    {
        "date": "2021-06-14 20:00",
        "agent": "srodriguez",
        "data": {
            "logged": 1464,
            "adherence": 0,
            "breaks": {},
            "calledIn": 4,
            "calledOut": 12,
            "holdIn": 0,
            "holdOut": 0,
            "inCalls": 3,
            "outCalls": 6,
            "finishedCalls": 0,
            "wrapUp": 0,
            "attendedSmsInteractions": 4,
            "startedSmsInteractions": 0,
            "finishedSmsInteractions": 3,
            "transferredAgentSms": 0,
            "receivedAgentSms": 7,
            "transferedToQueueSms": 0,
            "smsMessagesIn": 0,
            "smsMessagesOut": 0,
            "smsInteractionTime": 9,
            "attendedEmailInteractions": 0,
            "startedEmailInteractions": 0,
            "finishedEmailInteractions": 0,
            "transferredAgentEmail": 0,
            "receivedAgentEmail": 0,
            "transferedToQueueEmail": 0,
            "emailMessagesIn": 0,
            "emailMessagesOut": 2,
            "emailInteractionTime": 0,
            "attendedWebchatInteractions": 0,
            "finishedWebchatInteractions": 0,
            "transferredAgentWebchat": 0,
            "receivedAgentWebchat": 3,
            "transferedToQueueWebchat": 0,
            "webchatMessagesIn": 0,
            "webchatMessagesOut": 0,
            "webchatInteractionTime": 0
        }
    }
]


Interaction stats

List of interaction metrics, for one or more campaigns, between a certain period and interval.

You can check the available metrics here.

To consider:

  • Date from and to are mandatory.

  • You must send, at least, one campaign.

  • The metrics are optional, they will all return by default.

API call:

https://domain.ucontactcloud.com/Integra/resources/WFMApi/campaigns
Method: GET
Content-type: application/json; charset=UTF-8
Parameters: from        (Date from in format YYYY-MM-DD HH:mm)
            to          (Date to in format YYYY-MM-DD HH:mm)
            campaigns   (List of campaigns separated by coma in format channel-Campaign Example: sms-WhatsApp_Campaign,webchat-CustomerSupport,...)
            metrics     (List of metrics separated by coma Example: arts,inMessages,serviceLevel,...)

Answer: JSON

Request example:

curl --location --request GET 'https://dominio.ucontactcloud.com/Integra/resources/WFMApi/interactions?from=2021-06-15%2000:00&to=2021-06-15%2023:00&metrics=&campaigns=sms-WhatsApp_Campaign' \
--header 'Authorization: Basic YXBpOjgzYTk1YzMwLWYyMjYtNDBkYS04NTc5LWZjYmMxMjAzZDE0NQ==' \
--header 'Content-Type: application/json; charset=UTF-8'

Answer example:

[
    {
        "guid": "01cbfda3-17ad-4ef5-9951-3d43d433fb40",
        "date": "2021-06-10 03:08",
        "campaign": "WhatsApp_Campaign",
        "channel": "sms",
        "data": {
            "art": 0,
            "guid": "01cbfda3-17ad-4ef5-9951-3d43d433fb40",
            "start_date": "2021-06-15 03:08:56",
            "end_date": "2021-06-15 07:01:25",
            "channel": "sms",
            "clientname": "Agustin Perez",
            "clientid": "5730024649754",
            "abandon": false,
            "holdtime": 13883,
            "duration": 13949,
            "attentionTime": 66,
            "direction": "inbound",
            "in": 0,
            "out": 0,
            "dateAttended": "2021-06-10 07:00:19",
            "firstResponseTime": 0,
            "campaign": "WhatsApp_Campaign",
            "agent": "srodriguez",
            "finishedbyclient": false
        }
    },
    {
        "guid": "01cbfda3-17ad-4ef5-9951-3d43d433fb40",
        "date": "2021-06-10 03:08",
        "campaign": "WhatsApp_Campaign",
        "channel": "sms",
        "data": {
            "art": 0,
            "guid": "fa51ab96-9a8d-4c8b-938b-b03312765b61",
            "start_date": "2021-06-10 03:08:57",
            "end_date": "2021-06-10 07:06:20",
            "channel": "sms",
            "clientname": "Jorge Lescano",
            "clientid": "573015957306",
            "abandon": false,
            "holdtime": 13882,
            "duration": 14243,
            "attentionTime": 361,
            "direction": "inbound",
            "in": 0,
            "out": 1,
            "dateAttended": "2021-06-10 07:00:19",
            "firstResponseTime": 13960,
            "campaign": "WhatsApp_Campaign",
            "agent": "srodriguez",
            "finishedbyclient": false
        }
    }
]

  • No labels