Skip to content

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. Maria

Permissions

ActionMinimum Role
List providerssupervisor
View provider detailssupervisor
Create/edit/delete providermanager
Associate/dissociate usersmanager

Best Practices

  1. Create the provider first before creating associated users
  2. Use descriptive names to make identification easier in reports
  3. Keep documents up to date (tax ID) for compliance
  4. Deactivate users of providers who terminate their contract (instead of deleting)
  5. Monitor performance of providers via Analytics > Agents

Documentação da API Voki v4.0