Workplace from Meta

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

How it works

This is how the integration works:

  • You create a Customer Integration that uses the Meta Workplace.
  • You configure the Conversational Agents (Dialogflow CX) integration and Workplace instance, so that they communicate with each other.
  • The Conversational Agents (Dialogflow CX) integration sends messages to the end-user by using the Send API from Meta.
  • The Conversational Agents (Dialogflow CX) integration receives messages from the end-user 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 : Creating an Meta Workplace custom integration.

    • Create a Meta Workplace Custom Integration.
    • You are provided with an App Secret at this step. Copy this value. This token will be used to configure the integration from the Conversational Agents (Dialogflow CX) console.
    • Create or reset the Access token of your integration. Copy this value. This token will be used to configure the integration from the Conversational Agents (Dialogflow CX) console.
    • Set up the Custom Integration Permissions. Make sure Message any member is enabled in Permissions.
  2. Configure the integration from the Conversational Agents (Dialogflow CX) console:

    1. Go to the Dialogflow CX console.
    2. Click the Manage tab on the left panel.
    3. Click Integrations in the left sidebar menu.
    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 above.

      • Verify token: You can enter any private token you desire. Copy this value. This will be used to configure the Meta Workplace Webhook.

      • Webhook URL: Copy this value. This will be used to configure the Meta Workplace Webhook.

      • Start: Click to start this integration service for your agent.

  3. Finish setup of the Meta Workplace Custom Integration and test it. Follow steps in the Webhook for Meta Workplace documentation to accomplish the following:

    • Configure the Meta webhook for your app. Use the Webhook URL and Verify token values you copied above.
    • Subscribe your Integration to Webhook Topics. Be sure to enable messages and messaging_postbacks in the page subscription.
    • Test your app.

Rich response messages

The rich response messages are supported using Custom Payload in Fulfillment. See Send API Parameters Message Object for the message format.

For example, the following custom payload provides a simple 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.