ERROR | Unexpected error when using the `search` query on the `post` method
Opened this issue · 2 comments
Neosoulink commented
Version info
- intercom-node version:
^5.0.0
- Node version:
v21.2.0
Expected behavior
Being able to retrieve the expected ticket using the search query with the query field ticket_attribute.{id}
Actual behavior
After several attempts, I'm not able to search a ticket using the client.post
method.
For some reason, when passing the ticket_attribute.
plus a specific attribute (even the default one), I'm getting an error.
Steps to reproduce
After the installation, token configuration, and environment settings completed
- Requesting the ticket
import { Operators } from "intercom-client";
const tickets = await intercomClient.post({
url: `${env.INTERCOM_API_BASE_URL}/tickets/search`,
data: {
query: {
field: "ticket_attribute.id", // The `id` is a custom attribute created in the workspace
operator: Operators.EQUALS,
value: ATTRIBUTE_ID_VALUE, // The `ATTRIBUTE_ID_VALUE` is a UUID string generated in a previous operation
},
},
});
Logs
Error: The requested ticket attribute ID is not a valid integer
=====
[
{
code: 'field_not_found',
message: 'The requested ticket attribute ID is not a valid integer'
}
]
Resources:
https://developers.intercom.com/docs/references/rest-api/api.intercom.io/Tickets/searchTickets/
ritmillio commented
Same issue here
ShacharZ1 commented
Same here for custom_attributes
.
Any workarounds?