Field

Prev Next

Field

Field of ticket.

Field JSON Format

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

Name Type Description
isSystem bool Whether the field is a system field or not.
isRequired bool Whether the field value is required or not.
type string Type of the field. Allowed values are "text", "textArea", "email", "url", "date", "integer", "float", "agent", "radioButton", "checkBox", "dropdownList", "checkboxList", "link", "department", "phone", "channelAccount", "channel", "tag".
name string Name of the field.
systemName string Field name for system.
length integer Field length.
helpText string Description of the field.
defaultValue string Default value of the field.
linkURL string URL of the field. Only the field with link type will have such value.
id guid Id of the field.
order integer
fieldOptions fieldOptions[] Reference to Field Option.

Field Option JSON Format:

Name Type Description
id guid Id of the field option.
fieldId guid Id of the field which the option belongs to.
value string Value of the option.
order integer Order of the option.
displayText string Display text of the option.

Get the list of Fields

GET ticketing/fields

  • Parameters:

Name Type in Required Description
keywords string query no Filter by field name.
include string query no Allowed 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:

Name Type in Required Description
include string query no Allowed 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:

Name Type in Required Description
isSystem bool body no Whether the field is a system field or not.
isRequired bool body no Whether the field value is required or not.
type string body no Type of the field. Allowed values are "text", "textArea", "email", "url", "date", "integer", "float", "agent", "radioButton", "checkBox", "dropdownList", "checkboxList", "link", "department", "phone", "channelAccount", "channel", "tag".
name string body yes Name of the field.
systemName string body no Field name for system.
length integer body no Field length.
helpText string body no Description of the field.
defaultValue string body no Default value of the field.
linkURL string body yes URL of the field. Only the field with link type will have such value.
order integer body no
fieldOptions fieldOptions[] body no Option in ticket field.
fieldMapping fieldMapping body no Mapping 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:

Name Type in Required Description
isSystem bool body no Whether the field is a system field or not.
isRequired bool body no Whether the field value is required or not.
type string body no Type of the field. Allowed values are "text", "textArea", "email", "url", "date", "integer", "float", "agent", "radioButton", "checkBox", "dropdownList", "checkboxList", "link", "department", "phone", "channelAccount", "channel", "tag".
name string body yes Name of the field.
systemName string body no Field name for system.
length integer body no Field length.
helpText string body no Description of the field.
defaultValue string body no Default value of the field.
linkURL string body yes URL of the field. Only the field with link type will have such value.
order integer body no
fieldOptions fieldOptions[] body no Option in ticket field.
fieldMapping fieldMapping body no Mapping 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

Copyright © 2022 Comm100 Network Corporation. All Rights Reserved.