Get Work Type Groups
Display the work type groups for the appointment.
A work type group represents a general appointment category or topic, such as a home loan or investment.
Create a page in your app where you can show the work type groups from your org.
-
Use the
Query()request on theServiceTerritoryWorkTypeobject to retrieve the work types associated with the service territory selected on the Select Service Territory screen.Sample Request
This sample REST API call uses the
Query()request to retrieve the work type records.For more information on using
Query()request, see Execute a SOQL Query.Where
YOUR_INSTANCEis a variable.Sample Response
The request returns the work type records.
-
Use the
Query()request on theWorkTypeGroupMemberobject to retrieve the work type groups by work types retrieved in the previous step.Sample Request
This sample REST API call uses the
Query()request to retrieve work type groups.For more information on using
Query()request, see Execute a SOQL Query.Where
YOUR_INSTANCEis a variable.You can use the
toLabelmethod to translate the SOQL query results in the language of the user. For more information, see Translate SOQL Query Results.Sample Response
The request returns the work type group records.
Parse the JSON response, and display the work type groups on web page so that users can select a work type group for the appointment. Here’s how that page can look.

Default to the work type that is associated with the service territory selected on the Select Service Territory screen and the work type group selected on the Select Work Type Group screen.