Skip to main content
Answered

How to reset custom object's Values?

  • September 11, 2024
  • 1 reply
  • 41 views

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!

Best answer by Ebenezer.Laleye

Hi @Abdul Basith R ! Ebenezer here from Engineering Support👋.

I see you were able to reach out to use via the Messenger and got an answer. I’ll post it here:

There might be some issues here with this use case, the Custom Object attributes are instanced so updating them won't be reflected.

You'd want to update a Conversation or Data attribute and use that instead of the content of the initially populated Custom Object.

Hope this helps.

View original
Did this topic help you find an answer to your question?

1 reply

Forum|alt.badge.img+4
  • Intercom Team
  • 187 replies
  • Answer
  • September 24, 2024

Hi @Abdul Basith R ! Ebenezer here from Engineering Support👋.

I see you were able to reach out to use via the Messenger and got an answer. I’ll post it here:

There might be some issues here with this use case, the Custom Object attributes are instanced so updating them won't be reflected.

You'd want to update a Conversation or Data attribute and use that instead of the content of the initially populated Custom Object.

Hope this helps.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings