swilliams | 2020-01-14 20:22:15 UTC | #1
Using the dev tools chat tool, I have the following info coming it.
Array ( [topicName] => v2.users.1a9fcd18-6eb7-4548-b2c1-ebb85f0e5f70.conversations [version] => 2 [eventBody] => Array ( [id] => 82842266-d298-4384-8ea3-c8d01ee0f94a [participants] => Array ( [0] => Array ( [id] => 1c219542-6968-4333-b998-20fe0210b2df [connectedTime] => 2020-01-14T19:56:54.088Z [name] => Brandon Cruz [queueId] => ee901804-a356-4aba-a4b8-0b3eda03dffb [purpose] => customer [address] => removed [wrapupRequired] => [wrapupExpected] => [attributes] => Array ( [context.isFirefox] => false [context.email] => removed [context.isChrome] => true [context.addressStreet] => 275 Sejvo Avenue [context.phoneNumber] => (510) 741-3869 [context.hasChromeExtension] => true [context.customField2Label] => [context.addressPostalCode] => 96589 [context.addressCity] => Inimaog [context.firstName] => Brandon [context.customField3Label] => [context.browserSupported] => true [context.customField3] => [context.customField2] => [context.lastName] => Cruz [ivr.DistributionGroup] => ee901804-a356-4aba-a4b8-0b3eda03dffb [context.addressState] => MA [context.customField1] => [context.purecloud] => true [context.customField1Label] => ) [chats] => Array ( [0] => Array ( [state] => connected [id] => 25aee85a-5080-4ec1-98bb-79e3d228c25a [provider] => PureCloud Webchat [roomId] => acd-e54c7065-5663-47eb-96cb-6f45f33e45d4-conference.23762.orgspanxxx [held] => [connectedTime] => 2020-01-14T19:56:54.167Z [additionalProperties] => Array ( ) ) ) [additionalProperties] => Array ( ) ) [1] => Array ( [id] => b7fd11bd-2015-4df5-a306-2c2e851c9473 [connectedTime] => 2020-01-14T19:56:54.158Z [name] => test [queueId] => ee901804-a356-4aba-a4b8-0b3eda03dffb [purpose] => acd [wrapupRequired] => [wrapupExpected] => [conversationRoutingData] => Array ( [queue] => Array ( [id] => ee901804-a356-4aba-a4b8-0b3eda03dffb ) [language] => Array ( ) [priority] => 0 ) [attributes] => Array ( ) [chats] => Array ( [0] => Array ( [state] => connected [id] => 62c9d6e9-d594-4e39-b9e4-70811b5d6d49 [provider] => PureCloud Webchat [roomId] => acd-e54c7065-5663-47eb-96cb-6f45f33e45d4@conference.23762xxx [held] => [connectedTime] => 2020-01-14T19:56:54.202Z [additionalProperties] => Array ( ) ) ) [additionalProperties] => Array ( ) ) [2] => Array ( [id] => 8db540d8-0458-40d9-b08e-af42090d2449 [userId] => 1a9fcd18-6eb7-4548-b2c1-ebb85f0e5f70 [queueId] => ee901804-a356-4aba-a4b8-0b3eda03dffb [purpose] => agent [wrapupRequired] => [wrapupExpected] => 1 [wrapupPrompt] => timeout [wrapupTimeoutMs] => 120000 [conversationRoutingData] => Array ( [queue] => Array ( ) [language] => Array ( ) [priority] => 0 ) [alertingTimeoutMs] => 30000 [attributes] => Array ( ) [chats] => Array ( [0] => Array ( [state] => alerting [id] => 2148086e-73b3-4355-aba0-0c1528f85332 [provider] => PureCloud Webchat [roomId] => acd-e54c7065-5663-47eb-96cb-6f45f33e45d4@conference.23762xxxx [held] => [additionalProperties] => Array ( ) ) ) [additionalProperties] => Array ( ) ) ) [recordingState] => none ) [metadata] => Array ( [CorrelationId] => 032eb480-3708-11ea-b42e-755425345e3b ) )
I'm trying to answer or connect to the chat using
conversationsApi.patchConversationsChatParticipant(cid, pid, { 'state': 'connected' })
where cid is eventBody.id which is 82842266-d298-4384-8ea3-c8d01ee0f94a which I assume is the conversionId.
I tried using me.id for the pid, but that doesn't work. So I switched to eventBody. participants[2].id for the participant id. I'm now getting a 500 from the server:
Array ( [status] => 500 [statusText] => Internal Server Error [headers] => Array ( [cache-control] => no-cache, no-store, must-revalidate [content-length] => 338 [content-type] => application/json [expires] => 0 [inin-correlation-id] => 2334a0b7-692e-4b17-9f5a-f1e3dde2430f [inin-ratelimit-allowed] => 300 [inin-ratelimit-count] => 12 [inin-ratelimit-reset] => 45 [pragma] => no-cache ) [body] => Array ( [status] => 500 [code] => conversation.participant.update.failed [message] => Failed to update properties on conversation participant. [details] => Array ( ) [errors] => Array ( [0] => Array ( [status] => 500 [code] => internal.server.error [message] => An internal conversation service error has occurred. Please contact support. Message: 500 [details] => Array ( [0] => Array ( [fieldName] => state ) ) ) ) ) [text] => {"status":500,"code":"conversation.participant.update.failed","message":"Failed to update properties on conversation participant.","details":[],"errors":[{"status":500,"code":"internal.server.error","message":"An internal conversation service error has occurred. Please contact support. Message: 500 ","details":[{"fieldName":"state"}]}]} [error] => Array ( [original] => [response] => Array ( [req] => Array ( [method] => PATCH [url] => removed [data] => Array ( [state] => connected ) [headers] => Array ( [authorization] => Bearer Zda3jveedPss8h7V778pZKp7RzDVue7nwgiEo6SFVph9PINRS1XM5_96mCBHpxjMakcS4LhRhTCtuoUpo7h8sA [content-type] => application/json [accept] => application/json ) ) [xhr] => Array ( ) [text] => {"status":500,"code":"conversation.participant.update.failed","message":"Failed to update properties on conversation participant.","details":[],"errors":[{"status":500,"code":"internal.server.error","message":"An internal conversation service error has occurred. Please contact support. Message: 500 ","details":[{"fieldName":"state"}]}]} [statusText] => Internal Server Error [statusCode] => 500 [status] => 500 [statusType] => 5 [info] => [ok] => [redirect] => [clientError] => [serverError] => 1 [error] => Array ( [status] => 500 [method] => PATCH [url] => removed ) [created] => [accepted] => [noContent] => [badRequest] => [unauthorized] => [notAcceptable] => [forbidden] => [notFound] => [unprocessableEntity] => [headers] => Array ( [cache-control] => no-cache, no-store, must-revalidate [content-length] => 338 [content-type] => application/json [expires] => 0 [inin-correlation-id] => 2334a0b7-692e-4b17-9f5a-f1e3dde2430f [inin-ratelimit-allowed] => 300 [inin-ratelimit-count] => 12 [inin-ratelimit-reset] => 45 [pragma] => no-cache ) [header] => Array ( [cache-control] => no-cache, no-store, must-revalidate [content-length] => 338 [content-type] => application/json [expires] => 0 [inin-correlation-id] => 2334a0b7-692e-4b17-9f5a-f1e3dde2430f [inin-ratelimit-allowed] => 300 [inin-ratelimit-count] => 12 [inin-ratelimit-reset] => 45 [pragma] => no-cache ) [type] => application/json [links] => Array ( ) [body] => Array ( [status] => 500 [code] => conversation.participant.update.failed [message] => Failed to update properties on conversation participant. [details] => Array ( ) [errors] => Array ( [0] => Array ( [status] => 500 [code] => internal.server.error [message] => An internal conversation service error has occurred. Please contact support. Message: 500 [details] => Array ( [0] => Array ( [fieldName] => state ) ) ) ) ) ) [status] => 500 ) )
Any pointers would be appreciated.
tim.smith | 2020-01-15 18:15:02 UTC | #2
swilliams, post:1, topic:6875
[message] => An internal conversation service error has occurred. Please contact support. Message: 500
Please open a case with PureCloud Care to investigate. 5xx errors cannot be investigated via the forum.
swilliams | 2020-01-15 18:50:08 UTC | #3
OK. Will do.
But, just for clarification, am I using the correct conversation id and participant id in the call?
tim.smith | 2020-01-15 18:56:31 UTC | #4
I'm not sure. It's pretty difficult to wade through that unformatted output to tell exactly what you're doing or what's going on. If you're using a participant ID that is from the same conversation, it's correct. Whether that's the participant you want to update or not is your call.
system | 2020-02-15 18:56:32 UTC | #5
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 6875