Field Mapping
  • 16 Jun 2022
  • 1 Minute to read
  • Dark
    Light

Field Mapping

  • Dark
    Light

Article summary

Field Mapping

Chat or offlinemessage field mapping to ticket field.

Field Mapping JSON Format

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

NameTypeDescription
fieldIdguidId of the field.
mappedChatFieldstringId of the mapped chat field.
mappedOfflineMessageFieldstringId of the mapped offline message field.

Get a single Field Mapping

GET ticketing/fields/{id}/fieldMapping

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAllowed value is "ticketingField".
  • Response:

Field Mapping

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/fields/b42812a1-ceb4-4884-a22e-11d84f183ff1/fieldMapping \ 
    -X 'GET' \ 
    -H 'Authorization: Bearer {access_token}' \ 

Response:

HTTP/1.1 200 OK

{
  "fieldId": "b42812a1-ceb4-4884-a22e-11d84f183ff1",
  "mappedChatField": "{!Visitor.Current Page URL}",
  "mappedOfflineMessageField": "{!Visitor.Email}"
} 

Update the Field Mapping

PUT ticketing/fields/{id}/fieldMapping

  • Parameters:

NameTypeinRequiredDescription
mappedChatFieldstringbodynoId of the mapped chat field.
mappedOfflineMessageFieldstringbodynoId of the mapped offline message field.
  • Response:

Field Mapping

  • Example

Sample Request:

curl https://api11.comm100.io/v4/ticketing/fields/b42812a1-ceb4-4884-a22e-11d84f183ff1/fieldMapping \ 
    -X 'PUT' \ 
    -H 'Authorization: Bearer {access_token}' \ 
    -H 'Content-Type: application/json' \ 
    -D '{"mappedChatField":"{!Visitor.Current Page URL}","mappedOfflineMessageField":"{!Visitor.Email}"}' 

Response:

HTTP/1.1 200 OK

{
  "fieldId": "b42812a1-ceb4-4884-a22e-11d84f183ff1",
  "mappedChatField": "{!Visitor.Current Page URL}",
  "mappedOfflineMessageField": "{!Visitor.Email}"
} 

Was this article helpful?

What's Next