Field
  • 16 Jun 2022
  • 4 Minutes to read
  • Dark
    Light

Field

  • Dark
    Light

Article summary

Field

Field of ticket.

Field JSON Format

Field is represented as simple flat JSON objects with the following keys:

NameTypeDescription
isSystemboolWhether the field is a system field or not.
isRequiredboolWhether the field value is required or not.
typestringType of the field. Allowed values are "text", "textArea", "email", "url", "date", "integer", "float", "agent", "radioButton", "checkBox", "dropdownList", "checkboxList", "link", "department", "phone", "channelAccount", "channel", "tag".
namestringName of the field.
systemNamestringField name for system.
lengthintegerField length.
helpTextstringDescription of the field.
defaultValuestringDefault value of the field.
linkURLstringURL of the field. Only the field with link type will have such value.
idguidId of the field.
orderinteger
fieldOptionsfieldOptions[]Reference to Field Option.

Field Option JSON Format:

NameTypeDescription
idguidId of the field option.
fieldIdguidId of the field which the option belongs to.
valuestringValue of the option.
orderintegerOrder of the option.
displayTextstringDisplay text of the option.

Get the list of Fields

GET ticketing/fields

  • Parameters:

NameTypeinRequiredDescription
keywordsstringquerynoFilter by field name.
includestringquerynoAllowed values are "ticketingFieldOption", "ticketingFieldMapping".
  • Response:

An array of Field

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/fields \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

[
  {
      "isSystem": false,
      "isRequired": false,
      "type": "dropdownList",
      "name": "My Select",
      "systemName": "",
      "length": 256,
      "helpText": "My custom select.",
      "defaultValue": "op1",
      "linkURL": "",
      "id": "110499d0-5a3e-469f-b8de-9a34e99092b0",
      "order": 1,
      "fieldOptions": [
          {
              "id": "8bf39eb8-be1e-48b7-b324-85e152f42432",
              "fieldId": "110499d0-5a3e-469f-b8de-9a34e99092b0",
              "value": "op1",
              "order": 1,
              "displayText": "op1"
          }
      ]
  }
] 

Get a single Field

GET ticketing/fields/{id}

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAllowed values are "ticketingFieldOption", "ticketingFieldMapping".
  • Response:

Field

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/fields/110499d0-5a3e-469f-b8de-9a34e99092b0 \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "isSystem": false,
  "isRequired": false,
  "type": "dropdownList",
  "name": "My Select",
  "systemName": "",
  "length": 256,
  "helpText": "My custom select.",
  "defaultValue": "op1",
  "linkURL": "",
  "id": "110499d0-5a3e-469f-b8de-9a34e99092b0",
  "order": 1,
  "fieldOptions": [
      {
          "id": "8bf39eb8-be1e-48b7-b324-85e152f42432",
          "fieldId": "110499d0-5a3e-469f-b8de-9a34e99092b0",
          "value": "op1",
          "order": 1,
          "displayText": "op1"
      }
  ]
} 

Create a new Field

POST ticketing/fields

  • Parameters:

NameTypeinRequiredDescription
isSystemboolbodynoWhether the field is a system field or not.
isRequiredboolbodynoWhether the field value is required or not.
typestringbodynoType of the field. Allowed values are "text", "textArea", "email", "url", "date", "integer", "float", "agent", "radioButton", "checkBox", "dropdownList", "checkboxList", "link", "department", "phone", "channelAccount", "channel", "tag".
namestringbodyyesName of the field.
systemNamestringbodynoField name for system.
lengthintegerbodynoField length.
helpTextstringbodynoDescription of the field.
defaultValuestringbodynoDefault value of the field.
linkURLstringbodyyesURL of the field. Only the field with link type will have such value.
orderintegerbodyno
fieldOptionsfieldOptions[]bodynoOption in ticket field.
fieldMappingfieldMappingbodynoMapping in ticket field mapping.
  • Response:

Field

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/fields \ 
    -X 'POST' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"isSystem":false,"isRequired":false,"type":"dropdownList","name":"My Select","systemName":"","length":256,"helpText":"My custom select.","defaultValue":"op1","linkURL":"","order":1,"fieldOptions":[{"value":"op1","order":1,"displayText":"op1"}],"fieldMapping":{"mappedChatField":"{!Visitor.Current Page URL}","mappedOfflineMessageField":"{!Visitor.Email}"}}' 

Response:

HTTP/1.1 201 Created

{
  "isSystem": false,
  "isRequired": false,
  "type": "dropdownList",
  "name": "My Select",
  "systemName": "",
  "length": 256,
  "helpText": "My custom select.",
  "defaultValue": "op1",
  "linkURL": "",
  "id": "110499d0-5a3e-469f-b8de-9a34e99092b0",
  "order": 1,
  "fieldOptions": [
      {
          "id": "8bf39eb8-be1e-48b7-b324-85e152f42432",
          "fieldId": "110499d0-5a3e-469f-b8de-9a34e99092b0",
          "value": "op1",
          "order": 1,
          "displayText": "op1"
      }
  ]
} 

Update the Field

PUT ticketing/fields/{id}

  • Parameters:

NameTypeinRequiredDescription
isSystemboolbodynoWhether the field is a system field or not.
isRequiredboolbodynoWhether the field value is required or not.
typestringbodynoType of the field. Allowed values are "text", "textArea", "email", "url", "date", "integer", "float", "agent", "radioButton", "checkBox", "dropdownList", "checkboxList", "link", "department", "phone", "channelAccount", "channel", "tag".
namestringbodyyesName of the field.
systemNamestringbodynoField name for system.
lengthintegerbodynoField length.
helpTextstringbodynoDescription of the field.
defaultValuestringbodynoDefault value of the field.
linkURLstringbodyyesURL of the field. Only the field with link type will have such value.
orderintegerbodyno
fieldOptionsfieldOptions[]bodynoOption in ticket field.
fieldMappingfieldMappingbodynoMapping in ticket field mapping.
  • Response:

Field

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/fields/110499d0-5a3e-469f-b8de-9a34e99092b0 \ 
    -X 'PUT' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"isSystem":false,"isRequired":false,"type":"dropdownList","name":"My Select","systemName":"","length":256,"helpText":"My custom select.","defaultValue":"op1","linkURL":"","order":1,"fieldOptions":[{"value":"op1","order":1,"displayText":"op1"}],"fieldMapping":{"mappedChatField":"{!Visitor.Current Page URL}","mappedOfflineMessageField":"{!Visitor.Email}"}}' 

Response:

HTTP/1.1 200 OK

{
  "isSystem": false,
  "isRequired": false,
  "type": "dropdownList",
  "name": "My Select",
  "systemName": "",
  "length": 256,
  "helpText": "My custom select.",
  "defaultValue": "op1",
  "linkURL": "",
  "id": "110499d0-5a3e-469f-b8de-9a34e99092b0",
  "order": 1,
  "fieldOptions": [
      {
          "id": "8bf39eb8-be1e-48b7-b324-85e152f42432",
          "fieldId": "110499d0-5a3e-469f-b8de-9a34e99092b0",
          "value": "op1",
          "order": 1,
          "displayText": "op1"
      }
  ]
} 

Remove the Field

DELETE ticketing/fields/{id}

  • Parameters:

No Parameters

  • Response:

No Content

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/fields/110499d0-5a3e-469f-b8de-9a34e99092b0 \ 
    -X 'DELETE' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 204 No Content


Was this article helpful?

What's Next