Skip to content

Conversation

@sametozcan
Copy link
Contributor

@sametozcan sametozcan commented Jun 11, 2025

We have added a new filed to Ticket Part to share the updated attribute data within the webhook response.

Towards https://github.com/intercom/intercom/pull/407086

@sametozcan sametozcan requested a review from a team June 11, 2025 10:57
Comment on lines +12452 to +12453
id: [2]
label: ["photo.png"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these arrays because attributes can be arrays? Or what's the reason?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. There are different kind of attributes and the way we have the ID and label can slightly differe in different cases. See examples here

Mainly, file attributes can hold multiple files in a single attribute. That's the reason arrays are used there if the attribute is a file attribute.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the case of an attribute is cleared,

  • id can either be null or an empty array (for file attribute)
  • label can either be an empty string or empty array (for file attribute)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the type field not change depending on if it's an array or single value? Or does the client need to check for array or single value each time?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently type only returns attribute. We can add some extra queries to find the actual type of the attribute and use that as the type so the client would know what to expect there.
Alternatively the client can query that separately if they want to know the type of the attribute for that ticket type.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's wait to hear from the customer so we can improve that furthermore.

Copy link
Contributor

@steve-henry steve-henry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving as this matches the current API behaviour.

Left one non-blocking question around array vs single value

@sametozcan sametozcan merged commit 45ed47b into main Jun 12, 2025
6 checks passed
@sametozcan sametozcan deleted the samet/add-ticket-atribute-updated-data branch June 12, 2025 11:21
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

Successfully merging this pull request may close these issues.

3 participants