Filtering by account, team, tag and score
The meetings, calls, emails and WhatsApp lists accept the opaque id of an account or a team. Meetings and
calls also accept a tag and a range of overall evaluation scores. The ids come
from three catalogs, GET /v1/accounts, GET /v1/teams and GET /v1/tags, and
are the same ids that appear inside the records.
Find the id first
Section titled “Find the id first”Accounts can be searched by name or by email domain with q (2 to 100
characters, case-insensitive, matches anywhere in the name or the domain). Teams
and tags are short lists; page through them.
curl -sS -H "Authorization: Bearer $ACCESS_TOKEN" \ "https://api.salesbud.com.br/v1/accounts?q=acme"{ "data": [ { "id": "acc_01JPUBLICAPI", "object": "account", "name": "Acme Ltda", "domain": "acme.com.br", "cnpj": "12.345.678/0001-90" } ], "pagination": { "limit": 50, "has_more": false, "next_cursor": null }, "request_id": "req_01JPUBLICAPI"}The catalogs paginate like every other list (limit up to 100, cursor from
next_cursor; see Pagination) and are open to any
collection read scope: meetings.read, calls.read, emails.read or
whatsapp.read. They return only the company’s own accounts, teams and tags. A user credential sees
only the teams and tags its owner can see; see
Security.
See the account object, the team object
and the tag object.
Some entries are left out on purpose. The account catalog omits accounts with no
usable domain, and the tag catalog omits tags with an empty name. A team with no
name is listed as Unnamed team, a literal value that the API always returns
in English.
Filter a list
Section titled “Filter a list”curl -sS -H "Authorization: Bearer $ACCESS_TOKEN" \ "https://api.salesbud.com.br/v1/meetings?account_id=acc_01JPUBLICAPI&score_min=7"| Filter | /v1/meetings, /v1/calls | /v1/emails, /v1/whatsapp |
|---|---|---|
account_id | yes | yes |
team_id | yes | yes |
tag_id | yes | no |
score_min, score_max | yes | no |
Filters combine with each other and with the other filters of each list; a
record must satisfy all of them. The older filters exist on some lists only: date,
owner, type, audience and transcript filters on meetings and calls, and the
last_message_after and last_message_before dates on emails and WhatsApp.
What each filter means
Section titled “What each filter means”account_idreturns the records linked to that account. A meeting can be linked to more than one account and matches if any of them is the one requested.team_idreturns the records owned by sellers whose default team is the one requested. A seller who belongs to several teams counts once, for their default team, so the meetings, calls and WhatsApp chats of one seller land in at most one team. Sellers with no team, and RD Conversas chats, belong to no team, so adding up the teams can fall short of the unfiltered total. The assignment is the seller’s current one, not the one at the time of the meeting. A team with no members returns an empty page.- On emails, it matches a conversation when any of its threads is in the mailbox of a team member, so a conversation shared across teams can appear under more than one.
- On WhatsApp, it matches only conversations of numbers a team member
connected directly. Conversations that come through RD Conversas have no
owner and are left out whenever
team_idis set.
tag_idreturns the meetings or calls carrying that tag.score_minandscore_maxare integers from 0 to 10, inclusive, compared with the overall evaluation score. Either bound alone works;score_minmust not exceedscore_max. Only completed evaluations count: a record without an evaluation, or whose evaluation is being redone, is left out whenever a bound is given.
Unknown and malformed ids
Section titled “Unknown and malformed ids”- An id that does not match its prefix pattern (
acc_…,team_…,tag_…), a score outside 0 to 10, an empty or non-integer score, or ascore_minabovescore_maxis rejected with400 INVALID_FILTER. - A well-formed id the company does not own returns
200with an emptydataandhas_more: false. The API never confirms whether the id exists elsewhere. - Cursors are bound to the filters they were issued with. Changing any filter,
including these, and reusing an old cursor returns
400 INVALID_CURSOR; start again withoutcursor. Cursors issued before these filters existed stay valid for requests that do not use them.
Account names inside records
Section titled “Account names inside records”Account references in meetings, calls, emails and WhatsApp conversations now
carry name alongside id, domain and cnpj. name is null when the
account has no name yet; use domain as the fallback label.