탐색으로 건너뛰기

프로비저닝 및 온보딩

고객 워크스페이스를 만들고 리셉셔니스트가 알아야 할 정보를 채우는 예시입니다.

이 예시는 빠른 시작을 기반으로 합니다. 동일한 Bright Smile Dental 고객을 사용하며, 모든 워크스페이스 호출에는 xi-workspace-id로 해당 ID가 포함됩니다.

워크스페이스 프로비저닝

한 번의 요청으로 프로비저닝

아직 비즈니스 세부 정보가 없다면, 한 번의 호출로 워크스페이스를 만들고, 구독을 설정하고, 소유자를 초대하고, 온보딩을 완료할 수 있습니다. 리셉셔니스트는 비즈니스 이름만으로 생성되므로 이후에 비즈니스 프로필을 작성하세요. 시간 초과 후 재시도해도 두 번째 워크스페이스가 생성되지 않도록 idempotency_key를 전달하세요.

from elevenlabs import ElevenLabs, ProvisionResellerWorkspaceSubscription, TeamInviteRequest
elevenlabs = ElevenLabs()
workspace = elevenlabs.reception.workspaces.create(
business_name="Bright Smile Dental",
subscription=ProvisionResellerWorkspaceSubscription(
tier_id="smbtier_4401k8r2c6hxe9tq3vz7m5wd1nb0",
),
members=[
TeamInviteRequest(email="owner@brightsmiledental.com", role="workspace_admin"),
TeamInviteRequest(email="frontdesk@brightsmiledental.com"),
],
complete_onboarding=True,
idempotency_key="provision-crm-10482",
)
for result in workspace.member_results:
if result.outcome == "failed":
print("Invite failed:", result.email, result.error_status)
if workspace.onboarding_completed_at_unix is None:
elevenlabs.reception.workspaces.complete_onboarding(workspace.workspace_id)

생성 시 온보딩은 최선의 노력으로 처리됩니다. 실패하면 onboarding_completed_at_unix는 null이며, complete_onboarding으로 재시도할 수 있습니다.

CRM에서 고객 프로비저닝

각 idempotency_key를 자체 고객 ID에서 파생하세요. 그러면 가져오기를 다시 실행해도 새 워크스페이스를 만드는 대신 기존에 생성한 워크스페이스가 반환됩니다. 다른 본문에 같은 키를 사용하면 idempotency_key_reused와 함께 거부됩니다.

customers = [
{"crm_id": "10482", "name": "Bright Smile Dental", "owner": "owner@brightsmiledental.com"},
{"crm_id": "10483", "name": "Harbor Physio", "owner": "hello@harborphysio.com"},
]
workspace_ids = {}
for customer in customers:
workspace = elevenlabs.reception.workspaces.create(
business_name=customer["name"],
subscription=ProvisionResellerWorkspaceSubscription(
tier_id="smbtier_4401k8r2c6hxe9tq3vz7m5wd1nb0",
),
members=[TeamInviteRequest(email=customer["owner"], role="workspace_admin")],
idempotency_key=f"provision-crm-{customer['crm_id']}",
)
workspace_ids[customer["crm_id"]] = workspace.workspace_id

아직 설정 중인 워크스페이스의 온보딩 완료

workspaces.list에서 온보딩을 완료하지 않은 워크스페이스를 확인할 수 있습니다. complete_onboarding은 안전하게 재시도할 수 있으므로 정기적으로 실행할 수 있습니다.

cursor = None
while True:
page = elevenlabs.reception.workspaces.list(cursor=cursor, page_size=100)
for workspace in page.workspaces:
if workspace.onboarding_completed_at_unix is None:
elevenlabs.reception.workspaces.complete_onboarding(workspace.workspace_id)
if not page.has_more:
break
cursor = page.next_cursor

비즈니스 설명

온보딩을 완료하기 전에 비즈니스의 위치, 직원, 서비스 및 휴무일을 추가하면 리셉셔니스트가 이를 기반으로 생성됩니다. 이후에도 언제든 추가하거나 변경할 수 있습니다.

온보딩이 완료되기 전에는 비즈니스 소유자가 로그인할 때 표시되는 설정 마법사가 이 데이터를 대체하거나 삭제할 수 있습니다. 소유자가 로그인하기 전에 온보딩을 완료하세요.

위치 추가

각 위치에는 자체 운영 시간이 있습니다. 요일은 0(월요일)부터 6(일요일)까지이며, 항목이 없는 날은 휴무입니다.

from elevenlabs import TimeRangeModel, WorkingHours
workspace_id = "8f1c2a7e4b9d4e6fa3c5b2d1e0f9a8b7"
weekday = [TimeRangeModel(start_hour=8, start_minute=0, end_hour=17, end_minute=0)]
saturday = [TimeRangeModel(start_hour=9, start_minute=0, end_hour=13, end_minute=0)]
location = elevenlabs.reception.locations.create(
xi_workspace_id=workspace_id,
name="Mission Street",
address="2140 Mission St, San Francisco, CA 94110",
notes="Free parking behind the building.",
operating_hours=WorkingHours(hours={**{str(day): weekday for day in range(5)}, "5": saturday}),
)

직원 추가

위치에 소속된 직원은 자체 working_hours를 지정하지 않는 한 해당 위치의 운영 시간을 따릅니다. customer_facing_name은 발신자가 듣는 이름이고, name은 내부 레이블로 유지됩니다.

hygienist = elevenlabs.reception.staff.create(
xi_workspace_id=workspace_id,
name="Maria Lopez (hygienist)",
customer_facing_name="Maria",
description="Dental hygienist. Speaks English and Spanish.",
email="maria@brightsmiledental.com",
location_id=location.id,
working_hours=WorkingHours(
hours={str(day): [TimeRangeModel(start_hour=9, start_minute=0, end_hour=15, end_minute=0)] for day in range(4)},
),
)

서비스 추가

서비스에는 하나 이상의 variants가 있으며, 각각 자체 시간과 가격을 가집니다. 첫 번째 항목이 기본값입니다. 서비스를 제공할 수 있는 직원을 제한하려면 any_staff_member를 false로 설정하세요.

작업에 따라 가격이 달라지는 경우 pricing_mode="quote"를 사용하고 intake_questions를 추가하세요. 리셉셔니스트는 가격을 안내하는 대신 질문을 하고 견적 요청을 접수합니다.

from elevenlabs import ReceptionIntakeQuestion, ReceptionServiceVariant
elevenlabs.reception.services.create(
xi_workspace_id=workspace_id,
name="Cleaning",
description="Routine cleaning and polish.",
variants=[
ReceptionServiceVariant(duration_minutes=45, price=120),
ReceptionServiceVariant(duration_minutes=60, price=160),
],
any_staff_member=False,
staff_ids=[hygienist.id],
buffer_minutes=10,
)
elevenlabs.reception.services.create(
xi_workspace_id=workspace_id,
name="Invisalign consultation",
pricing_mode="quote",
variants=[ReceptionServiceVariant(duration_minutes=30)],
intake_questions=[
ReceptionIntakeQuestion(label="Have you worn braces or aligners before?", kind="choice", options=["Yes", "No"]),
ReceptionIntakeQuestion(label="What would you like to fix?", required=True),
],
)

휴일 휴무 설정

휴무는 start_date부터 end_date까지 하루 전체에 적용됩니다. 비즈니스 전체에는 time_off_type="location"을 사용하고, 한 사람의 휴무에는 resource_id에 해당 직원 ID와 함께 "staff"를 사용하세요.

from elevenlabs import DateModel
elevenlabs.reception.holidays.create(
xi_workspace_id=workspace_id,
name="Winter break",
start_date=DateModel(year=2026, month=12, day=24),
end_date=DateModel(year=2026, month=12, day=26),
time_off_type="location",
location_id=location.id,
)

문서 업로드

FAQ나 가격표처럼 리셉셔니스트가 답변에 활용할 문서를 제공하세요. 빠른 시작과 같이 웹사이트에는 knowledge_sources.add_url을 사용하세요.

with open("new-patient-faq.pdf", "rb") as file:
elevenlabs.reception.knowledge_sources.upload(xi_workspace_id=workspace_id, file=file)

리셉셔니스트 설정

이 호출에는 리셉셔니스트 ID가 필요합니다. complete_onboarding의 customer_facing_agent_id 또는 receptionists.list의 agent_id를 사용하세요.

인사말, 언어 및 수집할 정보 설정

전송한 설정만 변경됩니다.

from elevenlabs import ReceptionCustomerFacingConfigPatch
receptionist_id = elevenlabs.reception.receptionists.list(xi_workspace_id=workspace_id)[0].agent_id
elevenlabs.reception.receptionists.update(
receptionist_id,
xi_workspace_id=workspace_id,
config=ReceptionCustomerFacingConfigPatch(
first_message="Thanks for calling Bright Smile Dental, how can I help?",
additional_languages=["es"],
tone_traits=["warm", "concise"],
details_to_collect=["full name", "date of birth", "insurance provider"],
additional_instructions="Never give medical advice. Offer the next available appointment instead.",
),
)

통화 전환 및 규칙 추가

전환 규칙은 condition이 충족되면 통화를 담당자에게 연결합니다. 통화 전환은 요금제에 따라 달라지므로 먼저 리셉셔니스트의 is_transfer_allowed를 확인하세요. 규칙은 리셉셔니스트의 동작 방식을 알려 줍니다. strict 규칙은 항상 따르며, suggestion은 가이드라인입니다.

elevenlabs.reception.receptionists.transfer_rules.create(
receptionist_id,
xi_workspace_id=workspace_id,
label="Front desk",
phone_number="+14155550142",
condition="The caller has a dental emergency or asks to speak to a person.",
)
elevenlabs.reception.receptionists.rules.create(
receptionist_id,
xi_workspace_id=workspace_id,
title="New patients",
description="Ask new patients to arrive 15 minutes early to fill in forms.",
)

팀 초대

워크스페이스가 생성된 후에는 언제든 사람을 초대할 수 있습니다. 대기 중인 초대도 시트를 차지하므로 멤버와 초대 수가 요금제의 팀 규모에 도달하면 초대가 거부됩니다.

elevenlabs.reception.team.invites.create(
xi_workspace_id=workspace_id,
email="office.manager@brightsmiledental.com",
role="workspace_admin",
)