Livechat Configuration Tutorial
最新の更新:2024-10-08

Livechat Configuration Tutorial

Create PAT Authentication in the Livechat Developer Console

  • Go to the settings page, select Personal Access Tokens, and click "Create new token +" Create new token

  • Create PAT, select "select all" for access scopes access scopes

  • Copy and save the "Account ID" and "Token", which will be needed later for configuration in "GPTBots - Bot Integration - Livechat". Account ID / Token"

Build an app in Livechat Build app for receiving and sending messages on the livechat platform.

  • Go to the "Apps" page and click the "Build app" button to start creating the app Build app

  • Enter the app name, select livechat for Product, and click "Create app" to successfully create it Create app

  • Click the app to enter the details page, select the Blocks page, and click the "Add Building Blocks" button Add Building Blocks

  • In the "Add Building Blocks" popup, select the "App Authorization" option and click "Add block" Add block

  • Select the Server-side app option and click the "Save" button to successfully create it Save

  • Copy and save the "Client Id" and "Client Secret", which will be needed later for configuration in "GPTBots - Bot Integration - Livechat". Client Secret / Client Id

Configure Livechat Integration in GPTBots

  • On the "GPTBots - Bot Settings - Integration - Livechat" page, configure the saved information and click the "Submit" button to complete the configuration.

    • Account ID: Account ID when creating PAT in Livechat
    • Token: Token when creating PAT in Livechat
    • Client Id: Client Id when creating the app in Livechat
    • Client Secret: Client Secret when creating the app in Livechat
    • AgentEmail: The email address of the Agent account taken over by the AI Bot, which must be an account of the human customer service seat in the same project image-20241011163734094
  • After completing the "Livechat Integration" configuration in GPTBots:

    • The AI Bot will take over the user conversation of the AgentEmail account, directly responding to user questions.

    • Based on the AI Bot's capabilities, it can support multi-modal information input such as text, images, and files from users.

    • The platform will generate a "Webhooks - Message and Event Reception URL" address, which can be used to create a Webhook in the Livechat backend.## Configure Chat webhooks for advanced features like chat transfer/closure

Step 1: Create "incoming_chat" event

  • Return to the Blocks page and click the "Add Building Blocks" button to create webhooks. Add Building Blocks

  • In the pop-up window, select "chat webhooks" (note: not app webhooks) and click the "Add block" option. Add block

  • Copy the Webhook URL from "GPTBots - Bot Configuration - Integration - Livechat". image-20241011163916930

  • After configuring the following options for "Creating Chat Webhook", click "Save" to successfully create it.

    • Webhook URL: Fill in the copied "GPTBots Webhook URL" address in the input box.
    • Secret key: You can choose to enter it manually or select "Generate" to generate it randomly. Save the "Secret key" for later configuration in "GPTBots - Bot Integration - Livechat".
    • Type: Select the "License" option.
    • Webhook triggers: Select the "incoming_chat" event and check "chat_presence_user_ids". Creating Chat Webhook Webhook triggers

Step 2: Create "incoming_event" event

Repeat the steps for creating a webhook, configure the following options for "Creating Chat Webhook", and click "Save" to successfully create it.

  • Webhook URL: Reuse the "GPTBots Webhook URL" address from Step 1 in the input box.
  • Secret Key: Must use the Secret Key saved in "Step 1" during setup.
  • Type: Select the "License" option.
  • Webhook triggers: Select the "incoming_event" event and check "chat_presence_user_ids". Webhook triggers

Step 3: Create "chat_transferred" event

Repeat the steps for creating a webhook, configure the following options for "Creating Chat Webhook", and click "Save" to successfully create it.

  • Webhook URL: Reuse the "GPTBots Webhook URL" address from Step 1 in the input box.
  • Secret Key: Must use the Secret Key saved in "Step 1" during setup.
  • Type: Select the "License" option.
  • Webhook triggers: Select the "chat_transferred" event and check "chat_presence_user_ids". Webhook triggers

Step 4: Create "chat_deactivated" event

Repeat the steps for creating a webhook, configure the following options for "Creating Chat Webhook", and click "Save" to successfully create it.

  • Webhook URL: Reuse the "GPTBots Webhook URL" address from Step 1 in the input box.
  • Secret Key: Must use the Secret Key saved in "Step 1" during setup.
  • Type: Select the "License" option.
  • Webhook triggers: Select the "chat_deactivated" event and check "chat_presence_user_ids". Webhook triggers

Verification of successful creation of 4 Webhook events

4 Webhook events When the above 4 events are displayed, it means that all 4 Webhook events have been successfully created.

Install app and verify

AI Bot takes over Agent customer service account

When a user initiates a consultation from the Livechat platform, the AI Bot will provide a response. image-20241011165500485

Advanced features of Livechat integration

Transfer chat

  • When the "Transfer chat" switch is turned on and the timing and conditions for transferring the chat are configured, the system will automatically pull the project’s Agent group name information in Livechat. image-20241011165609727

  • When a consultation initiated by a user on the Livechat platform meets the trigger conditions, the AI Bot will select the most matching group based on the chat history and Agent group name, and transfer the current user session to that Agent group (human customer service group), where a human customer service account in that group will take over the user session. image-20241011171354846