Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR | Unexpected error when using the search query on the post method #402

Open
Neosoulink opened this issue Apr 12, 2024 · 1 comment

Comments

@Neosoulink
Copy link

Neosoulink commented Apr 12, 2024

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

  1. 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
Copy link

Same issue here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants