Get Work Type Groups

A work type group represents a general appointment category or topic, such as a home loan or investment. Show your users your work type groups on the landing page by retrieving the list of work type groups from your Salesforce instance. Your users can select a work type group from the list while booking appointments.

  1. Create a page to show your work type groups.

  2. Use the Query() request on the WorkTypeGroup object to retrieve the list of work type groups from your Salesforce instance.

    Sample Request

    1https://YOUR_INSTANCE.salesforce.com/services/data/v68.0/query/?q=SELECT+Id,+Name+From+WorkTypeGroup​+Where+isActive+=+true+ORDER+BY+NAME

    Where YOUR_INSTANCE is a variable.

    Sample Response

    The request returns the work type group records.

    1{
    2  "totalSize": 3,
    3  "done": true,
    4  "records": [
    5    {
    6      "attributes": {
    7        "type": "WorkTypeGroup",
    8        "url": "/services/data/v57.0/sobjects/WorkTypeGroup/0VSS700000000sLOAQ"
    9      },
    10      "Id": "0VSS700000000sLOAQ",
    11      "Name": "Wealth Management"
    12    },
    13    {
    14      "attributes": {
    15        "type": "WorkTypeGroup",
    16        "url": "/services/data/v57.0/sobjects/WorkTypeGroup/0VSS700000000sQOAQ"
    17      },
    18      "Id": "0VSS700000000sQOAQ",
    19      "Name": "Loans"
    20    },
    21    {
    22      "attributes": {
    23        "type": "WorkTypeGroup",
    24        "url": "/services/data/v57.0/sobjects/WorkTypeGroup/0VSS700000000sVOAQ"
    25      },
    26      "Id": "0VSS700000000sVOAQ",
    27      "Name": "Banking"
    28    }
    29  ]
    30}
  3. Parse the JSON response, and display the work type groups on a page that you created.

Your users can select a work type group for the appointment from the page.