Add field and values

Reading Time: 2 minutes

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.

Value object

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.

There are no comments yet.
Subscribe to our newsletter
or Contact us!
Please note that by subscribing to our newsletter, you agree to receive regular email messages from VCC Live® about service related news and updates. By subscribing to our newsletter, you also agree that VCC Live® will use your data in accordance with the applicable Privacy Policy until you unsubscribe from the newsletter.

Privacy Settings Center

Necessary

Necessary cookies are essential in order to navigate around a website and use its basic features. You must accept these cookies as the website cannot function properly without them.

__cfduid,debug,PHPSESSID

Marketing

Marketing cookies are used to track visitors across websites and deliver advertisements that are more relevant and engaging to you.

__atuvc,__atuvs,_at.cww,_hjIncludedInSample,_hjRecordingEnabled,ads/user-lists/#,at-lojson-cache-#,at-rand,bt2,di2,IDE,lidc,loc,NID,ouid,r/collect,rc::a,rc::b,s,test_cookie,uid,uvc,vc,xtc

Statistics

Statistic cookies collect data to help us understand how visitors use our websites and are used to improve the user experience. These cookies don’t collect personal information and cannot identify visitors.

_ceg.s,_ceg.u,_ga,_gat,_gid

Other

Other cookies are those cookies that do not fall into the categories above. These cookies are in the process of being classified.

loglevel,socketCluster.authToken,u,webchatClientId,webchatOpen