Working with the ASAP SDK for Android - Online Help | Zoho Desk

Working with the ASAP SDK for Android

SDK Version 3.0

The ASAP SDK for Android provides easy access to help the end-users of your Android app. Using this SDK, you can create and customize an add-on that resides within your app and provides end-users with easy access to the following help center services:
  • Customer support team (to raise tickets or chat with support agents
  • Knowledge Base (to access help articles)
  • User Community (to interact with other users of the app)
For end-users, this addition means that they do not have to exit your app and visit your website or send an email to contact you for support. They can easily seek help right from within your app, thereby saving time and enjoying a superior customer experience.
If you are a current user of the ASAP SDK (versions up to 2.1.6), you need to migrate the existing code to use v3.0. For instructions on how to do this, please refer to the Migrating from v2.x to v3.0 section of this article.

Setting up the SDK in Zoho Desk

The first step to including the ASAP add-on within your Android app is to create and register the add-on in Zoho Desk.
To create the add-on, perform the following steps:
  1. Go to this path in Zoho Desk: Setup → Channels → ASAP.
  2. In the Setup pane on the left, under ASAP , click the + button next to Mobile . The Create Mobile Add-On page will appear.



  3. Under Add-On Details , configure the following settings:
    1. Name: Name for the ASAP add-on. This name is only for reference and does not appear anywhere on the app UI.
    2. Available for: Departments for which this ASAP add-on must be enabled.
    3. Chat: Toggle switch for enabling/disabling Chat.
      Note: The Chat component reflects the settings configured for the chat channel in your help desk portal. Therefore, any change required must be done via the Setup page in Zoho Desk.
    4. Zia: Zia is an AI companion within Zoho Desk, with whom your customers can speak or chat from your mobile apps. Zia processes their questions and automatically answers them based on content in your Knowledge Base. Toggle switch for enabling Zia.
    5. Guided Conversations: Guided Conversations helps your end-users find answers by themselves or perform a standard process without an agent's assistance by following a pre-built conversation flow. Toggle switch for enabling Guided Conversations.
      On enabling Guided Conversations, you can choose the flows to be used to engage your users in the app. Learn more, Guided Conversations
      Note: You can enable either Zia or Guided Conversations, or both together.
    6. Bundle ID: In the Android field, enter the bundle ID of your Android app. (Bundle ID is nothing but the applicationId of your Android app. You can retrieve this information from the app level build.gradle file.)
      Note: Bundle ID is mandatory for enabling Chat and sending push notifications.
    7. Push Notifications : Toggle switch for enabling/disabling push notifications. To enable push notifications, enter the GCM/FCM server key in the Enter GCM/FCM key field. (You can retrieve this key by accessing the following path in Firebase Console: Project Settings → Cloud Messaging → Server Key ).
      Note: JWT-based user authentication is mandatory for enabling notifications. Push notifications related to tickets are not sent to anonymous users.
    8. Authentication Method: User authentication setting for the add-on
      1. Anonymous - In this method, end-users are considered guest users. They can only submit tickets, view posts in the user community, and chat with a customer support agent. They cannot view the tickets they submitted or actively participate in the user community.
      2. JWT - In this method, end-users are considered authenticated users. In addition to the activities that guest users can perform, authenticated users can also view and track the status of the tickets they submitted, reply/comment to a ticket, and actively participate in the user community (with rights to perform actions, such as following a topic, adding a topic, and adding a comment to existing posts).
  4. Click Save.


A new section called Code Snippet will appear. This section displays the Org ID, App ID, and Deployment type details of your app. These details are vital for initializing the ASAP SDK in your app.

Integrating the SDK with your app

The next step is to integrate the ASAP SDK with your Android app using Maven.
To integrate the SDK with your app, include the following code in the root level build.gradle file.

  repositories

    {

        google()

        mavenCentral()

        maven {

            url "https://maven.zohodl.com/"

        }

        maven {

            url "https://downloads.zohocdn.com/wmslibrary"

        }

    }


Note: The ASAP SDK was developed using Android Architecture Components. Therefore, it is essential to include maven.google.com/google() in the app code.
Next, include the dependency required for the SDK.

Include the dependency code required in the dependencies section of the app level build.gradle file.
  1. 'com.zoho.desk:asapsdk:3.0_BETA_18' - ASAP SDK with default UI; includes Chat.
  2. 'com.zoho.desk:asap:3.0_BETA_18' - ASAP SDK with default UI; does not include Chat.
  3. 'com.zoho.desk:asap-api:3.0_BETA_18' - ASAP SDK without UI. Serves as the API provider.
dependencies { implementation 'com.zoho.desk:asapsdk:3.0_BETA_18'}
The SDK is now integrated with your app. The configuration details of the ASAP SDK are as follows:
  • compileSdkVersion - 33
  • targetSdkVersion - 33
  • minSdkVersion - 21
  • org.jetbrains.kotlin:kotlin-stdlib:1.5.20

Initializing the SDK in your app

Next, you must initialize the SDK in your app.
The following three keys are essential:
  • Org ID
  • App ID
  • Datacenter
The values of these keys appear under the Code Snippet section in the setup page of the ASAP add-on in Zoho Desk.
To initialize the SDK in your app, add the following code snippet to a subclass of the Application class.
import android.app.Application;
import com.zoho.desk.asap.api.ZohoDeskPortalSDK;

public class MyApplication extends Application {
   public static ZohoDeskPortalSDK apiProvider;
   @Override
   public void onCreate() {
      super.onCreate();
      ZohoDeskPortalSDK.Logger.enableLogs();
      apiProvider = ZohoDeskPortalSDK.getInstance(getApplicationContext());
      apiProvider.initDesk(orgId, appId, datacenterValue);
   }
}
Note
Datacenter values according to the deployment type are as follows:
CN - DataCenter.CN
EU - DataCenter.EU
US - DataCenter.US
IN - DataCenter.IN
AU - DataCenter.AU
JP - DataCenter.JP

Displaying help components

SDK dashboard

The SDK dashboard is the screen through which end-users access your help center. This dashboard displays icons or buttons that provide access to your Knowledge Base, User Community, customer support team (through the ticket submission form), tickets list (list of tickets submitted by users who are logged in), and Chat (to interact with a customer support agent in real time).
Note: The Chat module is not enabled by default in the SDK UI. You must first enable it in your Zoho Desk portal.
The following method displays the SDK dashboard.
ZDPortalHome.show(MainActivity.this);
      

SDK Dashboard with overridden configuration

(i) Display selected modules in SDK dashboard:
The SDK enables you to embed your preferred help center modules in your application excluding the other modules. By default, all the support modules are enabled. You can disable the particular support module by passing the value "false".
The following method displays the SDK dashboard with its configuration overridden.

ZDPHomeConfiguration config = new ZDPHomeConfiguration.Builder()

                .isKBEnabled(true)

                .isCommunityEnabled(true)

                .isLiveChatEnabled(true)

                .isMyTicketsEnabled(true).build();

ZDPortalHome.setConfiguration(config);

ZDPortalHome.show(activity);
 (ii) Display individual module without displaying the SDK dashboard:
You also have the option to provide access to individual help modules without displaying the SDK dashboard on your application
The following methods help you display the individual modules with their default configuration
Chat
Chat is the module through which end-users can interact with a customer support agent in real time.
The following method displays the Chat module.
ZDPortalChat.show(activity);
activity is the activity instance that triggers the Chat module.
Displaying details of anonymous users to agents
When an anonymous user contacts customer support via chat, their details usually do not appear on the agent's screen. However, you can configure the ASAP add-on to display these details after receiving them from the user.
To configure this setting, use the following method.
ZDPortalChatUser chatUser = new ZDPortalChatUser();
chatUser.setName(name);
chatUser.setEmail(email);
chatUser.setPhone(phone);
ZDPortalChat.setGuestUserDetails(chatUser);
Knowledge Base
Knowledge Base is the module through which end-users can access help articles.
The following method displays Knowledge Base.
ZDPortalKB.show(activity);
activity is the activity instance that triggers the Knowledge Base module.
Submit Ticket
Submit Ticket is the screen through which end-users can submit their questions/requests as support tickets.
The following method displays the Submit Ticket screen.
ZDPortalSubmitTicket.show(activity);
activity is the activity instance that triggers the Submit Ticket screen.
My Tickets
My Tickets is the screen through which end-users can access, track, and edit the tickets they submitted.
The following method displays the My Tickets screen.
ZDPortalTickets.show(activity);
activity is the activity instance that triggers the My Tickets screen.
User Community
User Community is the module through which end-users can access discussion forums and interact with other users for sharing knowledge.
The following method displays the User Community.
ZDPortalCommunity.show(activity);
activity is the activity instance that triggers the Community module.

Guided Conversations
Guided Conversations helps your end-users find answers by themselves or perform a standard process without an agent's assistance by following a pre-built conversation flow. No additional development efforts are required unless you need GC activity to be called from your desired flow.

The following method displays the Guided Conversations.
ZDPortalLiveChat.show(<activity>);
Flow has also been designed as a fragment component. You can use the following method where required.
ZDPortalLiveChat.getChatFragment()
Once you enable Guided Conversations and Zia, the Chat component will be displayed as below:

                                             
When you enable Guided Conversations and Zia together, Guided Conversations gets loaded by default, and you can switch to Zia if necessary. Note that you cannot switch between Zia and Guided Conversations in the middle of the flow unless you reset the flow by clicking Restart Conversation in the bottom menu.

Authenticating users in the SDK

To access the tickets they submitted, end-users of your app must have an identity so that they can authenticate themselves as a user of the Zoho Desk portal. This authentication is made possible in Zoho Desk via the JSON Web Token (JWT).

Zoho Desk supports two types of authentication: Anonymous and JWT.
  • Anonymous - In this type, end-users are considered guest users. They can only submit tickets, view posts in the User Community, and chat with a customer support agent. They cannot view the tickets they submitted or actively participate in the User Community.
  • JWT - In this type, end-users are considered authenticated users. In addition to the activities that guest users can perform, authenticated users can also view the tickets they submitted and actively participate in the User Community (with rights to perform actions, such as following a topic, adding a topic, and adding a comment to existing posts).
           To learn more about JWT, read  how to configure JWT-based user authentication

The following code snippet authenticates users in the SDK.
if(!MyApplication.deskInstance.isUserSignedIn()) 
{

MyApplication.deskInstance.loginWithJWTToken(String jwtToken, ZDPortalCallback.SetUserCallback callback)
}
In the code snippet above:
  1. loginWithJWTToken is the function that inputs the jwt token of the user.
  2. jwttoken The jwttoken generated is used for authenticating the user signing in to the app.
  • callback is the ZDPortalCallback.SetUserCallback instance that will be called after userFetch is executed.
The loginWithJWTToken function must be executed only if a user has not signed into the SDK. Therefore, you must configure the ASAP add-on to first check if a user has signed in or not. To perform this check, use the following code.
boolean isUserLoggedIn = MyApplication.deskInstance.isUserSignedIn();

Logging users out from the SDK

To log a user out from the SDK, use the following method.

MyApplication.deskPortalSDK.logout
(new ZDPortalCallback.LogoutCallback() 
{ 
   @Override 
   public void onLogoutSuccess() 
   { 
      //User logged out 
   } 
   @Override 
   public void onException(ZDPortalException e) 
   { 
   } 
});
After this method is called, the authenticated user is treated as an anonymous user.

Clearing local data  

All the data stored locally in the device is automatically cleared when an authenticated user signs out from the ASAP add-on.

However, if local data needs to be cleared for anonymous users as well, use the following method.

MyApplication.deskInstance.clearDeskPortalData();

Customizing the Add-On UI  

The ASAP SDK provides you with the option to customize the UI of the add-on as required.

Predefined themes

The SDK UI comes with two predefined themes: light and dark.


Customized Themes

(i) Customize theme type:

You can customize the theme type in the SDK add-on using the below code:

ZDPortalConfiguration.setThemeType(ZDPThemeType.SYSTEM);

ZDPThemeType.SYSTEM: By default, the system theme is selected. If you want to change the theme to light/dark mode, use the following methods:

  •  ZDPThemeType.Light : Changes the SDK add-on theme to light irrespective of the system theme.

  • ZDPThemeType.Dark: Changes the SDK add-on theme to dark irrespective of the system theme.

 

(ii) Customize colors in the particular theme:

To customize the colors of the particular theme, please use the following method,

 

ZDPTheme theme = new ZDPTheme.Builder(true)
        .setColorPrimary(Color.parseColor("#"))
        .setColorAccent(Color.parseColor("#"))
        .build();
ZDPortalConfiguration.setThemeBuilder(theme);

The following picture illustrates the color properties for a screen,

                                                      

(iii) Customize font typefaces:
You can customize font typefaces to match the font typeface of your application.


ZDPortalConfiguration.setFontBuilder(ZDPFont.Builder().setMedium(medium).setRegular(regular).build())

Changing language settings

The ASAP SDK supports 47 languages. You can set any language of your choice, based on the geographical location of the end-users of your app.
Below is the code that helps you set the language for the ASAP add-on.
ZDPortalConfiguration.setLanguage("en");
The table below lists all languages supported.

Language
Locale Code
English (UK)
en-GB
English (US)
en-US
German
de
Spanish
es
Catalan
ca
French
fr
French (Canada)
fr-ca
Italian
it
Russian
ru
Chinese
zh
Chinese (Taiwan)
zh-tw
Turkish
tr
Dutch
nl
Danish
da
Portuguese
pt
Japanese
ja
Swedish
sv
Polish
pl
Arabic
ar
Hebrew
he
Afrikaans
af
Czech
cs
Bulgarian
bg
Finnish
fi
Greek
el
Hungarian
hu
Indonesian
id
Norwegian (Bokmal)   
nb
Romanian
ro
Thai
th
Ukrainian
uk
Vietnamese
vi
Urdu
ur
Hindi
hi
Telugu
te
Kannada
kn
Tamil
ta
Marathi
mr
Korean
ko
Persian
fa
Bengali
bn
Gujarati
gu
Malay
ms
Malayalam
ml
Slovak
sk
Croatian
hr
Slovenian
sl

If your app supports only a handful of languages and not all 47 mentioned in the table, you can configure the ASAP add-on such that only the languages you want are supported in it. 

To do this, include the following code snippet in the build.gradle file. 
android {
    defaultConfig {
        ...
        resConfigs "en", "ta", "fi"
    }
}
For example, the snippet mentioned above includes only English, Tamil, and Finnish in the add-on, and excludes the other languages.

See more:  resConfigs key

Customizing UI Strings

The ASAP SDK facilitates customization of the text that appears on the different screens of the add-on. The text includes UI labels for help modules, error messages, and general information. To change the text, perform the following steps:
  1. In the strings.xml file of your app, include the keys that are relevant to the SDK UI. (For the list of keys supported, refer to the table below.)
  2. Compile the code and verify.
The table below lists the different keys in the default ASAPLocalizable.strings file.
Key
Default Text
Description
DeskPortal.Dashboard.Heading
"Customer Support"
Text that appears on the help center dashboard
DeskPortal.Dashboard.helpcenter.title
"Knowledge Base"
Title of the knowledge base module icon on the dashboard
DeskPortal.Dashboard.helpcenter.description
"Browse our extensive repository of help articles"
Text that describes the knowledge base
DeskPortal.Dashboard.community.title
"Community"
Title of the user community module icon on the dashboard
DeskPortal.Dashboard.community.description
"Find and share solutions with the user community"
Text that describes the user community
DeskPortal.Dashboard.addticket.title
"Submit Ticket"
Title of the ticket submission module icon on the dashboard
DeskPortal.Dashboard.addticket.description
"Seek help from our agents"
Text that describes the ticket submission screen
DeskPortal.Dashboard.myticket.title
"My Tickets"
Title of the my tickets icon on the dashboard
DeskPortal.Dashboard.myticket.description
"View and manage tickets that you submitted"
Text that describes the my tickets screens
DeskPortal.Helpcenter.article.detail.relatedtitle
"Related Articles"
Text that appears below any help article in the knowledge base
DeskPortal.Helpcenter.article.detail.vote.description
"Was this article helpful?"
Text that seeks feedback from the user
DeskPortal.Helpcenter.feedback.title
"Feedback"
Title of the feedback form
DeskPortal.Helpcenter.feedback.description
"We're sorry the article wasn't helpful."
Text that appears when a user downvotes an article
DeskPortal.Myticket.option.closeticket
"Close Ticket"
Text for option that lets the user close a ticket they submitted
DeskPortal.Error.message.reload
"Retry"
Error message that appears if ticket submission fails
DeskPortal.Network.failed.error.message
"No Internet connection"
Error message that indicates loss of connectivity
DeskPortal.Dashboard.livechat.title
"Live Chat"
Title of the live chat module on the help center dashboard
DeskPortal.Addticket.title
"Add Ticket"
Title of the ticket submission form

Enabling Notifications

You can configure the ASAP add-on to send notifications to end-users when an agent responds via chat.
Note: Make sure that Push Notifications settings are configured in the ASAP add-on setup page in Zoho Desk.
To enable push notifications for Chat and Tickets, include the following code snippet after initializing the SDK.
MyApplication.deskInstance.enablePush("fcmId");
fcmId is the client token used for registering the device. You can retrieve this token using the FirebaseInstanceId.getInstance().getToken(); method.

To disable push notifications, include the following code snippet.
MyApplication.deskInstance.disablePush("fcmId");
To configure UI and navigation for notifications, add the following code snippet to the onReceived() method of your NotificationReceiver class.
ZDPortalConfiguration.handleNotification(Context context, Map data, int icon);
context is the appContext. Map refers to the notification data that is received. icon is the application icon that must appear in the notification.

Programmatically adding tickets

While end-users can manually submit tickets through the ASAP add-on, you can also configure your app to automatically record tickets when certain events occur in the app. For example, if you run a clothing business and your app fails to load the For Women screen when a user tries to access it, this failure instance can be automatically recorded as a ticket in your help desk. The user would not need to visit your help center and manually submit a ticket.

To make this automatic submission of tickets possible, incorporate the following method in your app code.
ZDPortalTicketsAPI.createTicket(new CreateTicketCallback() {
   @Override
   public void onTicketCreated(Ticket ticket) {
   }
   @Override
   public void onException(ZDPortalException exception) {
   }
}, ticketData, params);
ticketData - instance of HashMap<String, Object> key-value
The  keys that are passed in the ticketData should match with the TicketField's apiName. 
Ticket fields can be fetched by using the getTicketFields API that is mentioned below. 
The email subject , and departmentId keys are mandatory parameters in the ticketData.

To fetch the IDs of the departments in your help desk portal, use the following method.
ZDPortalAPI.getDepartments(new ZDPortalCallback.DepartmensCallback() { 
   @Override
   public void onDepartmentsDownloaded(DepartmentsList response) {
   }
   @Override
   public void onException(ZDPortalException exception) {
   }
});

To fetch the IDs of the layout in your help desk portal, use the following method.

HashMap<String, String> params = new HashMap<>();
params.put("departmentId", departmentId);
ZDPortalAPI.getLayouts(new ZDPortalCallback.LayoutsCallback() {
    @Override
    public void onLayoutsDownloaded(Layouts layouts) {
//layout fetch succeed
    }

    @Override
    public void onException(ZDPortalException e) {
//layout fetch failed
    }
}, params);
To fetch information on the products configured in a department, use the following method.
HashMap<String, String> options = new HashMap<>(); 
options.put("from", String.valueOf(1));
options.put("limit", String.valueOf(100));
options.put("departmentId", departmentId);
ZDPortalAPI.getProductsList(new ZDPortalCallback.ProductsCallback() {
   @Override
   public void onProductsDownloaded(ProductsList productsList) {
      productsMap.put(departmentId, productsList.getData());
      responseLiveData.setValue(productsList.getData());
   }
   @Override
   public void onException(ZDPortalException exception) {
   }
}, options);
To fetch the fields configured in the ticket layout of a department, use the following method.
ZDPortalTicketsAPI.getTicketFields(new TicketFieldsCallback() {
   @Override
   public void onTicketFieldsDownloaded(TicketFieldsList ticketFieldsList) {
   }
   @Override
   public void onException(ZDPortalException exception) {
   }
}, fieldsParams, "apiName");
To include a file attachment in the ticket, use the following method.
ZDPortalTicketsAPI.uploadAttachment(new UploadAttachmentCallback() {
   @Override
   public void onAttachmentUploaded(ASAPAttachmentUploadResponse response) {
   }
   @Override
   public void onException(ZDPortalException exception) {
   }
}, fileTobeUploaded, null);

Knowledge Base

These methods help you display the Knowledge Base module and all associated content in the ASAP add-on.

Category Deep-linking

The following method displays the list of categories/sub-categories in your Knowledge Base and the help articles under each category.
ZDPortalKB.showCategoryWithPermalink(activity, permaLink);
  1. activity is the instance of the activity.
  2. permalink is the URL of the knowledge base category.


For instance, in the URL in the image above, the portion following "/kb/" is the permalink of the category. You can pass this portion as the path of the category or sub-category.

Article Deep-linking

The following method displays the content of a help article right within your ASAP add-on.
ZDPortalKB.showArticleWithPermalink(activity, permaLink);
  1. activity is the instance of the activity.
  2. permalink is the URL of the help article.


For example, in the URL in the image above, the portion following "/articles/" is the permalink of the article.

Community

These methods help you display the Community module and all associated content on the ASAP add-on.

Custom-Configuring Community actions

Users can perform a range of actions, including editing and deleting topics, and adding, editing, and deleting comments, in the community module.
The following method helps you define which actions must be allowed and which actions must be disallowed when users access the community through the ASAP add-on.

ZDPCommunityConfiguration configuration = new ZDPCommunityConfiguration.Builder()

                .isReplyAllowed(true)

                .isReplyEditAllowed(true)

                .isReplyDeleteAllowed(true)

                .isTopicEditAllowed(true)

                .isTopicDeleteAllowed(true).build();

ZDPortalCommunity.setConfiguration(configuration);
The following API fetches the forum topics with the most number of likes.

HashMap<String, String> params = new HashMap<>();
params.put("from", "1");
params.put("limit", "5");
ZDPortalCommunityAPI.getMostPopularTopics

(new ZDPortalCallback.CommunityTopicsCallback() {
      @Override
      public void onCommunityTopicsDownloaded(DeskTopicsList deskTopicsList) {
      }
      @Override
      public void onException(ZDPortalException e) {
      }
}, params);
Allowed Params
  1. categoryId - string - ID of the community category from which the topics must be fetched. If you want to include all categories, pass the value null.
  2. filterType - string - Type of forum topic. Values allowed are: QUESTIONIDEAANNOUNCEMENTPROBLEM, and DISCUSSION .
  3. from - int - Index number, starting from which the topics must be fetched. Value starts from 1.
  4. limit - int - Number of topics to fetch
  5. includeCount - Boolean - Parameter that specifies whether the number of topics fetched must be displayed or not

Getting the Most Discussed Topics

The following API fetches the forum topics with the most number of comments.
HashMap<String, String> params = new HashMap<>();
params.put("from", "1");
params.put("limit", "5");
ZDPortalCommunityAPI.getMostDiscussedTopics(new 
ZDPortalCallback.CommunityTopicsCallback() 
{
   @Override
   public void onCommunityTopicsDownloaded(DeskTopicsList deskTopicsList) 
   {
   }
   @Override
   public void onException(ZDPortalException e) 
   {
   }
}, params);
Allowed Params
  1. categoryId - string - ID of the community category from which the topics must be fetched. If you want to include all categories, pass the value null.
  2. filterType - string - Type of forum topic. Values allowed. are: QUESTIONIDEAANNOUNCEMENTPROBLEM, and DISCUSSION.
  3. from - int - Index number, starting from which the topics must be fetched. Value starts from 1.
  4. limit - int - Number of topics to fetch.
  5. includeCount - Boolean - Parameter that specifies whether the number of topics fetched must be displayed or not.

Tickets

These methods help you configure the Submit Ticket form the way you want, on the ASAP add-on.

Hiding fields in the Submit Ticket form

The Submit Ticket form in your ASAP add-on displays the same fields configured in the ticket layout in your Zoho Desk portal. If you want to hide any of the fields in the form, you can do so using the setTicketsFieldsListTobeShown() method.

You must pass the list of fields (apiNames) as strings in this method. You might also have to pass the departmentId key, depending on the department mapping of the add-on. For instance, if the add-on is configured for a specific department, you don't need to pass the departmentId key. If the add-on is configured for multiple departments, you must pass the departmentId key to ensure department-ticket fields mapping in the Submit Ticket form.

After you include this method, the form displays only the fields you passed in the method. However, keep in mind that mandatory fields will not be hidden even if you do not pass their names in the method.
ZDPortalSubmitTicket.setTicketsFieldsListTobeShown(ticketListTobeShown, deptId, 
layoutId);
  1. ticketListTobeShown - List of strings (apiName of the Ticket Fields)
  2. deptId - ID of the department for which you want to configure the Ticket Fields list.
  3. layoutId - ID of the particular layout for which you wan to configure the Ticket Fields.

Hiding mandatory fields in the Submit Ticket form

If you want to hide a mandatory field in the form, you can do so, provided the value of the field is pre-filled. To do this, you must use the preFillTicketFields() method.

The preFillTicketFields() method proves useful when you want to pre-populate fields with values, such as auto-generated IDs or OS version of devices. To use this method, you must pass the list of PreFillTicketField objects. You should also pass the departmentId key, depending on the department mapping of the add-on. Just like in the case of the setTicketsFieldsListTobeShown() method, if the add-on is configured for a specific department, you don't need to pass the departmentId key. If the add-on is configured for multiple departments, you must pass the departmentId key to ensure department-fields mapping.
ZDPortalSubmitTicket.preFillTicketFields(preFillTicketFields, deptId, layoutId);
  1. preFillTicketFields - List of PreFillTicketField objects
  2. deptId - ID of the department for which you want to configure the Ticket Fields list.
  3. layoutId - ID of the particular layout for which you wan to configure the Ticket Fields.
The PreFillTicketField object contains three main properties:
  1. fieldApiName - string - apiName of the ticket field. You can retrieve the apiName of each field using the getTicketFields() method.
  2. fieldValue - object
    1. For multiselect fields, pass the values allowed, as a list of strings.
    2. For pick list fields, pass one of the values allowed, as a string.
    3. For date fields, pass the value as a string in the dd-MM-yyyy format.
    4. For dateTime fields, pass the value as a string in the dd-MM-yyyy HH:mm a format.
    5. For Boolean fields, pass a Boolean value.
    6. For all other field types, pass the values as string objects.
    7. Make sure that the values you pass adhere to the maxlength and decimal restrictions defined for the field.
  3. isEditable - Boolean - Key that defines if the value in the field is editable or not
Note: For more clarity, refer to the sample code.

Submit Ticket event with subscription

If you want your app to subscribe to the Submit Ticket event, use the following method, which includes an event callback.
ZDPortalSubmitTicket.setCreateTicketCallback(new ZDPortalCallback.CreateTicketCallback() 
{
            @Override
            public void onTicketCreated(Ticket ticket) 
	    {
                //Ticket created
            }
            @Override
            public void onException(ZDPortalException e)
	    {
                //Exception
            }

});
CreateTicketCallback is the callback object that sends ticket information when a ticket is submitted via the Submit Ticket screen.
Note: If an authenticated user submits a ticket, all details of the ticket are sent to your app. If a guest user submits a ticket, only the ticket number is sent.

Custom-Configuring Ticket actions

Users can perform a range of actions, including replying to, commenting on, and closing tickets.
The following method helps you define which actions must be allowed and which actions must be disallowed when users access the ticket submission screen on the ASAP add-on.
ZDPTicketConfiguration configuration = new ZDPTicketConfiguration.Builder()
        .isReplyAllowed(true)
        .isCommentAllowed(true)
        .isCommentEditAllowed(true)
        .isTicketUpdateAllowed(true)
        .build();

ZDPortalTickets.setConfiguration(configuration);
Others
These methods help you perform a variety of other actions in your ASAP add-on.
Updating user details
The following API helps update the details of users added to your help desk portal.
HashMap<String, String> params = new HashMap<>();
params.put("timeZone", "asia/kolkatta");
ZDPortalAPI.updateProfileDetails(new ZDPortalCallback.UserDetailsCallback() {
   @Override
   public void onUserDetailsSuccess(DeskUserProfile userProfile) {
   }
   @Override
   public void onException(ZDPortalException exception) {
   }
}, params);

Params

HashMap <String, String> data - Key and value pair. The following keys are included: twitter, phone, facebook, name, displayName, mobile, countryLocale, and timeZone.

ASAP configuration changes

ASAP SDK  provides methods to display/hide specific functionality.
For example, To hide the KnowledgeBase(KB), use the following method:
ZDPortalConfiguration.setConfiguration(new ZDPConfiguration.Builder().isKBEnabled(false).build())


isKBEnabled(true): displays the KB
isKBEnabled(false): hides the KB
Note: The status of the modules can be changed to either enabled or disabled. However this action can only be performed if the modules are enabled in the ASAP configuration settings.

To display/hide the specific modules/options/buttons, refer to the respective methods mentioned below:

Method name

Functions
Details of the default enabled/disabled status
isCommunityEnabled
To hide the Community module
based on Portal configuration
isMyTicketsEnabled
To hide the My Tickets module
based on Portal configuration
isSubmitTicketEnabled
To hide the Add Ticket module
based on Portal configuration

isAddTopicEnabled

To hide the Add Topic module
based on Portal configuration

isChatBotEnabled

To hide the Chat Bot module
based on Portal configuration

isLiveChatEnabled

To hide the Agent C module
based on Portal configuration
isSideMenuEnabled
To disable the Side Menu option
enabled

isPoweredByFooterEnabled

To hide the powered by ASAP label button
enabled

isLangChooserEnabled

To disable the language chooser option

enabled
isAttachmentDownloadEnabled 
To disable the Download attachments option

enabled

isGlobalSearchEnabled

 To disable the Search option
enabled
isAttachmentUploadEnabled
To disable the Upload attachments option 

enabled
isShareEnabled
To disable the Share option

enabled

SDK logging

The ASAP SDK also provides you with the option to fix errors that occur while using the add-on. This is made possible by SDK logging.
To enable logging for the SDK, include the following code snippet.
ZohoDeskPortalSDK.Logger.enableLogs();
After enabling SDK logging, you can check the console log for the errors and take necessary action.
Note: Some debug information related to the SDK is stored in logcat. Make sure that enableLogs() does not exist in the release build.

Release Notes

3.0_BETA-18

  • We have fixed the build issues while integrating the ASAP SDK in the apps with Gradle v8.0.

3.0_BETA-17

  1. Deprecated the Login with the user-token method. And migrated to the enhanced JWT token method. Refer here for the code snippets.

3.0_BETA-16

  1. We implemented the Text-To-Speech and the In-Article Search features for the KB Articles.


3.0_BETA-15

  1. Fixed the overriding app_logo (launcher icon) issue.

3.0_BETA-14

  1. Handled Nested pick list in ASAP SDK Tickets module.

3.0_BETA-13

  1. Handled translation for the names of system fields in the Add Ticket Form and Ticket Properties.

3.0_BETA-12

  1. Provided options to disable Upload attachments, Download attachments and Share option. Read more ASAP configuration changes.

3.0_BETA-11

  1. Enhanced the dark theme user interface of the rich text across the entire SDK, especially in Article and Topic content. 
  2. Integrated the latest version of the Guided Conversation SDK into ASAP. Read more Guided Conversation SDK for Android.
  3. Extended the options to disable the help center modules. Read more ASAP configuration changes.

3.0_BETA-10

  1. The option to set the callback for Submit Ticket has been provided as an independent feature. Previously, it was supported only with ZDPortalSubmitTicket.show().

          In this version, the ZDPortalSubmitTicket.show(activity, callback) method has been removed. Please use the    

          setCreateTicketCallback() method instead. For more information refer "Submit Ticket event with subscription" under Tickets.

3.0_BETA-0_9

  1. Migrated from protobuf java to protobuf java-lite to handle a build issue (duplicate class found error) with the protobuf java dependency.

3.0_BETA-0_8

  1. Handled translation by utilizing i18n for translating newly included UI strings in the ASAP mobile SDK.

3.0_BETA-0_7

  1. Fixed the issue with the File Provider Authorities that was causing the app to crash.

3.0_BETA-0_6

  1. Provided an option to edit the Ticket Properties within the ASAP SDK.

3.0_BETA-0_5

  1. Provided an option to disable the Side Menu. See More
  2. Provided an option to hide the "powered by ASAP label" that is displayed at the bottom of each screen of the ASAP SDK. See More

3.0_BETA-0_4

  1. Provided an option to customize the fonts in Zoho Desk ASAP SDK. For more information, refer "Customize font typefaces" under Customizing the Add-On UI.

3.0_BETA-0_3

  1. Handled the miscellaneous bug fixes.

3.0_BETA-0_2

The following enhancements were made to the UI:

  • Included a header in the Side Menu.

  • Changed the color of the Default Light and Dark Theme.

Migrating from v2.x to v3.0

 

Customizing the add-on UI

 

 

ZDPortalConfiguration.setThemeResource(themeId);

ZDPortalConfiguration.setThemeType(ZDPThemeType.LIGHT);

ZDPortalConfiguration.setThemeBuilder(new ZDPTheme.Builder(false)

    .setColorPrimary(getResources().getColor(R.color.colorPrimary))

    .setColorPrimaryDark(getResources().getColor(R.color.colorPrimaryDark))

.build());

 

Custom-Configuring Community Actions

 

ZDPCommunityConfiguration communityConfiguration = new ZDPCommunityConfiguration(); communityConfiguration.setTopicEditAllowed(false);

 

ZDPortalCommunity.setConfiguration(communityConfiguration);

ZDPCommunityConfiguration communityConfiguration = new ZDPCommunityConfiguration.Builder().isTopicEditAllowed(false).build();

        

ZDPortalCommunity.setConfiguration(communityConfiguration);

 

Custom-Configuring Ticket Actions

 

ZDPTicketConfiguration ticketConfiguration = new ZDPTicketConfiguration();

ticketConfiguration.setReplyAllowed(false);

 

 

ZDPortalTickets.setConfiguration(ticketConfiguration);

ZDPTicketConfiguration ticketConfiguration = new ZDPTicketConfiguration.Builder().isReplyAllowed(false).build();

        

 

ZDPortalTickets.setConfiguration(ticketConfiguration);



    Zoho CRM Training Programs

    Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

    Zoho CRM Training
      Redefine the way you work
      with Zoho Workplace

        Zoho DataPrep Personalized Demo

        If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

        Zoho CRM Training

          Create, share, and deliver

          beautiful slides from anywhere.

          Get Started Now


            Zoho Sign now offers specialized one-on-one training for both administrators and developers.

            BOOK A SESSION





                        Still can't find what you're looking for?

                        Write to us: support@zohoforms.com

                                                                       
                            



                            





                              You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                  Manage your brands on social media

                                    Zoho Desk Resources

                                    • Desk Community Learning Series


                                    • Digest


                                    • Functions


                                    • Meetups


                                    • Kbase


                                    • Resources


                                    • Glossary


                                    • Desk Marketplace


                                    • MVP Corner


                                    • Word of the Day


                                      Zoho Marketing Automation

                                        Zoho Sheet Resources

                                         

                                            Zoho Forms Resources


                                              Secure your business
                                              communication with Zoho Mail


                                              Mail on the move with
                                              Zoho Mail mobile application

                                                Stay on top of your schedule
                                                at all times


                                                Carry your calendar with you
                                                Anytime, anywhere




                                                      Zoho Sign Resources

                                                        Sign, Paperless!

                                                        Sign and send business documents on the go!

                                                        Get Started Now





                                                                Zoho TeamInbox Resources



                                                                        Zoho DataPrep Resources



                                                                          Zoho DataPrep Demo

                                                                          Get a personalized demo or POC

                                                                          REGISTER NOW


                                                                            Design. Discuss. Deliver.

                                                                            Create visually engaging stories with Zoho Show.

                                                                            Get Started Now










                                                                                                • Related Articles

                                                                                                • Working with ASAP SDK for Flutter

                                                                                                  Integrate ASAP SDK to implement the help center services within your Flutter applications. ASAP is a self-service platform that provides the following help center services to the customers: Raise tickets Access the Knowledge Base Interact with other ...
                                                                                                • Working with the ASAP SDK for iOS

                                                                                                  SDK version 3.0 The ASAP SDK for iOS provides easy access to help the end-users of your iOS app. Using this SDK, you can create and customize an add-on that resides within your app and provides end-users with easy access to the following help center ...
                                                                                                • Working with the ASAP SDK for React Native

                                                                                                  The ASAP SDK for React Native makes help available within quick reach for the end-users of your mobile app. Using this SDK, you can add and customize an add-on that resides within your iOS/Android app and provides end-users with easy access to your: ...
                                                                                                • Working with the Zoho GC SDK for Android

                                                                                                  Mobile applications have proven to be a significant component of business with the advent of smartphones. Businesses offer a range of services through their mobile phone applications for better customer engagement. To improve users' interest in apps, ...
                                                                                                • Working with the ASAP Add-Ons for Mobile Platforms

                                                                                                  The ASAP SDKs for mobile platforms--iOS and Android--make help available within quick reach for the end-users of your mobile apps. Using these SDKs, you can create and customize add-ons that reside within your app and provide end-users with easy ...
                                                                                                Wherever you are is as good as
                                                                                                your workplace

                                                                                                  Resources

                                                                                                  Videos

                                                                                                  Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                  eBooks

                                                                                                  Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                  Webinars

                                                                                                  Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                  CRM Tips

                                                                                                  Make the most of Zoho CRM with these useful tips.



                                                                                                    Zoho Show Resources