Hello everyone,
I'm working on an Intercom workflow where I aim to create custom buttons that link to specific pages. When a user clicks one of these buttons, it should provide a link that, when clicked, redirects the user to the intended page.
Here’s what I have set up so far:
- Created a custom object called "Chat Links" which is referenced to both People and Conversation attributes.
- Set up a Custom Action and assigned values to it.
- Integrated these as buttons into the Custom Data.
The issue I'm facing is with the button display logic. When a query is made, 5 buttons are shown. For a subsequent query, another 5 new buttons are shown, totaling 10 buttons (5 new + 5 old). However, there is no guarantee that 5 data items will always be returned from my API call; the number can vary, and sometimes the API may return no data at all. In such cases, the old buttons are still displayed regardless of the query, meaning the values are appended to the list rather than overwritten.
Has anyone encountered a similar issue or can suggest a way to ensure that only the relevant buttons are displayed for each query, removing or hiding the old ones when new data is fetched?
Thanks in advance for your help!