Get Work Type Groups
A work type group represents a general appointment category or topic, such as a home
loan or investment. Use the Query() method on the
WorkTypeGroup object to retrieve a list of work type groups.
- Create a page in your app where you can show the work type groups from your org.
-
Use the Query() method to retrieve work type
groups. For more information, see Execute a SOQL Query.
- Sample Request
-
https://yourInstance.salesforce.com/services/data/vXX.X/query/?q=SELECT+Id,+Name+From+WorkTypeGroup +Where+isActive+=+true+ORDER+BY+NAME+DESC
You can use the toLabel method to translate the SOQL query results in the language of the user. For more information, see Translate SOQL Query Results.
- Sample Response
-
The method returns the available work type groups from your org.
{ "totalSize" : 3, "done" : true, "records" : [ { "attributes" : { "type" : "WorkTypeGroup", "url" : "/services/data/v59.0/sobjects/WorkTypeGroup/0VSS700000000sLOAQ" }, "Id" : "0VSS700000000sLOAQ", "Name" : "Wealth Management" }, { "attributes" : { "type" : "WorkTypeGroup", "url" : "/services/data/v59.0/sobjects/WorkTypeGroup/0VSS700000000sQOAQ" }, "Id" : "0VSS700000000sQOAQ", "Name" : "Loans" }, { "attributes" : { "type" : "WorkTypeGroup", "url" : "/services/data/v59.0/sobjects/WorkTypeGroup/0VSS700000000sVOAQ" }, "Id" : "0VSS700000000sVOAQ", "Name" : "Banking" } ] }
-
Parse the JSON response, and display the work type groups on a page in your app so that
users can select a work type group during appointment scheduling. Here’s how that page can
look.
On the next page in your app, you can provide users an option to search for service territories.