Legacy
This document explains the SDK that are no longer supported or are about to be deprecated.
We recommend not using the legacy SDKs described in this document.
Legacy SDKs can be removed at any time, which can lead to errors.
If you are already using the SDK, replace it as soon as possible through the SDK’s migration guide.
ChannelIO
show
Show the messenger.
ChannelIO('show');
Migration guide
Use showMessenger instead.
hide
Hide the messenger.
ChannelIO('hide');
Migration guide
Use hideMessenger instead.
lounge
Move to the Home.
ChannelIO('lounge');
openSupportBot
Deprecated. Use
openWorkflow
instead.The support bot is no longer supported and was replaced by workflow. The behavior of
openSupportBot
is the same as that ofopenWorkflow
.message
parameter is ignored.
Opens a chat and initiates a specific support bot.
- If a support bot with the provided
supportBotId
exists, it will be triggered. IfsupportBotId
is not provided or invalid, an error page is displayed. - If a
message
argument is provided, it will be inputted in the chat field after the support bot's operation completes.
behavior | supportBotId | message | note |
---|---|---|---|
Trigger a specific support bot | string | undefined | Displays an error page if supportBotId is invalid. |
Trigger a specific support bot and input a message after completion | string | string | Displays an error page if supportBotId is invalid. |
ChannelIO('openSupportBot', supportBotId: string, message?: string)
parameter | type | description |
---|---|---|
supportBotId | string | The ID of the support bot. |
message | (optional) string | The message to be inputted in the input field after the support bot's operation. |
// Triggers the support bot with ID '123'. Displays an error if it doesn't exist.
ChannelIO('openSupportBot', '123');
// Triggers the support bot with ID '123' and inputs 'Text here' after completion.
// Displays an error if the bot doesn't exist.
ChannelIO('openSupportBot', '123', 'Text here');
onBoot
Register the callback function to execute when the boot is completed.
When the boot succeeds, the callback function passes a user object. When the boot fails, the callback function passes undefined
.
ChannelIO('onBoot', function(user) {
// YOUR CODE...
});
Migration guide
Use the callback parameter of the boot instead.
onShow
Register a callback function to execute when the messenger is opened.
ChannelIO('onShow', function() {
// YOUR CODE...
});
Migration guide
Use onShowMessenger instead.
onHide
Register a callback function to execute when the messenger is hidden.
ChannelIO('onHide', function() {
// YOUR CODE...
});
Migration guide
Use the onHideMessenger instead.
onChangeBadge
Register a callback function to execute when the count of messages that the user has not yet read.
ChannelIO('onChangeBadge', function(unreadCount) {
// YOUR CODE...
});
Migration guide
Use the onBadgeChanged instead.
onCreateChat
Register a callback function to execute when a chat is created.
ChannelIO('onCreateChat', function() {
// YOUR CODE...
});
Migration guide
Use onChatCreated instead.
onProfileChanged
Register a callback function to execute when the user changes the user’s profile.
The profile object passed to the argument of the callback function includes the following fields.
name
: user’s nameemail
: user’s emailmobileNumber
: user’s mobile number
ChannelIO('onProfileChanged', function(profile) {
// YOUR CODE...
});
Migration guide
Use onFollowUpChanged instead.
onChangeProfile
Register a callback function to execute when the user changes the user’s profile.
The profile object passed to the argument of the callback function includes the following fields.
name
: user’s nameemail
: user’s emailmobileNumber
: user’s mobile number
ChannelIO('onChangeProfile', function(profile) {
// YOUR CODE...
});
Migration guide
Use onFollowUpChanged instead.
onClickRedirect
Register a callback function to execute when the user clicks a link.
The links that the user can click include the following list.
- Link button/text in marketing pop-up
- Link button/text sent by manager in chat
ChannelIO('onUrlClicked', function(url) {
// YOUR CODE...
});
Migration guide
Use onUrlClicked instead.
Boot Option
hideDefaultLauncher
Set whether to hide a default channel button.
Migration guide
Use hideChannelButtonOnBoot를 instead.
locale
Set a default language.
Migration guide
Use language instead.
enabledTrackDefaultEvent
Set whether to track a default event(PageView).
Migration guide
Use trackDefaultEvent instead.
enabledUtmSourceTrack
Set whether to track the UTM source and referrer or not.
Migration guide
Use trackUtmSource instead.
Updated 5 months ago