@@ -135,12 +135,13 @@ export const ChannelIO = {
135135 } ,
136136
137137 /**
138- * Opens User chat to run a specific Support bot.
139- * @param {String } supportBotId This is the support bot's ID. If supportBotId is invalid or nil, the chat room is closed.
140- * @param {String } message This message will be displayed in the input field after completing the support bot operation.
138+ * Opens a user chat and starts the specified workflow.
139+ * - If a corresponded workflow with the provided workflowId is exists, it will be executed. if workflowId is invalid, an error page is displayed.
140+ * - If you don't pass workflowId, no action is taken.
141+ * @param {String } workflowId The ID of workflow to start with. An error page will be shown if such workflow does not exist.
141142 */
142- openSupportBot : ( supportBotId , message ) => {
143- ChannelModule . openSupportBot ( supportBotId , message ) ;
143+ openWorkflow : ( workflowId ) => {
144+ ChannelModule . openWorkflow ( workflowId ) ;
144145 } ,
145146
146147 /**
@@ -231,13 +232,17 @@ export const ChannelIO = {
231232 openStoredPushNotification : ( ) => ChannelModule . openStoredPushNotification ( ) ,
232233
233234 /**
234- * Set page to be used instead of recent activity name or view controller.
235+ * 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.
236+ * @param {String } page This is the screen name when track is called. When calling .track(), the event's page is set to null.
237+ * @param {String } profile The user chat profile value.
238+ * - When nil is assigned to a specific field within the profile object, only the value of that field is cleared.
239+ * - The user chat profile value is applied when a user chat is created.
235240 */
236- setPage : ( page ) => {
241+ setPage : ( page , profile ) => {
237242 if ( typeof page === "string" ) {
238- ChannelModule . setPage ( page )
243+ ChannelModule . setPage ( page , profile )
239244 } else if ( page === null || page === undefined ) {
240- ChannelModule . setPage ( null )
245+ ChannelModule . setPage ( null , profile )
241246 } else {
242247 console . error ( 'ChannelIO' , '"page" must be type of "string", null or undefined.' )
243248 }
@@ -260,6 +265,11 @@ export const ChannelIO = {
260265 }
261266 } ,
262267
268+ /**
269+ * Hides the Channel popup on the global screen.
270+ */
271+ hidePopup : ( ) => ChannelModule . hidePopup ( ) ,
272+
263273 /**
264274 * @deprecated
265275 * Event listener that triggers when badge count has been changed
0 commit comments