diff --git a/functions/addTags.html b/functions/addTags.html index d4c57a7..44e0540 100644 --- a/functions/addTags.html +++ b/functions/addTags.html @@ -19,19 +19,19 @@
Initializes the SDK, making Channel button
and features like marketing pop-ups operational.
A boot option to initialize SDK.
+Configuration options for initializing the SDK.
Optional
callback: CallbackCallback called after boot. When boot fails, the callback passes an error object at the first argument, null at the second argunent. When boot succeeds, the callback passes null at the first argument, a user object at the second argument.
+Function to be called after booting is complete. On failure, it receives an error object as its first argument and null as the second. On success, it receives null as the first argument and a user object as the second.
Clears all registered callbacks
Hide the channel button.
+Hides the channel button.
Hide the messenger.
+Hides the messenger interface.
Loads the Channel SDK script into the document.
+Register a callback invoked when a chat is created.
+Registers a callback function that is invoked when a chat is created.
The callback function to be executed.
+Register a callback invoked when the user changes the user’s profile.
+Registers a callback function that is invoked when the user updates their profile.
The callback invoked when the user changes the user’s profile. It receives the profile object as the argument.
+The callback function, receiving the FollowUpProfile
object as an argument.
https://developers.channel.io/docs/web-channelio#onfollowupchanged
Register a callback invoked when the messenger is hidden.
+Registers a callback function that is invoked when the messenger is hidden.
The callback function to be executed.
+Register a callback invoked when the messenger is shown.
+Registers a callback function that is invoked when the messenger is displayed.
The callback function to be executed.
+Registers a callback function that is invoked when the user clicks on a link.
+The callback invoked when the user clicks a link. It receives the URL of the link as the argument.
+The callback function, receiving the clicked URL as an argument.
https://developers.channel.io/docs/web-channelio#onurlclicked
Opens a chat within the messenger.
+Optional
chatId: string | numberThe ID of the chat to open.
+Optional
message: stringMessage to enter in the input
+Message to appear in the chat input.
Remove a user’s tags.
+Removes tags from a user.
If the corresponding tag don’t exist, that tag is ignored. null or an empty array([]) not allowed.
+Ignores non-existent tags. Empty array or null not allowed.
Optional
callback: CallbackIf fails, the callback passes an error object at the first argument, null at the second argument. If succeeds, the callback passes null at the first argument, a user object at the second argument.
+Called on success or failure.
Set the appearance of the theme.
+Sets the appearance theme.
Sets the current page.
+The page value to change. Don’t pass null or undefined to page. To reset the page, use resetPage.
+The page to set. Do not pass null or undefined. Use resetPage
to clear.
Shows the channel button.
+hideChannelButtonOnBoot
is false or hideChannelButton
was not called.Show the messenger.
+Displays the messenger interface.
Stop all operations of the SDK and initialize internal data.
+Terminates all SDK operations and reinitializes internal data.
Tracks user event.
+Desk
.The name of the event. Max 30 characters are allowed.
+Name of the event. Max length is 30 characters.
Optional
eventProperty: EventPropertyThe property of the event.
+Additional properties for the event.
Update user’s information.
+Updates user information.
Object with user’s information.
+Object containing user information to be updated.
Optional
callback: CallbackWhen it fails, the callback passes an error object at the first argument, null at the second argument. When it succeeds, the callback passes null at the first argument, an user object at the second argument.
+Optional callback function to be executed upon completion.
--Official Channel Web SDK Loader
+The Official Channel SDK Loader for Web
npm install @channel.io/channel-web-sdk-loader
+Installation
npm install @channel.io/channel-web-sdk-loader
Usage
-⚠️ Use the SDK on client-side only.
-You can’t execute the SDK beforehand on the server-side.
+⚠️ Note: This SDK is designed for client-side use only and should not be invoked on the server-side.
-Step1: Import ChannelService
import * as ChannelService from '@channel.io/channel-web-sdk-loader';
+Step1: Import the ChannelService Module
import * as ChannelService from '@channel.io/channel-web-sdk-loader';
-Step2: Load Channel Web SDK
ChannelService.loadScript()
+Step2: Load the Channel Web SDK
ChannelService.loadScript()
-Step3: Initialize Channel Web SDK
ChannelService.boot({
pluginKey: 'YOUR_PLUGIN_KEY'
})
+Step3: Initialize the Channel Web SDK
ChannelService.boot({
pluginKey: 'YOUR_PLUGIN_KEY'
})
-- You can get a plugin key from desk app. See guide docs
+- Obtain your plugin key from the Desk application.
+- For additional information, please consult the the official documentation.
-API References
Boot options for initializing the SDK.
+Optional
appearanceConfigure the initial appearance of your theme.
+null
.Optional
customSpecifies a CSS selector to target the custom launcher.
+channel button
.Optional
hideDetermines whether to hide the default channel button
.
false
.Optional
hideDetermines whether to hide marketing pop-ups and message alert pop-ups.
+false
.Optional
languageSpecifies the default language setting.
+32 languages
and UI language in ko
, ja
, and en
.ko
or ja
; defaults to en
otherwise.Optional
memberSet the hashed value of the memberId using HMAC-SHA256.
+Pass the HMAC-SHA256
hash of the user memberid
using the issued secret key.
memberHash
unless using user data encryption
.Optional
memberThe id of member user.
+Specifies the member user's ID.
The plugin key of your channel.
+Specifies the plugin key for your channel.
Optional
profileSet the user’s profile.
+Specifies the user’s profile.
Optional
trackDetermines whether to track the default PageView
event.
true
.Optional
trackDetermines whether to track the UTM source
and referrer
.
true
.Optional
unsubscribeDetermines whether to opt out of receiving marketing emails and text messages.
+false
.Optional
unsubscribeDetermines whether to opt out of receiving marketing emails.
+false
.Optional
unsubscribeDetermines whether to opt out of receiving marketing text messages.
+false
.Optional
zSets the z-index
for elements generated by the SDK.
channel button
, messenger
, and marketing pop-ups.10,000,000
.Represents the user profile information passed in the onFollowUpChanged
callback argument.
Optional
emailThe email of a user.
+User's email address.
Optional
mobileThe mobile number of a user. It follows E.164 format.
+User's mobile number, following the E.164 format.
Optional
nameRepresents user profile information.
+updateUser
or the profile
field in boot options.Information required to update a user.
+Optional
languageSpecifies the user's language.
+32 languages
and UI language in ko
, ja
, and en
.ko
or ja
; defaults to en
otherwise.Optional
profileSpecifies the user's profile.
+null
will initialize the whole profile.null
will initialize that field.mobileNumber
field must follow the E.164
format.Optional
profileAmong the fields inside profileOnce object, only the fields with no existing value are added.
+Specifies the user's profile.
+profileOnce
object.Optional
tagsSpecifies the User's tags.
+null
will initialize the tags.Optional
unsubscribeDetermines whether to opt out of receiving marketing emails.
+true
will terminate the subscription.Optional
unsubscribeDetermines whether to opt out of receiving marketing text messages.
+true
will terminate the subscription.Represents user information.
+The number of important notifications that are unread.
+The avatar image URL of a user.
+URL representing the user's avatar image.
The id of a user
+Unique identifier for the user.
The language setting for the user.
+updateUser
method or the language boot
option.Unique identifier for member user.
+memberId
is specified in the boot option, the user is considered a member.Optional
nameThe user's name.
+updateUser
method.Optional
profileThe user's profile information.
+updateUser
method or the profile boot option.Optional
tagsAn array of tags associated with the user.
+updateUser
, addTags
, or removeTags
methods.The total count of unread notifications for the user.
+Whether the user has opted out of receiving marketing emails.
+updateUser
method or the unsubscribeEmail
boot option.Whether the user has opted out of receiving marketing text messages.
+updateUser
method or the unsubscribeTexting
boot option.Defines appearance options for the theme.
+light
: Light theme.dark
: Dark theme.system
: System-defined theme.Desk
theme setting.Callback function type for handling badge changes.
+unread is the number of all unread notifications the user has not read. It includes the number of alert. It is displayed as a red dot on the channel button.
+The total number of unread notifications. If you have unread
notifications but no alert
, a red dot is displayed on the channel button to signify unread messages.
alert is the number of important notifications that the user has not read. It is displayed as a number on the channel button.
+The number of important unread notifications. This count is displayed as a number on the channel button.
Callback for error or success responses.
+
Add a user’s tags.
+Adds tags to a user.
Parameters
tags: string[]
-If the same tag exists, only one tag is added. Max 10 tags allowed. Always lowercase.
+Unique tags only. Max 10, always in lowercase.
-Optional
callback: CallbackIf it fails, the callback passes an error object at the first argument, null at the second argument. If it succeeds, the callback passes null at the first argument, a user object at the second argument.
+Called on success or failure.
Returns void
@@ -39,7 +39,7 @@Returns voidSee
https://developers.channel.io/docs/web-channelio#addtags