Distributions

Route incoming leads to different schedules based on predefined filters. Configure filters using attributes such as geographic location, interest, lead score, or custom fields. When a new lead is received, the API evaluates these filters to automatically assign the lead to the appropriate schedule. This feature streamlines the lead distribution process, enabling quicker response times and more targeted engagement.

GET /schedule_distributions

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/schedule_distributions

List Distribution records.

Lists the Lead Distribution rules that move leads from one schedule to a target schedule whenever they match a filter group. When filtering by ids, results are returned in their configured sortable order.

Params

Param name Description
ids
Optional

Return records matching these ids.

  • Must be an array of decimal values. EG: [0, 1, 2, 3]

page
Optional

Return the next page of results.

  • Must be a number.

per_page
Optional

How many results to return per page. The default is 25.

  • Must be a number.

created_at_to
Optional

Date formatted like 2016-01-01 12:25:15 -0500

  • Must be a String

created_at_from
Optional

Date formatted like 2016-01-01 12:25:15 -0500

  • Must be a String

fulltext
Optional

Search for any record that matches this text

  • Must be a String

time_zone
Optional

Date ranges will be parsed using this time zone.

columns
Optional
Specify the columns you would like returned by the API for a given resource. Limiting the columns can significantly increase API response time since only the requested data will be processed. columns=uuid,number,created_at

Must be any combination of:

  • id
  • legacy_id
  • type
  • uuid
  • created_at
  • updated_at
  • deleted_at
  • user_updated_at
  • routes_show_path
  • routes_edit_path
  • external_record_id
  • company_id
  • schedule_id
  • target_schedule_id
  • description
  • sortable_order
  • record_token_filter_id
  • record_token_filter_data_count
  • record_token_filter_data
  • Must be a String

root
Optional

Pass root=false to return results without a root node and metadata.
For example:
GET /api/v1/calls?root=false will return [call1, call2, call3]
While:
GET /api/v1/calls will return {calls: [call1, call2, call3], metadata: {}}

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

GET /schedule_distributions/new

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/schedule_distributions/new

Build Distribution with defaults.

Returns a blank Lead Distribution record populated with default attribute values, without saving it.

Params

Param name Description
schedule_id
Optional Blank value allowed

Schedule

target_schedule_id
Optional Blank value allowed

Target Schedule

  • Must be a decimal number.

filter_group_id
Optional Blank value allowed

The lead will be moved to the target schedule when it matches this Filter Group.

name
Optional Blank value allowed

Name

  • Must be a String

description
Optional Blank value allowed

Description

  • Must be a String

token_value_ids
Optional Blank value allowed

Leads matching these tokens will be moved to the target schedule.

record_token_filter_list
Optional Blank value allowed

Assign filters to the object by passing an array of key:value pairs

  • Must be a valid list of filters. Example filters:
    "interest:auto", "loan_amount:>=10000", "loan_amount:<=50000", "geo:!=800", "caller_id:!=anonymous"

POST /schedule_distributions

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/schedule_distributions

Create Distribution.

Creates a Lead Distribution rule that reassigns leads on the given schedule to target_schedule whenever they match filter_group_id. If no description is provided, one is generated from the target schedule's name.

Params

Param name Description
schedule_id
Optional Blank value allowed

Schedule

target_schedule_id
Optional Blank value allowed

Target Schedule

  • Must be a decimal number.

filter_group_id
Optional Blank value allowed

The lead will be moved to the target schedule when it matches this Filter Group.

name
Optional Blank value allowed

Name

  • Must be a String

description
Optional Blank value allowed

Description

  • Must be a String

token_value_ids
Optional Blank value allowed

Leads matching these tokens will be moved to the target schedule.

record_token_filter_list
Optional Blank value allowed

Assign filters to the object by passing an array of key:value pairs

  • Must be a valid list of filters. Example filters:
    "interest:auto", "loan_amount:>=10000", "loan_amount:<=50000", "geo:!=800", "caller_id:!=anonymous"
record_token_filter_id
Optional Blank value allowed

Attach an existing Record Token Filter instead of building one from token_value_ids or record_token_filter_list.

GET /schedule_distributions/:id

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/schedule_distributions/:id

Get Distribution by id.

Fetches a single Lead Distribution rule by id.

PUT /schedule_distributions/:id

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/schedule_distributions/:id

Update Distribution by id.

Updates a Lead Distribution rule's target schedule or description. The source schedule and filter group are set at creation and are not part of this endpoint's editable fields.

Params

Param name Description
schedule_id
Optional Blank value allowed

Schedule

target_schedule_id
Optional Blank value allowed

Target Schedule

  • Must be a decimal number.

filter_group_id
Optional Blank value allowed

The lead will be moved to the target schedule when it matches this Filter Group.

name
Optional Blank value allowed

Name

  • Must be a String

description
Optional Blank value allowed

Description

  • Must be a String

token_value_ids
Optional Blank value allowed

Leads matching these tokens will be moved to the target schedule.

record_token_filter_list
Optional Blank value allowed

Assign filters to the object by passing an array of key:value pairs

  • Must be a valid list of filters. Example filters:
    "interest:auto", "loan_amount:>=10000", "loan_amount:<=50000", "geo:!=800", "caller_id:!=anonymous"

DELETE /schedule_distributions/:id

Authorization Required
https://[your-subdomain].trackdrive.com/api/v1/schedule_distributions/:id

Destroy Distribution by id.

Deletes a Lead Distribution rule by id. Leads on the source schedule will no longer be moved to the target schedule for that filter match.