updateMessagingTopic()
warning
Some MessagingTopics may be disabled until we have experts staffed for them. Please reach out if you would like to use a messaging topic
other than DEVICE_REPLACEMENT_ONBOARDING, GENERAL_CONVERSATION, or SECURITY_ADVISOR to determine availability.
This function allows you to update the messaging topic. If this is called in the middle of a conversation, it will not take effect until the next conversation is started. You can experiment with this in the dev sandbox by filling in a messaging topic and pressing "Update Messaging Topic". A list of available messaging topics is listed below in the enumeration. Here is the function API and some example usage:
// All available messaging topics.
export declare enum MessagingTopic {
DEVICE_REPLACEMENT_ONBOARDING = "DEVICE-REPLACEMENT-ONBOARDING",
GENERAL_CONVERSATION = "GENERAL-CONVERSATION",
SECURITY_ADVISOR = "SECURITY-ADVISOR",
FREE_PLAN = "FREE-PLAN",
BIS_2 = "BIS-2",
SAVES_DESK = "SAVES-DESK",
SAVES_DESK_VPH = "SAVES-DESK-VPH",
SMART_DISPLAY_SUPPORT = "SMART-DISPLAY-SUPPORT",
SMART_HOME = "SMART-HOME",
DAAS = "DAAS",
VPH = "VPH"
};
/**
* Changes the messaging topic that the SDK will send messages to. You should initialize the SDK with a MessagingTopic.
* This function is a helper for multi-tenant app situations where some pages need to use one MessagingTopic and others
* need to use a different MessagingTopic
* @param messagingTopic - new Messaging Topic that the SDK should send messages to
*/
export const updateMessagingTopic = async (messagingTopic: MessagingTopic): Promise<void>;
// Example usage:
const someFunction = () => {
updateMessagingTopic(MessagingTopic.GENERAL_CONVERSATION);
}