Legacy Dev Forum Posts

 View Only

Sign Up

Agents Logged into Queue - Bad Syntax

  • 1.  Agents Logged into Queue - Bad Syntax

    Posted 06-05-2025 18:41

    Will_Bellerby | 2019-08-09 14:30:53 UTC | #1

    Howdy,

    I'm stuck on this.... bit of a novice

    I'm following the setup here https ://developer.mypurecloud.com/forum/t/acd-queue-routing-based-on-if-queue-has-agents-logged-in/2499/2 however getting a malformed syntax error.

    Annoyingly, the code on the page referenced above contains all kinds of different quotes and apostrophes.

    I know I'm 95% of the way there, I feel like it's something to do with the format of the words "On Queue". Unfortunately our brainy guy has gone on holiday...

    Input Contract: { "$schema": "http://json-schema.org/draft-04/schema#", "title": "Get Number of Agents Logged Into Queue Request", "description": "A user ID-based request", "type": "object", "required": [ "QueueID" ], "properties": { "QueueID": { "type": "string", "description": "The Queue ID." } } }

    Output Contract:

    { "$schema": "http://json-schema.org/draft-04/schema#", "title": "Get User Routing Status Response", "description": "Agents logged into queue.", "type": "object", "required": [ "Agents Logged Into Queue" ], "properties": { "Agents Logged Into Queue": { "description": "Agents logged into queue. A value > 0 does not guarantee that an interaction sent to this queue will be answered.", "type": "number", "title": "Agents" } } }

    Request:

    { "requestUrlTemplate": "/api/v2/routing/queues/${input.QueueID}/users?presence=$esc.url('On Queue')", "requestType": "GET", "headers": { "ContactID": "PureCloudIntegrations/1.0", "Content-Type": "application/x-www-form-urlencoded" }, "requestTemplate": "${input.rawRequest}" }

    Response:

    { "translationMap": { "AgentsLoggedIntoQueue": "$.total" }, "translationMapDefaults": {}, "successTemplate": "{ \"Agents Logged Into Queue\": ${AgentsLoggedIntoQueue} }" }

    Error message:

    { "status": 400, "code": "bad.request", "message": "The request could not be understood by the server due to malformed syntax.", "messageParams": {}, "contextId": "4c4961f6-d0e3-4c76-b638-8ec5a87c7550", "details": [ { "errorCode": "ACTION.PROCESSING" } ], "errors": [ { "status": 400, "code": "BAD_REQUEST", "message": "REST call for action execute failed. Message:requestUrlTemplate could not be resolved into a fully qualified URL. [4c4961f6-d0e3-4c76-b638-8ec5a87c7550]", "messageParams": {}, "details": [], "errors": [] } ] }

    THANKS!


    Will_Bellerby | 2019-08-11 20:34:38 UTC | #2

    Ahhhhhhhhhhhhhhhhhh I was just being silly, I had created the action as a web service action and not a PureCloud data action.

    I knew it would be simple...!


    system | 2019-09-11 20:34:41 UTC | #3

    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: 5739