What are the configuration settings for the ASAP React Native SalesIQ SDK?

What are the configuration settings for the ASAP React Native SalesIQ SDK?

To display details of anonymous users in the chat module to your agents:

When an anonymous user contacts the customer support agent via chat, their details usually do not appear on the agent's screen. Regardless, you can configure the ASAP help widget to display these details after receiving them from the concerned user.
 
To configure this setting, use the following method:
  1. import {ZohoDeskPortalSalesIQ} from '@zohocorp/zohodesk-portal-salesiq';

  2. ZohoDeskPortalSalesIQ.setGuestUser("Your user valid e-mail","user name","user mobile no")
To use the SalesIQ configuration, import the ZohoDeskPortalSalesIQ module:
  1. import {ZohoDeskPortalSalesIQ} from '@zohocorp/zohodesk-portal-salesiq'; 
AlertThis configuration is provided in the ASAP SDK starting from version 3.0.3. In versions below 3.0.3, the preChatForm was disabled by default. From version 3.0.3 onwards, it is enabled by default. Please set your configurations accordingly.
Info
Once the salesIQ is successfully initialized. You can proceed with the additional configurations.
Info
For a smooth user experience, ensure that all necessary configurations are applied after initialization.

SalesIQInitListeners

For SalesIQ configuration, you must set up all the required configurations after addSuccessInitListener is called successfully.
Notes
Ensure that this callback is set before calling ZohoDeskPortalSDK.initialise("orgId", "appId", "dc");

There are two listeners

      1. addSuccessInitListener
That is called when the SalesIQ SDK is successfully initialised:
  1. let successSubscription =ZohoDeskPortalSalesIQ.addSuccessInitListener((data)=>{
  2. // Add configurations here
  3. //ZohoDeskPortalSalesIQ.showOfflineMessage(true)
  4. // ZohoDeskPortalSalesIQ.setChatVisibility(ZohoDeskPortalSalesIQ.chatComponents.PRE_CHAT_FORM,true); 


  5. })
      2. addErrorInitListener
That is when the SalesIQ SDK initialisation fails:
  1. let errorSuccessSubscription = ZohoDeskPortalSalesIQ.addErrorInitListener((data) =>{

  2. })

RemoveListeners

You must remove the success and error listeners after the successful SalesIQ init.
  1. successSubscription.remove();
  2. errorSuccessSubscription.remove();
InfoFor additional code examples, refer to the repo here.  

ShowLauncher

The ZohoDeskPortalSalesIQ.showLauncher(visibilityMode) API allows you to manage the SalesIQ launcher's visibility based on the specified visibility mode.

Parameters of VisibilityMode:
  1. ALWAYS - The launcher will always be visible.
  2. NEVER - The launcher will always be hidden.
  3. WHENACTIVECHAT - The launcher will be visible only when there is an active chat.
  1. ZohoDeskPortalSalesIQ.showLauncher(ZohoDeskPortalSalesIQ.visibilityMode.NEVER)

enableDragToDismiss

The ZohoDeskPortalSalesIQ.enableDragToDismiss(Boolean) lets you close the SalesIQ launcher by dragging it and dropping it onto the close button.
  1. ZohoDeskPortalSalesIQ.enableDragToDismiss(false)

setConversationTitle

This ZohoDeskPortalSalesIQ.setConversationTitle(String) API allows you to set the title for the conversations list screen in SalesIQ.
  1.  ZohoDeskPortalSalesIQ.setConversationTitle("History")

setConversationVisibility

This ZohoDeskPortalSalesIQ.setConversationVisibility(Boolean) API can be used to enable or disable the visitor conversation history in the salesiQ UI

Parameters:
true - Displays the conversation screen (default).
false - Hides the conversation screen.
Notes
This API cannot enable conversation history in UI if the same is disabled in portal settings.
  1. ZohoDeskPortalSalesIQ.setConversationVisibility(true)

showFeedbackAfterSkip

The Zohodeskportalsalesiq.showfeedbackafterskip(Boolean) API allows you to manage the duration of the feedback card for 24 hours after the chat ends.

Parameters:
enable:
true -The feedback card will be displayed permanently (default).
false - The feedback card will displayed for 24 hours until feedback is given.
Notes
The feedback card will always have the Skip option. When enable is "false" and upon clicking on Skip, the card will not be displayed again until the next chat.
  1. ZohoDeskPortalSalesIQ.showFeedbackAfterSkip(false)

hideQueueTime

The ZohoDeskPortalSalesIQ.hideQueueTime(Boolean) API controls the visibility of the chat queue time in the chat window when connecting to an operator. 

Parameter:
true - This hides chat queue time (default).
false - This displays the chat queue time.
  1. ZohoDeskPortalSalesIQ.hideQueueTime(true)

setLoggerEnabled

This ZohoDeskPortalSalesIQ.setLoggerEnabled(Boolea) lets you request your application debug logs from the visitor. By setting the bool value, you can choose to enable or disable the request app log feature for your operators in the SalesIQ dashboard.

Parameter:
true -  Enables the logs.
false - Disables the logs (default).
  1. ZohoDeskPortalSalesIQ.setLoggerEnabled(true)

showOfflineMessage

This showOfflineMessage( Boolean ) API will set an offline banner in the chat window during non-business hours and when agents are busy to help visitors leave a message even when agents are unavailable.

Parameters:
true - Displays the offline message card (default).
false - Hides the offline message card.
  1. ZohoDeskPortalSalesIQ.showOfflineMessage(true)

setKnowledgeBaseVisibility()           

The ZohoDeskPortalSalesIQ.setKnowledgeBaseVisibility(Boolean) API allows you to manage the resource's visibility in the Mobilisten knowledge base section.

Parameters:
true - This will display the resource type (default).
false - This will hide the resource.
Notes
The API will work when the "Articles" is enabled under brand settings. To check, from your SalesIQ dashboard, navigate to Settings > Brands > Personalisation > Knowledge Base > Article.
  1. ZohoDeskPortalSalesIQ.setKnowledgeBaseVisibility(true)

setChatVisibility

This  ZohoDeskPortalSalesIQ.setChatVisibility(chatComponents, true) API lets you toggle the function of various components in SalesIQ.
Notes
The components' settings are considered only if their function is enabled in portal settings.
  1. ZohoDeskPortalSalesIQ.setChatVisibility(ZohoDeskPortalSalesIQ.chatComponents.PRE_CHAT_FORM,true);      
  2. ZohoDeskPortalSalesIQ.setChatVisibility(ZohoDeskPortalSalesIQ.chatComponents.VISITOR_NAME,true);
  3. //Add other chatComponents here
Parameter of the Chat Component:

Chat component

Function description

Default setting

preChatForm

Enable/disable the pre-chat from before initiating a chat.

Enabled

operatorimage
Enable/disable the attendee's profile image in the chat window.
Enabled
vistorName
This option is used to configure the visibility of the visitor's name for all outgoing messages.
Disabled
screenshot
Enable/disable the ability to take screenshots from the adding attachments menu.
Enabled
rating
Enable/disable the option to rate a chat after it has ended.
Enabled
feedback
Enable/disable the option to give feedback after a chat has ended.
Enabled
emailTranscript
Enable/disable the option to request an email transcript for a chat.
Enabled
fileShare
Enable/disable the access to send files from the files application in chat.
Enabled
end
Controls the visibility of the end action option in the chat window.
Enabled

endWhenBotConnected

Show/hide the end chat option only for the bot-connected chats.

Enabled

endWhenOperatorConnected

Controls the visibility of the end action option in the chat window when a human operator is connected.Enabled

endWhenInQueue

Controls the visibility of the end action option in the chat window when the user is in the queue.Enabled

reopenChat

Controls the visibility of the queue position in the chat window. Enabled
queuePosition
Show/hide the queue position of the chat in the chat window and conversation history.
Enabled
  1.       chatComponents: {
  2.       PRE_CHAT_FORM: "preChatForm",
  3.       VISITOR_NAME: "visitorName",
  4.       SCREENSHOT_OPTION: "screenshotOption",
  5.       PHOTO_LIBRARY: "photoLibrary",
  6.       MEDIA_CAPTURE: "mediaCapture",
  7.       FILE_SHARING: "fileSharing",
  8.       EMAIL_TRANSCRIPT: "emailTranscript",
  9.       RATING: "rating",
  10.       FEEDBACK: "feedback",
  11.       REOPEN: "reopen",
  12.       END: "end",
  13.       END_WHEN_IN_QUEUE: "endWhenInQueue",
  14.       END_WHEN_BOT_CONNECTED: "endWhenBotConnected",
  15.       END_WHEN_OPERATOR_CONNECTED: "endWhenOperatorConnected",
  16.       QUEUE_POSITION: "queuePosition",
  17.  }