Append Campaign API

URL

https://<subdomain>.ryng.in/rest-api/v1/campaign/<campaignID>

  • Replace <subdomain> with your account subdomain.

  • Replace campaignID with your campaign ID.

Method

POST

Headers

Key
Description

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 portalarrow-up-right.

Body

For this API, body parameters are accepted in either form-data or JSON format. You can choose the format that best suits your application's requirements or preferences. Note: In order to upload a csv sheet using the campaign-sheet param, you will need to use form-data, since this does not work over JSON

Type: form-data

Key
Type
Description
Required?

campaign-sheet

file

Attach a .csv file with your lead/customer information that is to be assigned to your agents

Yes

agents

text

Specify one or more agents amongst whom the leads/customers should be assigned, or else, use “in-file” to provide agent mapping within the CSV file itself. If not specified, default value = all agents

Yes - if only one lead, or for in-file mapping. No - if more than one lead

Type: JSON

PARAMETER
TYPE
DESCRIPTION
REQUIRED

name

String

Give a custom name for the campaign. 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 “Campaign::<campaignID>”

No

agentMapping

String

Specify how agents should be assigned to campaign 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 campaign 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

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 campaign. Check example body section for the example

→ connectCallbackUrl - Optional URL endpoint to trigger a callback at the major milestones of a call lifecycle. These milestones are: agent picks up, customer picks up, and call termination. Ryng will trigger one callback at each of these stages. 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.

→ terminalCallbackUrl - 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 the callback. On any non-200 response, Ryng will retry the callback at 1-minute intervals up to two more times. → 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 → 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

API Responses

Append Campaign API

POST https://tenant.ryng.in/rest-api/v1/campaign/:id

Query Parameters

Name
Type
Description

id*

String

Campaign ID

Headers

Name
Type
Description

x-access-token*

Provided by Ryng Team

Connect Callback Body Example

Terminal Callback Body Example

Last updated