Fulfillment is code that is deployed as a webhook that lets you generate dynamic responses for every type of smart home intent. During a user conversation with Google Assistant, fulfillment allows you to use the information extracted by Google's natural language processing to generate dynamic responses or trigger actions on your back-end such as turning on a light.
Your fulfillment receives requests from Assistant, processes the request and responds. This back-and-forth request and response process drives the conversation forward until you eventually fulfill the initial user request. In most cases, a user would have a simple smart home interaction with Google Assistant such as Hey Google, turn on my light. However, if you implement two-factor authentication , your fulfillment might have to process multiple requests and responses as Google Assistant might ask for a confirmation PIN after a specific user request such as Hey Google, unlock my front door.
Figure 1 shows a successful fulfillment and execution of a smart home