But answer based on external event

(varus) #1

Dear team

flowxo have Wait For a While and Wait Date blocks.
In our case bot receive message from user but should answer later based on some external event. This event can be generated in another external IT system. How we can call bot to provide (start) some activity only when this even happened?
We can have situation when this event never happened. We dont need freez bot and ignore any other messages from user.

BR

(Nathan Stults) #2

There is no way to do what you want using Wait blocks - the wait blocks will only wait for a time period. We do have on our roadmap to enable “wait for a webhook” but we don’t know when that will be ready.

What you can do instead is split your flow at the point where you are going to wait for the webhook, and then create a new flow (after the webhook is received) with a Webhook trigger. Then you can proceed with however you want the conversation to flow after that action.

The trick there is that your webhook needs to provide a “response_path” parameter as part of its data payload that you can use to set the response_path on subsequent actions in the flow.

The reason is that Webhook triggered flows don’t know what user they should be associated to, so you have to tell it that information.

You can find the response paths for users in the interaction logs and you can use the action menu in the Users area to copy a users response path, or you can send it to your server in a flow using HTTP so that it knows how to respond to any given user.

Nathan

#3

Dear Nathan

Thank you for answer. Could you clarify this additional issue:
Whe. I using integration with telegram, user always send first message to bot and bot known response path.

How it will work with WhatsApp? In WhatsApp I need functionality when bot can send first message to any customer before this customer send any message to bot.
In this case we don’t known response path.

(Nathan Stults) #4

Hello,

We don’t currently have a simple way to do that. However, since WhatsApp does allow template messages to be sent to a user without them interacting with the bot first, it seems like a useful feature. If this ability is critical to your project and you are a standard (non-free) customer we can explore adding an API method to allow you to accomplish this.

If it’s something you want to explore, reach out to us at support@flowxo.com