Channel Developers

This page describes ChannelIO of the Channel Talk React Native SDK (hereafter refer to SDK).)

Loads the information needed to use the SDK. After a successful boot, you are ready to use the features of SDK. See boot for details.

Parameter

required

Description

bootConfig

O

A boot configuration. You can set the plugin key and position of Channel button, etc.

bootCallback

X

A callback from boot. It returns bootStatus and User.

JavaScript

Disable all functions except receiving system push notifications and track.

JavaScript

Terminate connection between SDK and Channel. shutdown will discontinue features of the SDK will be discontinued.

JavaScript

Displays Channel button on the global screen.

JavaScript

Hide Channel button on the global screen.

JavaScript

Shows the messenger.

JavaScript

Hides the messenger.

JavaScript

Opens a Chat. You can open a new one or open an existing chat.

Parameter

required

description

chatId

X

The id of chat.If chatId is invalid or nil, it will open a newly created chat.

message

X

A filled message on the message input box.It will be valid when chatId is nil.

JavaScript

Opens a user chat and starts the specified workflow.

  • If a corresponded workflow with the provided workflowId is exists, it will be executed. if workflowId is invalid, an error page is displayed.

  • If you don't pass workflowId, no action is taken.

parameter

type

required

description

workflowId

String?

X

The ID of workflow to start with.An error page will be shown if such workflow does not exist.

JavaScript

Track the user’s event. See event tracking for more details.

Paramter

Description

eventName

Event name max length is 64

properties

**optional** Event properties.

JavaScript

Updates user information.

Parameter

required

description

userData

O

Information of the user to be updated.

callback

X

Callback for the updated user information.

JavaScript

Add tags to the user.

Previous user's tag

Parameter

Result

["a"]["a"]

["b"]["b"]

["a", "b"]["a", "b"]

null

["a", "b"]["a", "b"]

["a", "b"]["a", "b"]

["a", "c"]["a", "c"]

["a", "b"]["a", "b"]

["a", "b", "c"]["a", "b", "c"]

["a", "b", "c", "d", "e", "f", "g"]["a", "b", "c", "d", "e", "f", "g"]

["g", "h", "i", "j"]["g", "h", "i", "j"]

["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]

["a", "b", "c", "d", "e", "f", "g"]["a", "b", "c", "d", "e", "f", "g"]

["g", "h", "i", "j", "k"]["g", "h", "i", "j", "k"]

error:combined size is 11

Parameter

required

description

tags

O

Tags to add. • The maximum length is 10. • Tag cannot be duplicated. • Tag is case-insensitive (Tags are renamed to the lower-case.) • nil, list including nil, empty list, and an empty string is not allowed.

callback

X

A Callback when the update completes. It returns an error when it fails to add.

JavaScript

Remove tags from the user. It Ignores if tags do not exist.

Previous user's tag

Parameter

Result

["a", "b"]["a", "b"]

["a"]["a"]

["b"]["b"]

["a"]["a"]

["c"]["c"]

["a"]["a"]

["a"]["a"]

["A", "c"]["A", "c"]

null

Parameter

required

description

tags

O

Tags to be deleted. nil or empty strings or lists containing them are not allowed.

callback

X

A Callback when the remote tag completes. It returns an error when it fails to remove.

JavaScript

Sets the name of the screen along with user chat profile. If track is called before setPage, the event will not reflect the page information.

Parameter

type

required

description

page

String?

X

This is the screen name when track is called. When calling `.setPage(null)`, the event's page is set to `null`.

profile

object

X

The user chat profile value. - When nil is assigned to a specific field within the profile object, only the value of that field is cleared. - The user chat profile value is applied when a user chat is created.

JavaScript

Resets the name of the screen when track is called. The default value is the name of the ViewController or Activity calling the track.

JavaScript

Hides the Channel Popup on the global screen.

JavaScript

Notifies the change of the device token to Channel Talk.

Parameter

Description

token

Push token

JavaScript

Checks if the push payload is targeting on Channel Talk SDK.

Parameter

Description

payload

JavaScript

Notifies an event that the user has received the push notification.

+ Android Show push notification

Parameter

Description

Etc.

payload

JavaScript

Checks if the plugin has unhandled push notification. See push notifications for details.

Parameter

Description

Etc.

activity

Base activity to start chat

Android only

JavaScript

Open chat according to the push data stored by receivePushNotifcation .

Parameter

Description

Etc.

activity

Base activity to start chat

Android only

JavaScript

Checks that the SDK is in the boot status.

Sets SDK’s debug mode. If it sets true, SDK prints log messages in the console.

Parameter

Description

flag

Debug flag

JavaScript

Sets the appearance of the SDK.

Parameter

Type

Required

Description

appearance

Appearance

O

If you specify"light"and"dark",fix the theme with its properties.If"system",follow the device's system theme.default value is"system".