Add field and values
Add a field and their relevant values to a project.
Request | |
---|---|
Method | POST |
Resource | https://[customer].asp.virtual-call-center.eu/v2/projects/[projectid]/fields |
Options | N/A |
Body | Field and relevant values, encoded in JSON. |
Response | |
Body | New fieldID(s), encoded in JSON. |
Request
Resource parameters
Name | Type | Mandatory | Comment |
---|---|---|---|
customer | string | yes | Your call centre’s unique identifier (subdomain). |
projectid | integer | yes | Unique project identifier. |
Request object
Name | Type | Mandatory | Comment |
---|---|---|---|
customised | string | no | Defines whether field is shown in agent’s list. Possible values: – yes – no |
indexed | string | no | Records can be searched using this field. Possible values: – yes – no |
label | string | no | Field label. |
name | string | yes | Field’s unique identifier (may contain only lower-case English and underscore characters). |
quota | string | no | Defines quota type if needed. Possible values: – none – edge – cell |
type | string | yes | Field type. ‘Values’ object needs to be set if type is ‘simple’ or ‘multiple’. Possible values: – text – simple – multiple |
values | array of objects | no | Array of field values. |
Name | Type | Mandatory | Comment |
---|---|---|---|
commission | integer | no | Agent’s commission. |
description | string | no | Simple description. |
exportvalue | string | no | Value’s export name. |
name | string | yes | Value name. |
price | integer | no | Call centre’s commission. |
Example
URL: https://mycc.asp.virtual-call-center.eu/v2/projects/10/fields
Request body
{
"name": "education",
"label": "education attainment",
"type": "simple",
"indexed": "yes",
"customised": "yes",
"quota": "none",
"values": [
{
"name": "high school",
"exportvalue": "HS",
"description": "high school graduate",
"commission": "100",
"price": "200"
},
{
"name": "university",
"exportvalue": "U",
"description": "university degree",
"commission": "10",
"price": "20"
}
]
}
Response body – on success
{
"errors": [],
"response": 11
}
Response body – on error
{
"errors": [
{
"errorcode": 417,
"index": 0,
"errormessage": "error.name_must_be_between",
"property": "name"
}
],
"response": false
}
Possible errors
HTTPCode | Message | Description |
---|---|---|
417 | error.adding_field_was_unsuccessful | Unsuccessful addition, the field was not created due to an error. |
417 | error.field_name_already_exists | The field already exists in VCC’s database. |
417 | error.logged_in_agents | |
417 | error.name_must_be_between | The name is too short or long. |
417 | error.value_name_already_exists | The value already exists in VCC’s database. |
417 | error.wrong_field_name_format | The name contains one or more non-supported characters eg: special character. |
Comments
Can’t find what you need? Use the comment section below to connect with others, get answers from our experts, or share your ideas with us.
There are no comments yet.