Service Providers
Service Providers allow third-party companies to handle calls on the platform. This guide explains the concept and how to configure providers.
Concept
In many service scenarios, especially in healthcare and consulting, the professionals who handle calls are not direct employees of the company but rather service providers (doctors, consultants, lawyers, etc.).
The Service Providers feature allows you to:
- Register provider companies with their details (tax ID, contact)
- Associate users (agents) with providers
- Track which calls were handled by providers
- Separate reports by provider
Configuration Flow
1. Create the Provider
Requires manager role.
bash
curl -X POST https://voki.avanter.com.br/api/v1/providers \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter" \
-H "Content-Type: application/json" \
-d '{
"service_provider": {
"name": "Dr. Silva Clinic",
"document": "11.222.333/0001-44",
"email": "contact@silvaClinic.com.br",
"phone": "+5511977776666"
}
}'2. Create a User for the Professional
bash
curl -X POST https://voki.avanter.com.br/api/v1/users \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter" \
-H "Content-Type: application/json" \
-d '{
"user": {
"name": "Dr. Carlos Silva",
"email": "carlos@silvaclinic.com.br",
"password": "temporaryPassword123",
"role": "attendant"
}
}'3. Associate the User with the Provider
bash
curl -X POST https://voki.avanter.com.br/api/v1/providers/{provider_id}/users \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter" \
-H "Content-Type: application/json" \
-d '{
"user_id": "{user_id}"
}'4. Add to a Department
The professional also needs to be in at least one department to receive calls:
bash
curl -X POST https://voki.avanter.com.br/api/v1/departments/{department_id}/users \
-H "Authorization: Bearer eyJhbGci..." \
-H "X-Tenant: avanter" \
-H "Content-Type: application/json" \
-d '{
"user_id": "{user_id}"
}'Complete Example
Company: ABC Hospital (tenant: hospital-abc)
│
├── Department: Cardiology Telemedicine
│ ├── Dr. John (employee) ← Not associated with a provider
│ ├── Dr. Carlos (Silva Clinic) ← Provider: Silva Clinic
│ └── Dr. Maria (Santos Clinic) ← Provider: Santos Clinic
│
├── Provider: Silva Clinic
│ ├── Dr. Carlos
│ └── Dr. Paulo
│
└── Provider: Santos Clinic
└── Dr. MariaPermissions
| Action | Minimum Role |
|---|---|
| List providers | supervisor |
| View provider details | supervisor |
| Create/edit/delete provider | manager |
| Associate/dissociate users | manager |
Related Endpoints
- Providers API - Full CRUD
- Departments API - Add users to departments
- Users API - Create users for professionals
- Analytics - Metrics per agent (including providers)
Best Practices
- Create the provider first before creating associated users
- Use descriptive names to make identification easier in reports
- Keep documents up to date (tax ID) for compliance
- Deactivate users of providers who terminate their contract (instead of deleting)
- Monitor performance of providers via Analytics > Agents
