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

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

Community Module

Community Configurations

To override the default functionalities of the Community, we can use the following code snippet.
  1. import {ZohoDeskPortalCommunity} from '@zohocorp/zohodesk-portal-community';
    //The default value for the configuration is true
    ZohoDeskPortalCommunity.setConfiguration(
    {
    isTopicEditAllowed: true,
    isTopicDeleteAllowed: true,
    isReplyAllowed: true,
    isReplyEditAllowed: true,
    isReplyDeleteAllowed: true,
    isTopicDetailSearchAllowed: true,
    });
By default, all the configurations will work based on the user's authentication state and the relevant Help Center configuration.

Method name
Functions
Default enabled/disabled status
isTopicEditAllowed
To allow topic edit
Enabled
isTopicDeleteAllowed
To allow topic delete
Enabled
isReplyAllowed
To allow reply
Enabled
isReplyEditAllowed
To allow reply edit
Enabled
isReplyDeleteAllowed
To allow reply delete
Enabled
isTopicDetailSearchAllowed
To allow topic detail search
Enabled

We have the API provision to fetch the most popular topics. The code snippet:
  1. import {ZohoDeskPortalSDK} from '@zohocorp/zohodesk-portal-apikit'
    var queryParams = {
    'categoryId': 'your_CategoryID'
    }
    ZohoDeskPortalSDK.getMostPopularTopics(queryParams
    ,(success) => {
    console.log(success);
    },(error) => {
    console.log("Error:", error);
    })

Query Params

  1. CategoryId - ID of the category from which topics are to be retrieved.
  2. from - index from which the list is retrieved, and it starts from 1.
  3. limit - Number of topics to list.
  4. type - Topic Type - value can be QUESTION, IDEA, ANNOUNCEMENT, PROBLEM or DISCUSSION.

Get Most Discussed Topics

We have the API provision to fetch the most discussed topics. The code snippet:
  1. import {ZohoDeskPortalSDK} from '@zohocorp/zohodesk-portal-apikit'
    var queryParams = {
    'categoryId': "your_categoryId"
    }
    ZohoDeskPortalSDK.getMostDiscussedTopics(queryParams,
    (message) => { 
    console.log("Success:", message);
    },(error) => {
    console.log("Error:", error);
    })

Query Params

  1. CategoryId - ID of the category from which topics are to be retrieved.
  2. from - index from which the list is retrieved, starting from 1.
  3. limit - Number of topics to list.
  4. type - Topic Type - value can be QUESTION, IDEA, ANNOUNCEMENT, PROBLEM or DISCUSSION.

Show Topic

To open the specific community topic screen:
  1. import {ZohoDeskPortalCommunity} from '@zohocorp/zohodesk-portal-community';
    ZohoDeskPortalCommunity.showTopic("Your_community_topicID")