SergioRota | 2018-03-17 10:33:42 UTC | #1
Hi, I have create a Custom Action to Update the ring number of joined status for a User in a Queue: It works well!
Now I'd like to create this Custom Action: Update the ring number of joined status for a Group in a Queue, is It possible?
I think I should probably retrieve Users by GroupId to change their ring number, but how can i insert this in my Custom Action?
Thanks Sergio
Jason_Mathison | 2018-03-21 19:15:46 UTC | #2
I don't really understand what you are doing and what you are asking. Could you provide all of the configuration for the working action for context?
SergioRota, post:1, topic:2633
I think I should probably retrieve Users by GroupId to change their ring number, but how can i insert this in my Custom Action?
A custom action can only make one REST call, so you may need to make two custom actions and wire the output of the first into the input of the second to accomplish your goal.
SergioRota | 2018-03-22 16:17:45 UTC | #3
CONTRACT INPUT
{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "Aggiorna numero squillo", "type": "object", "required": [ "QueueID", "GroupID", "ringNumber" ], "properties": { "QueueID": { "description": "L'Id della coda", "type": "string" }, "GroupID": { "description": "L'Id del gruppo", "type": "string" }, "ringNumber": { "description": "Il numero di squillo di aggiornamento", "type": "integer" } } }
CONTRACT OUTPUT
{ "properties": {} }
CONFIG REQUEST
{ "requestUrlTemplate": "/api/v2/routing/queues/${input.QueueID}/groups/${input.GroupID}/members", "requestType": "PATCH", "headers": {}, "requestTemplate": "{\"ringNumber\" : \"${input.ringNumber}\"}" }
CONFIG RESPONSE
{ "translationMap": {}, "successTemplate": "[${rawResult}]" }
ERROR:
{ "status": 404, "code": "not.found", "message": "The requested resource was not found.", "messageParams": {}, "contextId": "250b5d05-5439-4d6c-907e-9596eac09d84", "details": [], "errors": [ { "status": 404, "code": "NOT_FOUND", "message": "REST call for action execute failed. Message:Request to backend service failed. To see error details, execute request in Postman, or other REST tools. [250b5d05-5439-4d6c-907e-9596eac09d84] [250b5d05-5439-4d6c-907e-9596eac09d84]", "messageParams": {}, "details": [], "errors": [] } ] }
Jason_Mathison | 2018-03-23 17:38:30 UTC | #4
Thank you for your configuration information, I could take a look at what you are trying to do in our API explorer https://developer.mypurecloud.com/developer-tools/#/api-explorer
As far as I can tell we don't have an API that matches the route you are trying to hit "/api/v2/routing/queues/${input.QueueID}/groups/${input.GroupID}/members" which is why you are getting a 404 back.
The closest thing we have is "/api/v2/routing/queues/{queueId}/users/{memberId}". Is that the route you are using in the first action you created?
Are you asking for a new route to be added where you could modify this value for multiple members of the queue?
SergioRota | 2018-03-26 13:48:06 UTC | #5
Jason_Mathison, post:4, topic:2633
Are you asking for a new route to be added where you could modify this value for multiple members of the queue?
Yes!! Can you help me?
tim.smith | 2018-03-28 15:46:04 UTC | #6
I've logged an enhancement request for this request.
system | 2018-04-28 15:55:16 UTC | #7
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: 2633