Jump to: navigation, search
(Overview)
(AddAttachment)
Line 2: Line 2:
 
__NOTOC__
 
__NOTOC__
 
This operation is part of the [[Chat|Chat API]] section of the [[Welcome|Web Services API]].
 
This operation is part of the [[Chat|Chat API]] section of the [[Welcome|Web Services API]].
==Overview==
+
 
 +
==Add Existing Document==
 +
 
 +
===Overview===
 
This request adds a document  that was previously saved in UCS database to the specified chat.
 
This request adds a document  that was previously saved in UCS database to the specified chat.
  
Line 16: Line 19:
 
|}
 
|}
  
==Parameters==
+
===Parameters===
 
{|
 
{|
 
! Parameter
 
! Parameter
Line 41: Line 44:
 
|}
 
|}
  
==Sample==
+
===Sample===
===Request===
 
 
<source lang="text">
 
<source lang="text">
 
POST api/v2/me/chats/0001PaBMYY3600R8  
 
POST api/v2/me/chats/0001PaBMYY3600R8  
Line 174: Line 176:
 
}
 
}
 
</source>
 
</source>
 +
 +
==Add New Document==
 +
 +
===Overview===
 +
This request adds a new document to the specified chat. UCS creates a document record and associates it with the specified chat.
 +
 +
{|
 +
! Request URL
 +
| /api/v2/me/chats/{id}
 +
|-
 +
! HTTP Method
 +
| POST
 +
|-
 +
! Required Features
 +
| api-multimedia
 +
|}
 +
 +
===Parameters===
 +
{|
 +
! Parameter
 +
! Value
 +
|-
 +
| Attachment
 +
| The uploaded document in the request.
 +
|}
 +
 +
===Sample===
 +
<source lang="text">
 +
POST api/v2/me/chats/0001PaBMYY3600R8
 +
 +
{
 +
"operationName": "AddAttachment",
 +
"documentId": "0000YaB6ARKB0019"
 +
}
 +
</source>
 +
 +
===Response===
 +
<source lang="text">
 +
{
 +
  "statusCode": 0,
 +
  "referenceId": 3,
 +
}
 +
</source>
 +
 +
===Notification===
 +
<source lang="text">
 +
{
 +
    "chat": {
 +
        "attachments": [
 +
    {
 +
                "id": "0000TaBTNRPW01GY",
 +
                "mime": "text/plain",
 +
                "name": "testfileUploadAgent.txt",
 +
                "path": "/attachments/0001PaBMYY3600RC",
 +
                "size": 46,
 +
                "uri": "http://.../api/v2/chats/0001PaBMYY3600R8/attachments/0000TaBTNRPW01GY"
 +
            },
 +
        ],
 +
        "capabilities": [
 +
            "Transfer",
 +
            "Leave",
 +
            "Invite",
 +
            "Consult",
 +
            "SetInFocus",
 +
            "SetDisposition",
 +
            "AttachUserData",
 +
            "DeleteUserData",
 +
            "UpdateUserData",
 +
            "Complete",
 +
            "SendMessage",
 +
            "SendUrl",
 +
            "SendStartTypingNotification",
 +
            "SendStopTypingNotification",
 +
            "SendCustomNotice"
 +
        ],
 +
        "chatType": "Inbound",
 +
        "id": "0001PaBMYY3600R8",
 +
        "interactionQueue": "CloudPoDSimpleChatInQ",
 +
        "participants": [
 +
            {
 +
                "id": "009F5790F75F009A",
 +
                "nickname": "FirstStep",
 +
                "participantId": "009F5790F75F009A",
 +
                "type": "Customer",
 +
                "visibility": "All"
 +
            },
 +
            {
 +
                "id": "009F5790F3F9008A",
 +
                "nickname": "PoD service",
 +
                "participantId": "009F5790F3F9008A",
 +
                "type": "External",
 +
                "visibility": "All"
 +
            },
 +
            {
 +
                "id": "009F5790F765009C",
 +
                "nickname": "TestName",
 +
                "participantId": "009F5790F765009C",
 +
                "path": "/users/0bcb93c9854f41d6ad89344047ec3223",
 +
                "type": "Agent",
 +
                "uri": "http://.../api/v2/users/0bcb93c9854f41d6ad89344047ec3223",
 +
                "visibility": "All"
 +
            }
 +
        ],
 +
        "receivedDate": "2016-07-21 19:35:03.000+0300",
 +
        "state": "Chatting",
 +
        "suggestedQueueUris": [
 +
            "http://.../api/v2/queues/62464e99-53c8-4fda-9cfd-c63dee679c6d"
 +
        ],
 +
        "threadId": "0001PaBMYY3600T9",
 +
        "uri": "http://.../api/v2/chats/0001PaBMYY3600R8",
 +
        "userData": {
 +
            "CBR-IT-path_DBIDs": "",
 +
            "CBR-Interaction_cost": "",
 +
            "CBR-actual_volume": "",
 +
            "CBR-contract_DBIDs": "",
 +
            "ChatServerAppName": "esv_chat_srv_851",
 +
            "ChatServerDBID": "159",
 +
            "ChatServerHost": "dev-ip9-152.gws.genesys.com",
 +
            "ChatServerPort": "7160",
 +
            "CustomerSegment": "default",
 +
            "IW_BundleUid": "0ceb38e6-c3dc-412d-1d55-9f9c13a2af9e",
 +
            "IW_CaseUid": "6d1f299c-4b0e-4766-2631-86641b43ed1b",
 +
            "IdentifyCreateContact": "3",
 +
            "OccuredAt": "2016-07-21T16:25:06Z",
 +
            "PegAG?:2>1": 1,
 +
            "RRequestedSkillCombination": "",
 +
            "RRequestedSkills": null,
 +
            "RStrategyDBID": "472",
 +
            "RStrategyName": "CloudPoDSimpleChatInStrategy",
 +
            "RTargetAgentGroup": "?:2>1",
 +
            "RTargetAgentSelected": "a1",
 +
            "RTargetObjSelDBID": "",
 +
            "RTargetObjectSelected": "?:2>1",
 +
            "RTargetPlaceSelected": "a1",
 +
            "RTargetRequested": "?:2>1",
 +
            "RTargetRuleSelected": "",
 +
            "RTargetTypeSelected": "2",
 +
            "RTenant": "Environment",
 +
            "RVQDBID": "",
 +
            "RVQID": "",
 +
            "ServiceObjective": 0,
 +
            "ServiceType": "default",
 +
            "Subject": "Test_V2",
 +
            "TimeZone": "120"
 +
        }
 +
    },
 +
    "messageType": "ChatStateChangeMessage",
 +
    "notificationType": "AttachmentAdded",
 +
    "referenceId": 3
 +
}
 +
</source>
 +
 +
  
 
[[Category:V:HTCC:8.5.2DRAFT]]
 
[[Category:V:HTCC:8.5.2DRAFT]]

Revision as of 16:22, August 18, 2016

AddAttachment

This operation is part of the Chat API section of the Web Services API.

Add Existing Document

Overview

This request adds a document that was previously saved in UCS database to the specified chat.

Request URL /api/v2/me/chats/{id}
HTTP Method POST
Required Features api-multimedia

Parameters

Parameter Value
operationName AddAttachment
documentId The document's ID.
size Optional. The file size of the document.
name Optional. The name of the document.
mime Optional. The mime type of the document.

Sample

POST api/v2/me/chats/0001PaBMYY3600R8 
 
{
 "operationName": "AddAttachment", 
 "documentId": "0000YaB6ARKB0019"
}

Response

{
  "statusCode": 0
}

Notification

{ 
    "chat": {
        "attachments": [
	     {
                "id": "0001PaBMYY3600RC",
                "mime": "text/plain",
                "name": "testfileUploadAgent.txt",
                "path": "/attachments/0001PaBMYY3600RC",
                "size": 46,
                "uri": "http://.../api/v2/chats/0001PaBMYY3600R8/attachments/0001PaBMYY3600RC"
            },
	     {
                "id": "0000YaB6ARKB0019",
                "mime": "application/octet-stream",
                "name": "cloud-2015-12-01.log",
                "path": "/attachments/0000YaB6ARKB0019",
                "size": 20053630,
                "uri": "http://.../api/v2/chats/0001PaBMYY3600R8/attachments/0000YaB6ARKB0019"
            }
        ],
        "capabilities": [
            "Transfer",
            "Leave",
            "Invite",
            "Consult",
            "SetInFocus",
            "SetDisposition",
            "AttachUserData",
            "DeleteUserData",
            "UpdateUserData",
            "Complete",
            "SendMessage",
            "SendUrl",
            "SendStartTypingNotification",
            "SendStopTypingNotification",
            "SendCustomNotice"
        ],
        "chatType": "Inbound",
        "id": "0001PaBMYY3600R8",
        "interactionQueue": "CloudPoDSimpleChatInQ",
        "participants": [
            {
                 "id": "009F5790F75F009A",
                 "nickname": "FirstStep",
                 "participantId": "009F5790F75F009A",
                 "type": "Customer",
                 "visibility": "All"
            },
            {
                 "id": "009F5790F3F9008A",
                 "nickname": "PoD service",
                 "participantId": "009F5790F3F9008A",
                 "type": "External",
                 "visibility": "All"
            },
            {
                 "id": "009F5790F765009C",
                 "nickname": "TestName",
                 "participantId": "009F5790F765009C",
                 "path": "/users/0bcb93c9854f41d6ad89344047ec3223",
                 "type": "Agent",
                 "uri": "http://.../api/v2/users/0bcb93c9854f41d6ad89344047ec3223",
                 "visibility": "All"
            }
        ],
        "receivedDate": "2016-07-21 19:25:03.000+0300",
        "state": "Chatting",
        "suggestedQueueUris": [
            "http://192.168.83.63:8090/api/v2/queues/62464e99-53c8-4fda-9cfd-c63dee679c6d"
        ],
        "threadId": "0001PaBMYY3600T9",
        "uri": "http://.../api/v2/chats/0001PaBMYY3600R8",
        "userData": {
            "CBR-IT-path_DBIDs": "",
            "CBR-Interaction_cost": "",
            "CBR-actual_volume": "",
            "CBR-contract_DBIDs": "",
            "ChatServerAppName": "esv_chat_srv_851",
            "ChatServerDBID": "159",
            "ChatServerHost": "dev-ip9-152.gws.genesys.com",
            "ChatServerPort": "7160",
            "CustomerSegment": "default",
            "IW_BundleUid": "0ceb38e6-c3dc-412d-1d55-9f9c13a2af9e",
            "IW_CaseUid": "6d1f299c-4b0e-4766-2631-86641b43ed1b",
            "IdentifyCreateContact": "3",
            "OccuredAt": "2016-07-21T16:25:06Z",
            "PegAG?:2>1": 1,
            "RRequestedSkillCombination": "",
            "RRequestedSkills": null,
            "RStrategyDBID": "472",
            "RStrategyName": "CloudPoDSimpleChatInStrategy",
            "RTargetAgentGroup": "?:2>1",
            "RTargetAgentSelected": "a1",
            "RTargetObjSelDBID": "",
            "RTargetObjectSelected": "?:2>1",
            "RTargetPlaceSelected": "a1",
            "RTargetRequested": "?:2>1",
            "RTargetRuleSelected": "",
            "RTargetTypeSelected": "2",
            "RTenant": "Environment",
            "RVQDBID": "",
            "RVQID": "",
            "ServiceObjective": 0,
            "ServiceType": "default",
            "Subject": "Test_V2",
            "TimeZone": "120"
        }
    },
    "messageType": "ChatStateChangeMessage",
    "notificationType": "AttachmentAdded",
    "referenceId": 43
}

Add New Document

Overview

This request adds a new document to the specified chat. UCS creates a document record and associates it with the specified chat.

Request URL /api/v2/me/chats/{id}
HTTP Method POST
Required Features api-multimedia

Parameters

Parameter Value
Attachment The uploaded document in the request.

Sample

POST api/v2/me/chats/0001PaBMYY3600R8 
 
{
 "operationName": "AddAttachment", 
 "documentId": "0000YaB6ARKB0019"
}

Response

{
  "statusCode": 0,
  "referenceId": 3,
}

Notification

{ 
    "chat": {
        "attachments": [
	     {
                "id": "0000TaBTNRPW01GY",
                "mime": "text/plain",
                "name": "testfileUploadAgent.txt",
                "path": "/attachments/0001PaBMYY3600RC",
                "size": 46,
                "uri": "http://.../api/v2/chats/0001PaBMYY3600R8/attachments/0000TaBTNRPW01GY"
            },
        ],
        "capabilities": [
            "Transfer",
            "Leave",
            "Invite",
            "Consult",
            "SetInFocus",
            "SetDisposition",
            "AttachUserData",
            "DeleteUserData",
            "UpdateUserData",
            "Complete",
            "SendMessage",
            "SendUrl",
            "SendStartTypingNotification",
            "SendStopTypingNotification",
            "SendCustomNotice"
        ],
        "chatType": "Inbound",
        "id": "0001PaBMYY3600R8",
        "interactionQueue": "CloudPoDSimpleChatInQ",
        "participants": [
            {
                 "id": "009F5790F75F009A",
                 "nickname": "FirstStep",
                 "participantId": "009F5790F75F009A",
                 "type": "Customer",
                 "visibility": "All"
            },
            {
                 "id": "009F5790F3F9008A",
                 "nickname": "PoD service",
                 "participantId": "009F5790F3F9008A",
                 "type": "External",
                 "visibility": "All"
            },
            {
                 "id": "009F5790F765009C",
                 "nickname": "TestName",
                 "participantId": "009F5790F765009C",
                 "path": "/users/0bcb93c9854f41d6ad89344047ec3223",
                 "type": "Agent",
                 "uri": "http://.../api/v2/users/0bcb93c9854f41d6ad89344047ec3223",
                 "visibility": "All"
            }
        ],
        "receivedDate": "2016-07-21 19:35:03.000+0300",
        "state": "Chatting",
        "suggestedQueueUris": [
            "http://.../api/v2/queues/62464e99-53c8-4fda-9cfd-c63dee679c6d"
        ],
        "threadId": "0001PaBMYY3600T9",
        "uri": "http://.../api/v2/chats/0001PaBMYY3600R8",
        "userData": {
            "CBR-IT-path_DBIDs": "",
            "CBR-Interaction_cost": "",
            "CBR-actual_volume": "",
            "CBR-contract_DBIDs": "",
            "ChatServerAppName": "esv_chat_srv_851",
            "ChatServerDBID": "159",
            "ChatServerHost": "dev-ip9-152.gws.genesys.com",
            "ChatServerPort": "7160",
            "CustomerSegment": "default",
            "IW_BundleUid": "0ceb38e6-c3dc-412d-1d55-9f9c13a2af9e",
            "IW_CaseUid": "6d1f299c-4b0e-4766-2631-86641b43ed1b",
            "IdentifyCreateContact": "3",
            "OccuredAt": "2016-07-21T16:25:06Z",
            "PegAG?:2>1": 1,
            "RRequestedSkillCombination": "",
            "RRequestedSkills": null,
            "RStrategyDBID": "472",
            "RStrategyName": "CloudPoDSimpleChatInStrategy",
            "RTargetAgentGroup": "?:2>1",
            "RTargetAgentSelected": "a1",
            "RTargetObjSelDBID": "",
            "RTargetObjectSelected": "?:2>1",
            "RTargetPlaceSelected": "a1",
            "RTargetRequested": "?:2>1",
            "RTargetRuleSelected": "",
            "RTargetTypeSelected": "2",
            "RTenant": "Environment",
            "RVQDBID": "",
            "RVQID": "",
            "ServiceObjective": 0,
            "ServiceType": "default",
            "Subject": "Test_V2",
            "TimeZone": "120"
        }
    },
    "messageType": "ChatStateChangeMessage",
    "notificationType": "AttachmentAdded",
    "referenceId": 3
}
Comments or questions about this documentation? Contact us for support!