How to customize the Tickets module for the ASAP React Native SDK?

How to customize the Tickets module for the ASAP React Native SDK?

Tickets Module

Update Ticket Configurations

To update the ticket configurations use the following code snippet:
  1. import {ZohoDeskPortalTicket} from '@zohocorp/zohodesk-portal-ticket';
    //This is the default value for this configuration
    ZohoDeskPortalTicket.setConfiguration({
    isReplyAllowed: true,
    isCommentAllowed: true,
    isTicketUpdateAllowed: true,
    isCommentEditAllowed: true,
    isCommentDeleteAllowed: true,
    isAddTicketAllowed: true,
    isCustomerHappinessThreadAllowed: true,
    isTicketChannelAllowed: true,
    isTicketPropertiesAllowed: true,
    disableTicketDetailSearch: false
    })
By default, all the configurations are enabled. If any of the functionalities need to be disabled, the above can be used to disable some specific functionalities.

Method name
Functions
Default enabled/disabled status
isReplyAllowed
To allow reply the reply option
Enabled
isCommentAllowed
To allow the comment option
Enabled
isTicketUpdateAllowed
To allow ticket update
Enabled
isCommentEditAllowed
To allow the comment option
Enabled
isAddTicketAllowed
To allow add ticket option
Enabled
isCustomerHappinessThreadAllowed
To allow customer happiness thread
Enabled
 isTicketChannelAllowed
To allow ticket channel
Enabled
isTicketPropertiesAllowed
To Show ticket properties
Enabled
disableTicketDetailSearch
To disable the ticket screen search
Disabled

GetCallbackOnCreate

In case the callback needs to be received when users submit tickets, use the following code snippet:
  1. import {ZohoDeskPortalSubmitTicket} from '@zohocorp/zohodesk-portal-ticket';
    ZohoDeskPortalSubmitTicket.getCallbackOnCreate((success)=>{
    console.log(success)
    },(error)=>{
    console.log(error)
    });

Get Departments

Add the following code snippet to fetch the list of Departments available in the Help Center.
  1. import {ZohoDeskPortalSDK} from '@zohocorp/zohodesk-portal-apikit'

    ZohoDeskPortalSDK.getDepartments((success)=>{
    console.log(success)
    },(error) => {
    console.log(error)
    }

Get Layouts

Add the following code snippet to fetch the list of Layouts available in the Help-center:

  1. import {ZohoDeskPortalSDK} from '@zohocorp/zohodesk-portal-apikit'
    var QueryParams = {
    'departmentId': 'your_departmentId',
    'limit': '1'
    }
    ZohoDeskPortalSDK.getLayouts(QueryParams,
    (success) => {
    console.log(success); 
    },
    (error) => {
    console.log(error);
    }
    )

Query Params

  1. departmentId - ID of the department in which the layouts are configured.
  2. layoutName - Name of the layout used as the keyword for the search.
  3. from - from index.
  4. limit - no of layouts to be fetched.

Get Products

To get the products of a specific department, use the following code snippet:
  1. import {ZohoDeskPortalSDK} from '@zohocorp/zohodesk-portal-apikit'
    var departmentID = 'Your_departmentID'
    var queryParams = {
    'limit': '1'
    }
    ZohoDeskPortalSDK.getProducts(departmentID,queryParams
    ,(success) => {
    console.log(success); 
    }, (error) => {
    console.log(error);
    })

Query Params

  1. departmentID - The departmentID of the products.
  2. from - The from limit for listing agents.
  3. limit - The number of records to be fetched.

Hiding fields in the Submit Ticket form

The Submit Ticket form in your ASAP help widget displays the same fields configured in the ticket layout in your Zoho Desk portal. To hide any of the fields in the form, you can use the setTicketsFieldsListTobeShown() method.

After you include this method, the form displays only the fields you passed:
  1. import {ZohoDeskPortalSubmitTicket} from '@zohocorp/zohodesk-portal-ticket';
    import {ZDVisibleTicketField} from
    '@zohocorp/zohodesk-portal-ticket/src/Components/ZDPortalSubmitTicketWrapper';

    const visibleField = new ZDVisibleTicketField('departmentId', 'layoutId', ['subject']);
    const visibleFields = [visibleField];
    ZohoDeskPortalSubmitTicket.setFieldsListTobeShown(visibleFields);
setFieldsListTobeShown method takes a param which is a List of ZDVisibleTicketField.
  1. class ZDVisibleTicketField {
    constructor(departmentId, layoutId, fieldNames) {
    this.departmentId = departmentId;
    this.layoutId = layoutId;
    this.fieldNames = fieldNames;
    }

Params

  1. departmentId - ID of the department for which you want to configure the Ticket Fields list.
  2. layoutId - ID of the particular layout for which you want to configure the Ticket Fields.
  3. fieldNames - List of apiNames of Fields which need to be shown.

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 field's value is prefilled. To do this, you must use the preFillTicketFields() method:
  1. import {ZohoDeskPortalSubmitTicket} from '@zohocorp/zohodesk-portal-ticket';
    import {ZDCustomizedTicketField, ZDCustomizedTicketForm} from
    '@zohocorp/zohodesk-portal-ticket/src/Components/ZDPortalSubmitTicketWrapper';
    const ticketField1 = new ZDCustomizedTicketField('fieldName', 'This is pre fill value', true);

    const ticketField2 = new ZDCustomizedTicketField('fieldName', '5678', true);
    const ticketForm = new ZDCustomizedTicketForm('departmentId', 'layoutId',
    [ticketField1, ticketField2]);

    const ticketForms = [ticketForm];
    ZohoDeskPortalSubmitTicket.preFillTicketFields(ticketForms)
preFillTicketFields method takes ticketForms (list of TicketForm object) as input:
  1. class ZDCustomizedTicketForm {
    constructor(departmentId, layoutId, customizedTicketFields) {
    this.departmentId = departmentId;
    this.layoutId = layoutId;
    this.customizedTicketFields = customizedTicketFields;
    }
    }
ZDPCustomisedTicketForm can be created with following input:
  1. departmentId - ID of the department for which you want to configure the Ticket Fields list.
  2. layoutId - ID of the particular layout for which you want to configure the Ticket Fields.
  3. customisedTicketFields - List of ZDCustomizedTicketField objects.
  1. class ZDCustomizedTicketField {
    constructor(fieldName, value, isEditable) {
    this.fieldName = fieldName;
    this.value = value;
    this.isEditable = isEditable;
    }
    }
ZDCustomizedTicketField can be created with following input:
  1. filedName - apiName of the TicketField
  2. value - Object default value of the Ticket Field
  3. isEditable - indicates, whether this field can be editable

AddAttachments

Add attachments for the tickets using the following code snippet:
  1. import {ZohoDeskPortalSDK} from '@zohocorp/zohodesk-portal-apikit'
    var fileName = "HelloWorld.txt"
    ZohoDeskPortalSDK.addAttachments(fileName,base64Data, (success)=>{
    console.log(success);
    },(error)=>{
    console.log(error);
    }

Params

  1. FileName - The pass the file name with .extension.
  2. base64Data - To convert the attachment to a base64 format.

CreateTicket

To create a new ticket for an authenticated user (only users logged in through the ASAP SDK can create tickets using this method):
  1. import {ZohoDeskPortalSDK} from '@zohocorp/zohodesk-portal-apikit';
    var ticketData = {
    "cf" : {
    "data" : "cf_new_data s"
    },
    "phone" : "your_phone_number",
    "subject" : "ticket_subject",
    "departmentId" : "your_DepartmentID",
    "description" : "your_ticket_description",
    "priority" : "High",
    "classification" : "ticket_classification"
    }
    ZohoDeskPortalSDK.createTicket(ticketData,(success)=>{
    console.log(success)
    },(error) =>{
    console.log(error)
    })

Create Guest Ticket

To create a new ticket for guest users (users who are not logged into the ASAP SDK are allowed to create tickets using this method):
  1. import {ZohoDeskPortalSDK} from '@zohocorp/zohodesk-portal-apikit';
    var ticketGuestData = {
    "cf" : {
    "data" : "cf_new_data"
    },
    "phone" : "your_phone_number",
    "contactName" : "your_contact_name",
    "subject" : "New Ticket API",
    "departmentId" : "your_DepartemnetID",
    "description" : "description of the ticket",
    "priority" : "High",
    "classification" : "ticket_classification",
    "email" : "yourmail@gmail.com"
    }
    ZohoDeskPortalSDK.createGuestTicket(ticketGuestData,(success)=>{
    console.log(success)
    },(error) =>{
    console.log(error)
    })

TicketData Query Params

  1. Subject - The subject of the ticket.
  2. contactName - Name of the ticket creator.
  3. email - Email address of the ticket creator.
  4. Phone - Customer’s contact phone number (optional).
  5. departmentId - The ID for the department handling the ticket.

ShowTicketDetail

To open the specific tickets detail screen, use the following code snippet:
  1. import {ZohoDeskPortalTicket} from '@zohocorp/zohodesk-portal-ticket';
    ZohoDeskPortalTicket.showTicketDetail("Your_ticket_Id")

      Create. Review. Publish.

      Write, edit, collaborate on, and publish documents to different content management platforms.

      Get Started Now


        Access your files securely from anywhere

          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







                              Quick LinksWorkflow AutomationData Collection
                              Web FormsRetailOnline Data Collection Tool
                              Embeddable FormsBankingBegin Data Collection
                              Interactive FormsWorkplaceData Collection App
                              CRM FormsCustomer ServiceForms for Solopreneurs
                              Digital FormsMarketingForms for Small Business
                              HTML FormsEducationForms for Enterprise
                              Contact FormsE-commerceForms for any business
                              Lead Generation FormsHealthcareForms for Startups
                              Wordpress FormsCustomer onboardingForms for Small Business
                              No Code FormsConstructionRSVP tool for holidays
                              Free FormsTravelFeatures for Order Forms
                              Prefill FormsNon-Profit
                              Forms for Government
                              Intake FormsLegal
                              Mobile App
                              Form DesignerHR
                              Mobile Forms
                              Card FormsFoodOffline Forms
                              Assign FormsPhotographyMobile Forms Features
                              Translate FormsReal EstateKiosk in Mobile Forms
                              Electronic FormsInsurance
                              Drag & drop form builder

                              Notification Emails for FormsAlternativesSecurity & Compliance
                              Holiday FormsGoogle Forms alternative GDPR
                              Form to PDFJotform alternativeHIPAA Forms
                              Email FormsWufoo alternativeEncrypted Forms
                              Accessible FormsTypeform alternativeSecure Forms

                              WCAG

                                          Create. Review. Publish.

                                          Write, edit, collaborate on, and publish documents to different content management platforms.

                                          Get Started Now






                                                            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

                                                                  Use cases

                                                                  Make the most of Zoho Desk with the use cases.

                                                                   
                                                                    

                                                                  eBooks

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

                                                                   
                                                                    

                                                                  Videos

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

                                                                   
                                                                    

                                                                  Webinar

                                                                  Sign up for our webinars and learn the Zoho Desk basics, from customization to automation and more

                                                                   
                                                                    
                                                                  • Desk Community Learning Series


                                                                  • Meetups


                                                                  • Ask the Experts


                                                                  • Kbase


                                                                  • Resources


                                                                  • Glossary


                                                                  • Desk Marketplace


                                                                  • MVP Corner



                                                                    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 Demo

                                                                                                      Get a personalized demo or POC

                                                                                                      REGISTER NOW


                                                                                                        Design. Discuss. Deliver.

                                                                                                        Create visually engaging stories with Zoho Show.

                                                                                                        Get Started Now









                                                                                                                            • Related Articles

                                                                                                                            • Introducing ASAP React Native SDK

                                                                                                                              Please note that if you are using an older version of ASAP, the help widgets will be read-only. To enable the new ASAP widgets on your app, use the latest ASAP React-Native SDK 3.0.0. You can use the ASAP React-Native SDK ...
                                                                                                                            • Working with the ASAP SDK for React Native

                                                                                                                              The ASAP SDK for mobile provides easy access to help end-users of your React Native app. Using this SDK, you can create and customize a help widget that resides within your app and provides end-users with easy access to the Help Center services: • ...
                                                                                                                            • How to Integrate the ASAP SDK with React Native

                                                                                                                              After successfully setting up the ASAP SDK on your mobile application, the next step is to integrate it. Code block to installing the react-native plugin: We have the following list of plugins, customers can integrate the SDK based on their ...
                                                                                                                            • Introducing ASAP Flutter Apps SDK

                                                                                                                              This document pertains explicitly to help widgets created using the updated new ASAP Setup. If you are using an older version of ASAP, the help widgets will be read-only. To enable the new ASAP widgets on your App, use the latest ASAP Flutter Plugin ...
                                                                                                                            • How to customize the Tickets module for the ASAP Flutter SDK?

                                                                                                                              The Ticket module in Zoho Desk manages all customer support requests and inquiries. Each ticket includes the customer's name, email address, phone number, and issue description. The Ticket module also offers automated ticket assignment, escalation, ...
                                                                                                                              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