Add record

Add a new record to a project’s database.

If the value field (that can handle only one value) contains text, then:

  • it finds the field value based on the text input, and sets it (based on the id)
  • if it does not find the field value, then it automatically creates a new field value

If the value field (that can handle more than one values) contains text, then:

  • it attempts to divide the text separated by the “|” character
  • if it doesn’t find any “|” character, then it handles it as one value

The followings apply to each separated values:

  • it finds the field value based on the text input, and sets it (based on the id)
  • if it does not find the field value, then it automatically creates a new field value
Request
Method POST
Resource https://[customer].asp.virtual-call-center.eu/v2/projects/[projectid]/records
Options N/A
Body Customised data, encoded in JSON.
Response
Body States whether the request is successful or not.

Request

Resource parameters

Name Type Mandatory Comment
customer string yes Your call centre’s unique identifier (subdomain).
numberid integer yes Unique record identifier.
projectid integer yes Unique project identifier.

Request object

Name Type Mandatory Comment
contacts object no Contains all contact data related to the client.
disposition object no Disposition for the given record to be set.
form object yes The record’s customised data, such as name, telephone number, address, city, likes, etc. can be set via the form key. If simple or multiple values are set, use ‘valueid’.
phone_field srting no Which telephone number should be called next. Possible values: phone1, phone2…phone9
premium object no Agent and call centre commissions.

Contacts object

Name Type Mandatory Comment
email string no Email of the contact.
name string no Name of the contact.
phone string yes Phone number of the contact.
title string no Title of the contact e.g.: supervisor, Head of Customer Service.

Premium object

Name Type Mandatory Comment
commission string no Agent’s commission value connected to the record.
price string no Call centre commission value connected to the record.

Disposition object

Name Type Mandatory Comment
dispositionid integer yes Unique disposition identifier.
next_calldate string no If call-back or shared call-back type dispositions are set, this is the next time the record is due to be called, in YYYY-MM-DD hh-mm-ss format.
userid string yes Unique user identifier.

Response

Response object

Name Type Comment
response array Unique ‘numberid'(s) of the inserted record(s).

Example

URL: https://mycc.asp.virtual-call-center.eu/v2/projects/134/records

Request body

{
    "phone_field": "phone4",
    "form": {
        "name": "Peter Green",
        "city": "Budapest",
        "likes": "sports|movies"
    },
    "contacts": {
        "1": {
            "title": "Supervisor",
            "name": "Peter Green",
            "phone": "3619997400",
            "email": "peter.green@email.com"
        },
        "4": {
            "phone": "3619996400"
        }
    },
    "premium": {
        "price": "100",
        "commission": "50"
    },
    "disposition": {
        "dispositionid": "1",
        "userid": "7",
        "next_calldate": "2015-07-20 10:26:55"
    }
}

Response body

{
    "errors": [],
    "response": [
        6
    ]
}

There are no comments yet.

Comment

Subscribe to our newsletter
or Contact us!