I would like to search a freshservice workspace for any tickets with a foreign key (9128120) in a custom field (f_key).
Query:
https://my_org.freshservice.com/api/v2/tickets/filter?query="f_key: 9128120 and workspace_id: 4"
When I attempt to search for this value in the f_key custom field of workspace 4, I consistently get “unexpected / invalid field in request” error.
I have tried a variety of quotes, url encoding, prepending the custom field with cf. and cf_ as shown in some suggestions, and have tried workspace_id: 0 as well.
Is anyone else able to get workspace-level custom fields via filter / query?
Json snippet from the freshservice ticket in workspace 4 that has the f_key custom field and value:
"custom_fields": {
"f_key": 9128120,
"major_incident_type": null,
"business_impact": null,
"impacted_locations": null,
"no_of_customers_impacted": null
},
Response:
{
"description": "Validation failed",
"errors": [
{
"field": "f_key",
"message": "Unexpected/invalid field in request",
"code": "invalid_value"
}
]
}
DETAILS:
I’m trying to use workflow automator to process inbound tickets via the email gateway from another ticketing system with its own ticket numbers in the subject of the incoming messages.
The other ticketing system will send emails to the freshservice workspace when a ticket is opened, updated, and closed.
Currently, these all come in as separate, unconnected, new tickets in the freshservice workspace. Instead I would like all messages with the same foreign key to be consolidated into a set or group.
-
OPEN: If a message comes from the other ticketing system with a ticket number that isn’t already in the freshservice workspace, I would like to create a new ticket.
-
UPDATE: if a message comes in from the other ticketing system with a foreign key that already has a freshservice ticket created, but does not have the word “Closed” in the subject, make the current ticket a child ticket of the existing freshservice ticket with the matching foreign key.
-
CLOSE: if a message comes in from the other ticketing system with a foreign key that already has a matching freshservice ticket, and the subject contains the word “Closed”, set the status of the ticket(s) with the same foreign key to closed.
I have captured the foreign ticket key from the subject using a substring function.