REST Resource: projects.locations.agents.flows.pages

Resource: Page

A Dialogflow CX conversation (session) can be described and visualized as a state machine. The states of a CX session are represented by pages.

For each flow, you define many pages, where your combined pages can handle a complete conversation on the topics the flow is designed for. At any given moment, exactly one page is the current page, the current page is considered active, and the flow associated with that page is considered active. Every flow has a special start page. When a flow initially becomes active, the start page page becomes the current page. For each conversational turn, the current page will either stay the same or transition to another page.

You configure each page to collect information from the end-user that is relevant for the conversational state represented by the page.

For more information, see the Page guide.

JSON representation
{
  "name": string,
  "displayName": string,
  "entryFulfillment": {
    object (Fulfillment)
  },
  "form": {
    object (Form)
  },
  "transitionRouteGroups": [
    string
  ],
  "transitionRoutes": [
    {
      object (TransitionRoute)
    }
  ],
  "eventHandlers": [
    {
      object (EventHandler)
    }
  ]
}
Fields
name

string

The unique identifier of the page. Required for the Pages.UpdatePage method. Pages.CreatePage populates the name automatically. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/pages/<Page ID>.

displayName

string

Required. The human-readable name of the page, unique within the agent.

entryFulfillment

object (Fulfillment)

The fulfillment to call when the session is entering the page.

form

object (Form)

The form associated with the page, used for collecting parameters relevant to the page.

transitionRouteGroups[]

string

Ordered list of TransitionRouteGroups associated with the page. Transition route groups must be unique within a page.

  • If multiple transition routes within a page scope refer to the same intent, then the precedence order is: page's transition route -> page's transition route group -> flow's transition routes.

  • If multiple transition route groups within a page contain the same intent, then the first group in the ordered list takes precedence.

Format:projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/transitionRouteGroups/<TransitionRouteGroup ID>.

transitionRoutes[]

object (TransitionRoute)

A list of transitions for the transition rules of this page. They route the conversation to another page in the same flow, or another flow.

When we are in a certain page, the TransitionRoutes are evalauted in the following order:

  • TransitionRoutes defined in the page with intent specified.
  • TransitionRoutes defined in the transition route groups.
  • TransitionRoutes defined in flow with intent specified.
  • TransitionRoutes defined in the page with only condition specified.
eventHandlers[]

object (EventHandler)

Handlers associated with the page to handle events such as webhook errors, no match or no input.

Form

A form is a data model that groups related parameters that can be collected from the user. The process in which the agent prompts the user and collects parameter values from the user is called form filling. A form can be added to a page. When form filling is done, the filled parameters will be written to the session.

JSON representation
{
  "parameters": [
    {
      object (Parameter)
    }
  ]
}
Fields
parameters[]

object (Parameter)

Parameters to collect from the user.

Parameter

Represents a form parameter.

JSON representation
{
  "displayName": string,
  "required": boolean,
  "entityType": string,
  "isList": boolean,
  "fillBehavior": {
    object (FillBehavior)
  },
  "defaultValue": value,
  "redact": boolean
}
Fields
displayName

string

Required. The human-readable name of the parameter, unique within the form.

required

boolean

Indicates whether the parameter is required. Optional parameters will not trigger prompts; however, they are filled if the user specifies them. Required parameters must be filled before form filling concludes.

entityType

string

Required. The entity type of the parameter. Format: projects/-/locations/-/agents/-/entityTypes/<System Entity Type ID> for system entity types (for example, projects/-/locations/-/agents/-/entityTypes/sys.date), or projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/entityTypes/<Entity Type ID> for developer entity types.

isList

boolean

Indicates whether the parameter represents a list of values.

fillBehavior

object (FillBehavior)

Required. Defines fill behavior for the parameter.

defaultValue

value (Value format)

The default value of an optional parameter. If the parameter is required, the default value will be ignored.

redact

boolean

Indicates whether the parameter content is logged in text and audio. If it is set to true, the parameter content will be replaced to parameter name in both request and response. The default value is false.

FillBehavior

Configuration for how the filling of a parameter should be handled.

JSON representation
{
  "initialPromptFulfillment": {
    object (Fulfillment)
  },
  "repromptEventHandlers": [
    {
      object (EventHandler)
    }
  ]
}
Fields
initialPromptFulfillment

object (Fulfillment)

Required. The fulfillment to provide the initial prompt that the agent can present to the user in order to fill the parameter.

repromptEventHandlers[]

object (EventHandler)

The handlers for parameter-level events, used to provide reprompt for the parameter or transition to a different page/flow. The supported events are: * sys.no-match-<N>, where N can be from 1 to 6 * sys.no-match-default * sys.no-input-<N>, where N can be from 1 to 6 * sys.no-input-default * sys.invalid-parameter

initialPromptFulfillment provides the first prompt for the parameter.

If the user's response does not fill the parameter, a no-match/no-input event will be triggered, and the fulfillment associated with the sys.no-match-1/sys.no-input-1 handler (if defined) will be called to provide a prompt. The sys.no-match-2/sys.no-input-2 handler (if defined) will respond to the next no-match/no-input event, and so on.

A sys.no-match-default or sys.no-input-default handler will be used to handle all following no-match/no-input events after all numbered no-match/no-input handlers for the parameter are consumed.

A sys.invalid-parameter handler can be defined to handle the case where the parameter values have been invalidated by webhook. For example, if the user's response fill the parameter, however the parameter was invalidated by webhook, the fulfillment associated with the sys.invalid-parameter handler (if defined) will be called to provide a prompt.

If the event handler for the corresponding event can't be found on the parameter, initialPromptFulfillment will be re-prompted.

Methods

create

Creates a page in the specified flow.

delete

Deletes the specified page.

get

Retrieves the specified page.

list

Returns the list of all pages in the specified flow.

patch

Updates the specified page.