--- title: "Field Mapping" slug: "server-api-ticketing-field-mapping" updated: 2022-06-16T07:26:32Z published: 2022-06-16T07:26:32Z canonical: "developer.comm100.com/server-api-ticketing-field-mapping" --- > ## Documentation Index > Fetch the complete documentation index at: https://developer.comm100.com/llms.txt > Use this file to discover all available pages before exploring further. # Field Mapping ## Field Mapping Chat or offlinemessage field mapping to ticket field. - `Field Mappings` - Field Mappings Manage - `GET ticketing/fields/{id}/fieldMapping` - [Get a single Field Mapping](/docs/server-api-ticketing-field-mapping#get-a-single-field-mapping) - `PUT ticketing/fields/{id}/fieldMapping` - [Update the Field Mapping](/docs/server-api-ticketing-field-mapping#update-the-field-mapping) ### Field Mapping JSON Format Field Mapping is represented as simple flat JSON objects with the following keys: | Name | Type | Description | | --- | --- | --- | | `fieldId` | guid | Id of the field. | | `mappedChatField` | string | Id of the mapped chat field. | | `mappedOfflineMessageField` | string | Id of the mapped offline message field. | ### Get a single Field Mapping `GET ticketing/fields/{id}/fieldMapping` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `include` | string | query | no | Allowed value is "ticketingField". | - #### Response: [Field Mapping](/docs/server-api-ticketing-field-mapping#field-mapping-json-format) - #### 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: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `mappedChatField` | string | body | no | Id of the mapped chat field. | | `mappedOfflineMessageField` | string | body | no | Id of the mapped offline message field. | - #### Response: [Field Mapping](/docs/server-api-ticketing-field-mapping#field-mapping-json-format) - #### 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}" } ```