Sync team assignments from Salesforce via API

API toolWorkatoRecipe ToolsCRMMarketing

What it does

When someone makes an API request to this endpoint, this automation queries Salesforce for team assignments within a date range. It returns the matching records so the requester gets the data in real time.

Who it's for

Sales operations teams who need to retrieve team assignments from Salesforce through an API without manual exports.

How teams use this

Retrieve assignments for a reporting period

Call the API with a start and end date to get all team assignments for that month or quarter. The response includes every matching record from Salesforce so reports can be built from the data.

Embed assignments in another system

Integrate this API into a dashboard or third-party tool so team assignments sync from Salesforce without manual steps. The same query runs each time the endpoint is called.

Filter by team or territory

Add a filter parameter to the API request so callers can narrow results to a specific team or territory. The query in Salesforce updates to include only those assignments.

How it works

  1. Receive the API request. Define the request and response parameters for this API endpoint so callers can specify the date range for team assignments.
  2. Set the date boundaries. Create variables for startDate and endDate in Workato Api Platform so the Salesforce query filters records within the requested time window.
  3. Query team assignments. Search for records using a SOQL query in Salesforce to retrieve all assignments that fall between the start and end dates.
  4. Return the results. Send a 200 OK response with the matching team assignments so the API caller receives the data immediately.