Website chat plugin
Last updated
Last updated
Chat plugin is a widget attached to your website that helps customers chat directly to purchase or quickly exchange information about products.
At Dashboard, you click Connect, choose the tab Website and start to create a new page
Here, you input the Page Username, Display name, and profile picture of that page. Then, click Create Page.
Page username: The username of the page in the system. You can freely customize the name, but it should not contain spaces, or special characters; and have not existed on the system. For example: Pancake123
Display name: The name that is displayed on the system, you can freely customize it.
After creating the page successfully, you select that page and add the domain of your Website.
The system will display a code script of your created page. You can customize the Chat Plugin Button in terms of shape, color, size, and default fields,...
After attaching this script to the <body> of your website, the system will display the Chat Plugin button on your website.
POST
https://pages.fm/api/v1/pke_chat_plugin/messages?page_id=[:page_id]
create a new conversation or send a message. Message always contains text or image
GET
https://pages.fm/api/v1/pke_chat_plugin/messages
get the message list of the conversation
GET
wss://pages.fm/socket/websocket?pke_chat_plugin_page_id=[:page_id]&vsn=2.0.0
Connect web socket to sync message data
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
conversation_id
String
this is the identifier id of the conversation. This id is automatically generated by the system to ensure uniqueness. If left blank, the system will create a new conversation and return the id in response
extra_info
Object
customer information you need to start a conversation
example: phone , email, name, custom_field
from_id
String
This id is intended to identify the client sending the message. This id will be automatically generated to ensure uniqueness. If left blank, the system will create new customer and return id in response
images
Array
list of photo urls you want to send
message
String
the content of the message you want to send
name
String
Customer name. If left blank, the lightning system automatically generates
phone
String
Customer's phone number
web_source
String
Determining the origin of the customer's website
page_id
String
this is the identifier id of your page
conversation_id*
String
this is the identifier id of the conversation. This id is automatically generated by the system to ensure uniqueness.
offset*
Integer
Offset to query message
page_id*
String
this is the identifier id of your page
String
String
String
page_id*
String
Your page_id