Create a Q
Description:
This endpoint is used to create a new Q on Ryng. This endpoint creates a new Q and also optionally adds customer data to the Q. Customer Data can be added as JSON, or can also be pulled from an existing Campaign. Agent assignment can also be performed either by specifying a preset mapping, or by choosing a round-robin assignment mechanism across selected agents. You can also use callbacks to get data back from Ryng for every call that is attempted.
URL
https://<subdomain>.ryng.in/rest-api/v1/progressive/queue
Replace
<subdomain>with your account subdomain.
Method
POST
Headers
x-access-token
The access token is provisioned for you by Ryng. If you do not have this already, please reach out to your Ryng project champion. Alternatively you can raise a request on our support portal.
Body
Type: json
name
String
Give a custom name for the queue. This can be leveraged to indicate the source of lead or a unique identifier like lead# from your CRM.If not specified, default value is “queue::<timestamp>”
No
description
String
Descrption of queue. It can be something specific to the queue’s purpose
No
agentMapping
String
Specify how agents should be assigned to queue calls • global - The agents to be assigned will be defined (by username) in the agents parameter • inline - Agents to be assigned for calls are fetched from the agentsAssigned parameter within jsonData, or from within the selected campaign • all-agents - (default) All agents are available to be assigned for queue calls
agents
Array of Strings
Specify one or more agent usernames amongst whom the leads/customers should be assigned
Yes - if agentMapping set to implicit
legDirection
String
Should we connect to the agent first, or the customer? • agent-first - Agent gets the call before the customer does • customer-first - Customer gets the call before the agent does Default setting fetched from tenant default queue settings if not specified
maxRetries
Number
Maximum number of retries to be made to customers who are unreachable or busy Default setting fetched from tenant default queue settings if not specified
No
retryInterval
Number
Minimum interval (in minutes) between retries for unreachable customersDefault setting fetched from tenant default queue settings if not specified
No
maxDisposeTime
Number
Time allotted (in seconds) for disposing a call before the next call is initiatedDefault setting fetched from tenant default queue settings if not specified
No
outputToLSQ
Boolean
Set this flag if you would like us to send call-related updates to your LeadSquared CRM, as a custom activity called "Call via Ryng" (Note: This requires that your Ryng is already integrated with your LeadSquared account. Reach out to our support team to get this configured.)
No
customFieldNames
Object
Header names for custom fields. Object keys should be of the format customField{number}Name ex. { "customField1Name": "Name", "customField2Name": "Brand", "customField3Name": "Product" }
No
customerData
Object
Contains customer data to be uploaded to queue. Check CUSTOMER DATA EXAMPLES section for examples • campaignID - (number) get call data from specified campaign. If agentMapping is set to inline then agent list is also fetched from specified campaign. See example here. • terminalCallbackUrl - (string) Optional URL endpoint to receive callbacks on the terminal state of each call (i.e., each row of customer data) in this request. One callback will be sent per call. The callback will contain all metadata and disposition details for that particular call, and will be sent as a POST request to this endpoint. Format of the callback is given below. The API expects to receive a 200 OK response from the callback URL endpoint upon successful receipt of callback. On any non-200 response, Ryng will retry the callback at 1 minute intervals up to two more times. • connectCallbackUrl - (string) Optional URL endpoint to trigger a callback whenever an individual call (customer) is assigned to an agent. A single callback will be sent as a POST request to this endpoint each time a call is assigned to an agent. The callback will contain all metadata for that particular call in the body, the format of which is given below. The API expects to receive a 200 OK response from the callback URL endpoint. On any non-200 response, Ryng will retry the callback after a 1 minute interval one more time. • jsonData - (json) Call data is specified as an array of call objects Default Fields → number - (Required) (String) Customer number to call for a given call → priority - (Number) Number based priority of the call. Bigger the number, higher the priority → agentsAssigned - (Array of Strings) Comma separated list of assignable agents to a specific call → customField{Number} - (ex. customField1) (String) Custom field values for a given
Yes
Example Body
Customer Data Examples
Call Upload From Existing Campaign
Call Upload From JSON Data
API Responses
Create Q API
POST https://tenant.ryng.in/rest-api/v1/progressive/queue
Headers
x-access-token*
String
Terminal Callback Body Example
Connect Callback Body Example
Last updated