🔍Understanding Fulfillment Data and Webhook Integration in Dialogflow

📚 Learn to interpret Dialogflow’s fulfillment data for webhooks. Understand key fields like responseId and payload to manage OmniChat user and conversation IDs effectively.

💡 PRO TIP: Click here to hire an expert to guide you in the step by step. Book a call now to learn all the tips and tricks for training your AI, or let us handle it all for you instead.

In this tutorial, we’ll dive into the structure of fulfillment data sent to your webhook URL by Dialogflow. You’ll learn how to interpret the key fields such as responseId, queryResult, and originalDetectIntentRequest, and how to use the payload and session fields to identify OmniChat user and conversation IDs.

The fulfillment data sent to your webhook URL is like below:

{
	"responseId": "4a58fc4f...",
	"queryResult": {
		"queryText": "fullfilment",
		"parameters": [],
		"allRequiredParamsPresent": true,
		"fulfillmentText": "Example",
		"fulfillmentMessages": [{
			"text": {
				"text": ["Response"]
			}
		}],
		"outputContexts": [{
			"name": "projects/schiocco...",
			"parameters": {
				"no-input": 0,
				"no-match": 0
			}
		}],
		"intent": {
			"name": "projects/schiocco...",
			"displayName": "Fullfilment"
		},
		"intentDetectionConfidence": 1,
		"languageCode": "en"
	},
	"originalDetectIntentRequest": {
		"payload": {
			"support_board": {
				"conversation_id": "3002",
				"user_id": "3777"
			}
		}
	},
	"session": "projects/example/agent/sessions/3777-3002"
}

The payload and session fields contain the OmniChat user ID and conversation ID.

For more details, you can ask the AI here.

💡 PRO TIP: Click here to hire an expert to guide you in the step by step. Book a call now to learn all the tips and tricks for training your AI, or let us handle it all for you instead.