Workplace from Meta

Using the Meta Workplace integration, you can create a Meta Workplace bot to interact with your users.

How it works

This is how the integration works:

  • You create a customer integration that uses Meta Workplace.
  • You configure the Dialogflow CX integration and Workplace instance so that they communicate with each other.
  • The Dialogflow CX integration sends messages to your users using the Send API from Meta.
  • The Dialogflow CX integration receives messages from your users by acting as the Workplace Webhook from Meta.

Setup

To set up the integration:

  1. Follow the steps to create a Meta Workplace Custom Integration using Creating a Meta Workplace Custom Integration:
    • Create a Meta Workplace Custom Integration.
    • Copy the App Secret provided at this step. You'll use this token to configure the integration from the Dialogflow CX console.
    • Create or reset the access token for your integration, and copy it. You'll use this token to configure the integration from the Dialogflow CX console.
    • Set up the Custom Integration permissions. Make sure Message any member is enabled in permissions.
  2. Configure the integration from the Dialogflow CX console:
    1. Go to the Dialogflow CX console.
    2. Go to the Manage tab on the navigational menu.
    3. Select Integrations.
    4. Click the Connect button on the Meta Workplace tile.
    5. A configuration dialog opens:
      • App secret: Enter the app secret from App Dashboard Basic Settings.
      • Access token: Enter the access token you copied during the Meta app setup.
      • Verify token: Enter any private token you need. Copy this value. This token configures the Meta Workplace Webhook.
      • Webhook URL: Copy this value. This token configures the Meta Workplace Webhook.
      • Start: Click Start to start the integration service for your agent.
  3. Finish setting up the Meta Workplace integration and test it. Follow the steps in the Webhook for Meta Workplace documentation to complete these tasks:
    • Configure the Meta webhook for your app by using the Webhook URL and Verify token values that you copied earlier.
    • Subscribe your integration to webhook topics, and make sure that you enable messages and messaging_postbacks in the page subscription.
    • Test your app.

Rich response messages

Rich response messages are supported using Custom Payload in Fulfillment. For more information about the message format, see the Send API Parameters Message Object.

For example, the following custom payload provides a text message:

{
  "text": "Hello, world"
}

The following custom payload provides an image message:

{
  "attachment": {
    "type": "image",
    "payload": {
      "url": "https://example.com/test.jpg"
    }
  }
}

Channel-specific responses

When configured, channel-specific responses with channel DF_CX_FB_MESSENGER are automatically used when the agent responds to Meta Messenger messages.