Conversation Completed
The visitor has reached the end of the conversation.
window.addEventListener('adobedx.conversations.ready', () => {
const {addListener, Enum} = window.AdobeDX;
addListener(Enum.Events.CONVERSATION_COMPLETED, (event) => {
// code here will execute when a conversation is completed
});
});
Conversation Closed
The visitor has closed the conversation before reaching the end.
window.addEventListener('adobedx.conversations.ready', () => {
const {addListener, Enum} = window.AdobeDX;
addListener(Enum.Events.CONVERSATION_CLOSED, (event) => {
// code here will execute when a conversation is closed
});
});
The event
parameter is an object with metadata related to the conversation. You can access this metadata by accessing event.data
.
Here are some key metadata values you can access:
Metadata
Attributes
Conversation name
payload.name
Conversation ID
payload.id
Conversation Type (dialogue/conversation flow)
payload.type
UI Type (popup/chatbot/inline)
payload.uiType
Session ID
payload.sid
Visitor Input Events
These events are triggered when a visitor engaging in a conversation provides their contact information (e.g., phone number or email address). Below are the events that fall under this category.
Phone Number
This event is triggered when a visitor provides their phone number during the conversation.
window.addEventListener('adobedx.conversations.ready', () => {
const {addListener, Enum} = window.AdobeDX;
addListener(Enum.Events.CONVERSATION_INPUT_PHONE, (event) => {
// code here will execute when a visitor provides their phone number
});
});