To add a custom field to Freshservice, modify the mapping.xml
file and reupload it. You'll need to modify the <task>
that's most closely related to the custom field you want to create.
Find an existing task with a query related to the field you want to map to Freshservice. For example, if you want to add a custom field about servers, inspect and modify the Copy Servers from Device42 to Freshservice using DOQL v2
task. Add new <field>
elements (one for Device42 and one for Freshservice) to the <mapping>
element of the <task>
.
Depending on the custom field you want to add, you may have to modify the DOQL query in the <resource>
element to fetch that data from Device42. If needed, use the InsightsAI chat under Analytics > InsightsAI to help you find the tables and fields you need to query.
If you can't find a task related to your custom field, you can create a new <task>
element in the mapping.xml
file.
Note:
- Customizing freshservice mapping requires specific case for fields
For custom fields in the XML, the target field they set needs to be lowercase:
target="abc"
target="xyz"
- The Freshservice convention for naming your fields is whatever was specified as the label is made lowercase and any spaces are replaced by underscores and then the asset type ID suffix is added. In the mapping file, the target field doesn’t need to the asset type ID suffix, but does need to exactly match the rest of it.
You can confirm the the Freshservice field name by going into Freshservice settings and going to the edit page for the asset type.
In the URL will be a number which is the asset type ID.
If you open another browser tab and enter the URL:
[Freshservice Instance]/api/v2/asset_types/[Asset Type ID]/fields
Replacing [Freshservice Instance] with your Freshservice base URL and [Asset Type ID] with the number you got from the asset type edit page URL, you can search for the field label you are interested in and find it’s field name.
Comments
0 comments
Article is closed for comments.