Skip to content

Commit 41d658b

Browse files
Add fulfillment-unavailability article
Why: * Explain how to handle fulfillment unavailability cases How: * Created a new section for fulfillment best practices
1 parent 386811e commit 41d658b

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed
238 KB
Loading
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Dialogflow Fulfillment
2+
3+
Fulfillment is a part of Google Dialogflow platform which allows developers to provide more dynamic responses by using webhooks. When you enable fulfillment for an intent, Dialogflow responds to that intent by calling a service that you define. Web service will receive a POST request from Dialogflow in the form of the response to a user query matched by intents with webhook enabled. To read more.
4+
5+
The following are some quick guides to common features we use:
6+
7+
* [Fulfillment Unavailability Handler](fulfillment-unavailability-hanlder.md)
8+
9+
For more information visit https://cloud.google.com/dialogflow/es/docs/fulfillment-overview
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Dialogflow Fulfillment Unavailability Handler
2+
3+
Sometimes conversational journeys require some response from fulfillment service. For example: in the end of ID&V process fulfillment service should return some [Followup Event Input](https://cloud.google.com/dialogflow/es/docs/fulfillment-webhook#event), but fulfillment service hasn't responded within 5(by default) seconds for some reasons. In this case Dialogflow will respond with the default text response which breaks normal flow as fulfillment service can't confirm result of the ID&V process. That's why it's important to escalate such calls to some "failover" endpoint.
4+
5+
In order to escalate or redirect calls which haven't received any response from the fulfillment service we can do the following:
6+
7+
1. Create a new intent which will be triggered in case of fulfillment unavailability with the following details:
8+
9+
- Input contexts: `fulfillment-requested`
10+
- Output contexts: `fulfillment-requested(2)`
11+
- Training phrases: any 3-5 phrases which marked as `@sys.any` entity
12+
- Parameters: any extra parameters which you need to handle a call. For example, in order to escalate a call you can add `action`, `stop_recording` and `router_name` parameters
13+
- Fulfillment: make sure webhook is disabled for this intent
14+
15+
Example of Fulfillment Unavailability intent:
16+
17+
![fulfillment-unavailability-failover](../../../assets/fulfillment-unavailability.png)
18+
19+
2. Add `fulfillment-requested(3)` output context To all intents which expect any response form fulfillment service
20+
21+
3. Add this output context to all your fulfillment responses:
22+
23+
```
24+
{
25+
lifespanCount: 0,
26+
name: `${sessionid}/contexts/fulfillment-requested`
27+
}
28+
```
29+
This response won't allow DF to match an intent which we created in step 1 as it removes `fulfillment-requested` context by setting `lifespanCount: 0`. If fulfillment is not available and can't delete `fulfillment-requested` context, next utterance will match "fulfillment unavailability" intent.

0 commit comments

Comments
 (0)