नेविगेशन पर जाएँ

प्रोविज़निंग और ऑनबोर्डिंग

ग्राहक वर्कस्पेस बनाने और रिसेप्शनिस्ट को जरूरी जानकारी देने के उदाहरण।

ये उदाहरण क्विकस्टार्ट पर आधारित हैं। इनमें वही Bright Smile Dental ग्राहक इस्तेमाल किया गया है और हर वर्कस्पेस कॉल अपनी ID को xi-workspace-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",
)