I’m working with a Custom Action in Intercom, where I send a POST request that includes a variable from the conversation data. However, sometimes this variable is missing for certain conversations, which causes the POST request to fail.
Is there a way to create a fallback or default value for such variables in the request body to prevent the failure?
For example, here’s my current setup:
If data is not available, how can I ensure the request still goes through, possibly by setting a default value (like null or a placeholder string)?
Any advice or examples specific to handling this in a Custom Action would be greatly appreciated.
Best answer by Jacques Reynolds
Hey @Yevgeniy Borisovsky 👋 Jacques here from Intercom Support. I hope all is well today!
When working with Custom Actions in Intercom, if a variable from the conversation data is missing, causing your POST request to fail, you cannot set fallback values directly within the API currently. If a value is recognized as NULL, the custom action will fail to run.
As a workaround, you would need to ensure that all attribute values used in the request are not empty by programmatically setting values for any attributes that are NULL before the custom action is triggered.
This is a great idea though and something that would improve the functionality of our custom actions feature.
You can check if this feature has been recorded on our Product Wishlist in our Community. You can search and upvote existing requests or create new requests 🙌
Hey @Yevgeniy Borisovsky 👋 Jacques here from Intercom Support. I hope all is well today!
When working with Custom Actions in Intercom, if a variable from the conversation data is missing, causing your POST request to fail, you cannot set fallback values directly within the API currently. If a value is recognized as NULL, the custom action will fail to run.
As a workaround, you would need to ensure that all attribute values used in the request are not empty by programmatically setting values for any attributes that are NULL before the custom action is triggered.
This is a great idea though and something that would improve the functionality of our custom actions feature.
You can check if this feature has been recorded on our Product Wishlist in our Community. You can search and upvote existing requests or create new requests 🙌
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.