Events

Events are alternatives to phrases. You might have a button in Manychat and if a user clicks a button, you can trigger a Dialogflow Intent.

Dialogflow for Manychat

Create a Custom User Field in Manychat named {{event}}. You could link a button to an Action step and set the Custom User Field to have a value that is unique to the event. In the example, an event with the value "Buy" was added. You'll then send the event to Janis to trigger a Dialogflow Intent.

In Dialogflow, you might create an Intent for a lead.

Dialogflow for Manychat

You might add some training to the Intent in case users don't click your buttons and they send a message instead expressing their intent to buy.

Dialogflow for Manychat

You would take the value for the {{event}} Custom User Field in Manychat and add that to the Events field in the Dialogflow Intent. Whether someone types in phrases that indicate their intent to buy, or click your Buy button in your Flow, you'll trigger the Dialogflow Intent.

Dialogflow for Manychat

Events are useful because you can trigger Dialogflow Intents whether a user types in their input, or clicks a button. In both cases, their intent is the same. You can use events to also trigger an alert in Slack and act fast on a lead.


Messenger's Blue Thumbs Up

The blue thumbs up that users send your bot in Messenger is another example of an event you can use to trigger a Dialogflow Intent. The thumbs up is not like the traditional emoji thumbs up 👍, but it’s a Facebook sticker, and therefore it’s an image file (a .png file to be precise). Our Starter Kittemplate includes this example. You'll want a keyword rule so that if Message is thumbs up you'll send the event to Dialogflow.

Dialogflow messenger thumbsup

In the Flow, we've set the first step as an Action step and set the Custom User Field event to thumbsup. We then send the event to the Default Reply so it gets processed by Dialogflow.

Dialogflow messenger thumbsup

The blue thumbs up could mean "OK", or "Yes", but it could also be in response to something else. By adding the value "thumbsup" for the Custom User Field "event", you can trigger the same intent as a message of OK, or Yes, or if you add context to an Intent the thumbs up could be in response to any Intent where both the event and the context have been set.

Dialogflow messenger thumbsup

Just like messages can trigger an Intent, Events can also trigger Intents and using {{event}} provides that special instruction for Janis to relay to Dialogflow.