Comments

  • 1-2 of 2
  • Chethana KM

    Hi,

    The business requirement is as follows:
    We have to display all the Regulation attribute values as a dropdown on Customer portal.
    User selects one of the Regulation, say - "abc" and clicks on "Download Report" button.
    This should download all the articles with Regulations attribute set to "abc"

    To achieve the above requirement, we are following the below steps in the code, making more than one API call inside loop:
    1. Firstly, we are hitting the Content REST API to get all the docIds existing in the Service cloud database
    2. For each DocId (obtained from Step#1), we are again hitting the Content API to search for the specific Regulatory attribute value inside the xml field of the article (in the REST API response). When we looped through the docIds, it was taking more time to process fetching of data. Then, to improve the performace, we are calling a function to implement multi curl to make more than one REST API call at a time. Still, the requests are getting executed sequentially only and the performance is not getting improved. Hence, we have thought of implementing parallel execution of multi-curl, for which we need the multi-threading concept/technique in Service Cloud.

    Request you to provide us some direction/suggestions on how to improve the performance on execution of REST API's parallely on Service cloud?

    Thanks,
    Chethana

     

  • Chethana KM
    Hi Robert, Thank you for the suggestions! I have the following queries: 1. I am not able to figure out how to query for attribute using search Rest API. From the documentation, I see that we can search for some keyword/text or filter further based on facets. Could you please advise how to configure search Rest Api to query for article attributes? 2. As you say, if we set an attribute as master identifier, it will be displayed along with title of the article on UI. This is fine if it doesn't impact the regular search functionality on Customer portal. Also, the attribute which we want to query through rest api is a data list in the schema. It can have values "abc", "xyz" and so on.. My another doubt is that, suppose for an article art1, if the value of attribute is "abc" and the title (another attribute) of the article is "xyz general text". Now, if we want to retrieve articles having regulations as "xyz" and use content api to query for "xyz" in the title, then the article art1 will be fetched in the content api results,even though it doesn't have "xyz" as regulations. If regulations value is present in title as well, then this will lead to wrong results and we cannot go with this approach of using content api. Please suggest. Thanks, Chethana