Teams
A team is a way to manage the sharing of resources amongst multiple users. Team members have abilities such as sharing contact information, assigning tasks to each other, and may also receive lead offers. Any user with an active LionDesk subscription can be part of a team.
Each team has a set of rules regarding how lead offers are distributed amongst team members.
order_method
- equal toRank
orTime
mins_until_next_alert
- Only relevant iforder_method
is equal toRank
. Number of minutes until an unclaimed lead is offered to another team member.distribution_zipcodes
- Zipcodes assigned to the team. Only relevant when team selection method for lead offer distribution is set to Zipcode.
The following fields relate to the Teams endpoint.
Field | Limits | Required? | Writeable? |
---|---|---|---|
id | No | No | |
Unique ID of the team | |||
name | Yes | Yes | |
The name of the team | |||
is_contact_resource_sharing_enabled | No | Yes | |
Whether or not team members can view each other's contacts, calendars, assign each other tasks, etc | |||
order_method | No | Yes | |
The ordering method by which team members will receive lead offer alerts. Defaults to "Rank" Possible values: | |||
mins_until_next_alert | No | Yes | |
The number of minutes until the next team member will receive a lead offer. Only application if order_method = Rank and the lead is unclaimed. | |||
distribution_zipcodes | No | Yes | |
Any zipcodes assigned to the team. May be used as a team selection method for lead offer distribution |
Permissions
A user can retrieve teams that they have created and teams that they are a member of.
Only the user that created the team can change the settings for their team.
Notes for Submitting & Updating Records
- If the value of
order_method
equals:- Rank: the
timing
fields for all associated team member distribution options will be automatically set to0
- Time: the
mins_until_next_alert
field will be automatically set to0
.
- Rank: the
Submit one Team
To submit one team:
POST https://api-v2.liondesk.com//teams
headers: {
Authorization: "Bearer [access token]",
Content-Type: "application/json"
}
The request object should have this form:{
"name": "Blizzard",
"is_contact_resource_sharing_enabled": true,
"order_method": "Rank",
"mins_until_next_alert": 5,
"distribution_zipcodes": "92618"
}
Update one Team
To update some attributes on one team:
PATCH https://api-v2.liondesk.com//teams/10
headers: {
Authorization: "Bearer [access token]",
Content-Type: "application/json"
}
data: { name: "Blizzard", is_contact_resource_sharing_enabled: "true"}
Get One Team
To get one team:
GET https://api-v2.liondesk.com//teams/1
headers: {
Authorization: "Bearer [access token]",
Content-Type: "application/json"
}
The response object will have this form:{
"id": 3,
"name": "Blizzard",
"is_contact_resource_sharing_enabled": true,
"order_method": "Rank",
"mins_until_next_alert": 5,
"distribution_zipcodes": "92618"
}
Find All Teams
You find/search teams by issuing a GET
request to the base endpoint:
GET https://api-v2.liondesk.com//teams
headers: {
Authorization: "Bearer [access token]",
Content-Type: "application/json"
}
The response will contain an array of team objects, like so:
{
"total": 2,
"limit": 10,
"skip": 0,
"data": [
{
"id": 3,
"name": "Blizzard",
"is_contact_resource_sharing_enabled": true,
"order_method": "Rank",
"mins_until_next_alert": 5,
"distribution_zipcodes": "92618"
},
{
"id": 9,
"name": "Apple",
"is_contact_resource_sharing_enabled": false,
"order_method": "Time",
"mins_until_next_alert": 0,
"distribution_zipcodes": "95014,94304"
}
]
}
Filtering Teams
The following filtering operators may be mixed and matched as desired.
Equality
You may query team fields directly by specifying equality parameters in the request URI:GET /teams?order_method=Rank&is_contact_resource_sharing_enabled=true
You may wish to exclude results having some value with $ne:GET /teams?is_contact_resource_sharing_enabled[$ne]=false
Limiting and Pagination
$limit will return only the number of results you specify: GET /teams?$limit=2
$skip will skip the specified number of results, useful for paginating:GET /teams?is_contact_resource_sharing_enabled=false&$limit=2&$skip=2
Sorting
$sort will order results based on the field given.
Use 1 for ascending order, and -1 for descending order:GET /teams?$limit=10&$sort[mins_until_next_alert]=-1
Inclusion / Exclusion
Find all records where the property values are ($in) some set:GET /teams?distribution_zipcodes[$in]=92618
If the column matches any of the given values, the resource shall be returned.
Similarly, you may exclude certain values with ($nin):GET /teams?distribution_zipcodes[$nin]=92618
Comparisons
You may use the less-than $lt and less-than-or-equal $lte operators to filter your queries: GET /teams?mins_until_next_alert[$lt]=5
Similarly, you may use greater-than $gt and greater-than-or-equal $gte operators to filter your queries: GET /teams?mins_until_next_alert[$gte]=10
You may also combine these operators to query for a range of values: GET /teams?mins_until_next_alert[$gte]=6&mins_until_next_alert[$lte]=30
Partial String Matching
Find all records where the property values includes the value you are searching for ($like):
GET /teams?distribution_zipcodes[$like]=%92618%
It may be necessary to escape the percent sign (%) characters to ensure proper encoding:
GET /teams?distribution_zipcodes[$like]=%2592618%25
Remove
Note: removing a team will also remove all associated team member distribution optionsTeams can be removed with a delete request.
DELETE https://api-v2.liondesk.com//teams/257
headers: {
Authorization: "Bearer [access token]",
Content-Type: "application/json"
}