This article presents possible use cases and corresponding sample flows that you can support. This can be a helpful jumping off point as you plan your implementation.
Customize the chat experience for different visitor segments using widget settings and custom messages. Provide different chat experiences for new visitors, returning customers, and VIP members.
Before implementing this flow, ensure VIP members are identified using contact labels. Create a label (such as "VIP") using the Labels API and assign it to VIP member contacts. This allows your code to distinguish VIP members from regular members by checking their contact label keys.
To configure dynamic chat based on visitor type, follow these steps:
Identify visitor type by calling Get My Member with the visitor's identity to retrieve the member information and get the contactId.
Call Get Contact using the contactId from step 1 to retrieve the contact's info.labelKeys.
Check the label keys to determine visitor type:
For new visitors, call Set Widget Settings to configure the ai_behavior.intro_message and ai_behavior.suggestions fields with welcoming messages and suggested questions.
For VIP members, call Get Conversation to retrieve their conversation ID, then call Bulk Create Messages to send a personalized greeting message.
Adjust settings in Set Widget Settings based on member tier to control features like contact form availability and AI behavior.
Help ensure every visitor receives a response by identifying unanswered questions and sending follow-up messages. You want to help ensure that no visitor question goes unanswered, even if the AI assistant couldn't provide a suitable response.
To monitor unanswered visitor questions, follow these steps:
Call List Messages with the visitor's identity and filter to identify unanswered questions.
For each unanswered question, call Bulk Create Messages to send a follow-up ANSWER message.
Combine all 3 APIs to create a comprehensive visitor engagement experience from first visit to ongoing conversation. Create a complete chat experience that welcomes visitors, provides AI support during business hours, captures leads during off-hours, and ensures all questions get answered.
To create a complete visitor engagement flow, follow these steps:
Call Get Widget Settings to fetch the current widget configuration.
Configure comprehensive settings with Set Widget Settings:
When a visitor lands on a site, call Get Conversation to:
Send a personalized welcome message using Bulk Create Messages based on:
Periodically call List Messages to:
Note: As visitors interact with the chat, the AI assistant automatically responds to QUESTION messages during active hours, the contact form appears during offline hours, and system messages guide the visitor's experience.
Send proactive follow-up messages using Bulk Create Messages based on:
Track chat performance: