Yeastar P-Series Custom Helpdesk Integration
🇹🇭 ภาษาไทย
Custom Helpdesk Integration ของ Yeastar P-Series ช่วยให้เชื่อมต่อ P-Series PBX กับระบบ Helpdesk หรือ CRM ใดก็ได้ผ่าน HTTP API โดยใช้ Integration Template แบบ XML ที่กำหนดเอง รองรับตั้งแต่ Zendesk, Zoho Desk ไปจนถึง Helpdesk ที่สร้างเองในองค์กร
ข้อกำหนด: Enterprise Plan (EP) หรือ Ultimate Plan (UP) + Firmware 37.20.0.19 ขึ้นไป
ฟีเจอร์หลัก
| ฟีเจอร์ | คำอธิบาย |
|---|---|
| Contact Synchronization | Sync contact จาก Helpdesk มายัง PBX Phonebook อัตโนมัติ เมื่อมีสายเข้า/ออก |
| Contact Creation | สร้าง contact ใหม่ใน Helpdesk อัตโนมัติหรือ manual เมื่อหมายเลขไม่ตรงกับ contact ที่มีอยู่ |
| Call Popup | เปิดหน้า contact ใน Helpdesk อัตโนมัติ (Linkus Web/Desktop) เมื่อมีสายเข้า/รับสาย/วางสาย |
| Call Journal | บันทึก log สายทุกสาย (เข้า/ออก/ไม่รับ) เข้า Helpdesk อัตโนมัติ |
| Auto Ticket Creation | สร้าง ticket อัตโนมัติเมื่อมีสายจาก/ไป Helpdesk contact |
Authentication Methods
| วิธี | คำอธิบาย |
|---|---|
| None | ไม่ต้อง authenticate (ใช้ API Key หรือ Webhook URL แบบ static) |
| Basic | Username/Password หรือ API Key แบบ Base64-encoded ใน HTTP header |
| OAuth2 | Token-based; ดึง access token จาก Helpdesk ก่อน แล้วใช้กับทุก request |
| Bearer Token | ส่ง Authorization: Bearer {token} ใน header ทุก request |
การ Setup (ขั้นตอนหลัก)
1. สร้าง/อัปโหลด Integration Template
PBX Web Portal → Integrations > Helpdesk → Template Management
- สร้างใหม่: กรอก template settings ผ่าน UI
- อัปโหลด: อัปโหลดไฟล์ XML template (max 10 templates, file < 1 MB)
- ดาวน์โหลด: download template ที่มีอยู่เพื่อแก้ไข manually
2. ตั้งค่า Integration
Integrations > Helpdesk → คลิก Helpdesk ที่ต้องการ
- กรอก authentication ตามประเภทที่เลือก
- Associate Helpdesk users กับ PBX extensions (อัตโนมัติถ้า email ตรงกัน)
- ตั้งค่า features ที่ต้องการ (Contact Sync, Contact Creation, Call Popup, Call Journal, Auto Ticket)
Contact Synchronization
- เปิดใช้ที่: Synchronize Contacts Automatically → เลือก contact type (Contacts/Leads/Accounts)
- เลือก Synchronize to Phonebook (ต้องเป็น phonebook เปล่าเท่านั้น)
- Always Query Helpdesk: เปิด = query real-time; ปิด = query เฉพาะเมื่อไม่พบใน PBX company contacts
- Synchronized contacts เป็น read-only ใน PBX
Call Popup (Per Extension)
Extension and Trunk > Extension → แก้ไข Extension → Linkus Clients tab
→ เปิด "Open Contact URL Using System-Integrated Helpdesk"
Popup Method:
- Automatically (Only for Incoming Calls): เปิดอัตโนมัติตาม Trigger Event
- Ringing — เปิดเมื่อสายดัง
- Answered — เปิดเมื่อรับสาย
- Call End — เปิดเมื่อวางสาย
- Manually: user เปิดเองระหว่างสายจาก call window
Auto Ticket Creation
| เวลาสร้าง | รายละเอียด |
|---|---|
| Before the Call | สร้าง ticket เมื่อสายดัง (Inbound/Outbound กับ Helpdesk contact) |
| After the Call | สร้าง ticket เมื่อวางสาย; รองรับ: Inbound Answered, Inbound No Answer, Outbound Answered, Outbound No Answer |
หมายเหตุ: หากสร้างก่อนสาย ข้อมูลบางอย่างอาจขาดหาย ต้องแก้ไข template เพื่อ update ข้อมูลภายหลัง
XML Integration Template
Template ใช้ XML 1.1 standard + Go text/template syntax สำหรับ variables
โครงสร้างหลัก
<Information>
<Scenarios>
<Scenario Id="AuthMethod" Type="AUTH">
<Parameters>...</Parameters>
<Requests>...</Requests>
</Scenario>
<Scenario Id="UserAssociation" Type="REST">...</Scenario>
<Scenario Id="SyncContactAuto" Type="REST">...</Scenario>
<Scenario Id="CreateNewContact" Type="REST">...</Scenario>
<Scenario Id="CreateNewTicket" Type="REST">...</Scenario>
<Scenario Id="CallJournal" Type="REST">...</Scenario>
</Scenarios>
</Information>Scenarios ที่รองรับ
| Scenario Id | ใช้สำหรับ |
|---|---|
AuthMethod | Authentication กับ Helpdesk |
UserAssociation | ดึงรายชื่อ users จาก Helpdesk |
SyncContactAuto | ค้นหาและ sync contacts |
CreateNewContact | สร้าง contact ใหม่ |
CreateNewTicket | สร้าง ticket อัตโนมัติ |
CallJournal | บันทึก call log |
Template Functions
| Function | รูปแบบ | ตัวอย่าง |
|---|---|---|
TimeFormat | {{ TimeFormat .Var "format" "utc" }} | {{ TimeFormat .StartTimeUnix "yyyy-MM-ddTHH:mm:ss.000Zz" "1" }} → 2023-01-01T00:59:59.000Z |
ToMillis | {{ ToMillis .Var }} | {{ ToMillis .StartTimeUnix }} → Unix ms |
Capitalize | {{ Capitalize .Var }} | {{ Capitalize .varname }} → Hello world |
UrlEncode | {{ UrlEncode .Var }} | {{ UrlEncode .variable }} → hello%20world%21 |
Variables ที่ใช้บ่อย
| Variable | คำอธิบาย |
|---|---|
{{.Call_From}} | หมายเลขผู้โทร |
{{.Call_To}} | หมายเลขปลายทาง |
{{.Call_Log_Status}} | สถานะสาย |
{{.Talk_Duration}} | ระยะเวลาสนทนา |
{{.Time}} | เวลา (formatted) |
{{.StartTimeUnix}} | Unix timestamp เริ่มต้น |
{{.RecordPath}} | path ของไฟล์บันทึกเสียง |
{{.ContactId}} | Contact ID จาก Helpdesk |
{{.ContactNumber}} | หมายเลขโทรศัพท์ของ contact |
{{.Description}} | คำอธิบาย |
{{.Subject}} | หัวข้อ ticket/log |
{{.Communication_Type}} | ประเภทการสื่อสาร |
{{.Call_Status}} | สถานะสาย (สำหรับ ticket) |
{{.CustomValue}} | custom variable สำหรับสร้าง Contact URL |
ตัวอย่าง Request Bodies
Call Journal:
{
"data": [{
"{{.Owner}}{{.WhoModule}}": {
"Description": "{{.Description}}",
"Voice_Recording__s": "{{.RecordPath}}",
"Call_Start_Time": "{{TimeFormat .StartTimeUnix 'yyyy-MM-ddTHH:mm:ss-z' '1'}}",
"Subject": "{{.Subject}}",
"Call_Type": "Inbound",
"Call_Result": "{{.Call_Log_Status}}",
"Call_Duration": "{{.Talk_Duration_Sec}}"
}
}]
}New Ticket:
{
"subject": "{{.Subject}}",
"contactId": "{{.ContactId}}",
"phone": "{{.ContactNumber}}",
"description": "{{.Description}}"
}ความเชื่อมโยง
- Yeastar P-Series — PBX platform หลัก
- Yeastar P-Series Features — ภาพรวม integration capabilities
- Yeastar P-Series CRM Integration — CRM integrations สำเร็จรูป (Dynamics/Google/Odoo)
- Odoo Yeastar CRM Integration — การ integrate กับ Odoo CRM โดยเฉพาะ
🇬🇧 English
Custom Helpdesk Integration for Yeastar P-Series allows the PBX to connect with any third-party Helpdesk or CRM system via HTTP API using custom XML integration templates. Pre-built templates are available for Zendesk and Zoho Desk; any system with an HTTP API can be integrated via the custom template approach.
Requirements: Enterprise Plan (EP) or Ultimate Plan (UP) + Firmware 37.20.0.19 or later
Key Features
| Feature | Description |
|---|---|
| Contact Synchronization | Auto-sync Helpdesk contacts to PBX phonebook on inbound/outbound calls |
| Contact Creation | Create new Helpdesk contacts automatically or manually when caller is unknown |
| Call Popup | Auto-open contact URL in Linkus Web/Desktop (Ringing / Answered / Call End) |
| Call Journal | Auto-log all calls (inbound/outbound/missed) to Helpdesk |
| Auto Ticket Creation | Create tickets automatically before or after calls with Helpdesk contacts |
Authentication Methods
| Method | Description |
|---|---|
| None | No auth required; provide API key or webhook URL as static value |
| Basic | Username/password or API key, Base64-encoded in HTTP Authorization header |
| OAuth2 | Token-based; PBX requests access token from Helpdesk before API calls |
| Bearer Token | Authorization: Bearer {token} sent in every HTTP request |
Setup Flow
- Add template:
Integrations > Helpdesk → Template Management— create new, upload XML, or download existing - Configure integration: Click the Helpdesk entry → complete authentication
- Associate users: Map Helpdesk users to PBX extensions (auto-match by email or manually)
- Enable features: Contact Sync, Contact Creation, Call Popup (per extension), Call Journal, Auto Ticket
Call Popup Trigger Events
Configured per extension under Extension and Trunk > Extension → Linkus Clients:
| Trigger | When |
|---|---|
| Ringing | When an inbound call rings |
| Answered | When the inbound call is answered |
| Call End | When the call ends |
| Manually | User clicks contact URL during a call |
Auto Ticket Creation Timing
| Timing | Description |
|---|---|
| Before the Call | Ticket created when phone rings or call is placed (may have incomplete data) |
| After the Call | Ticket created on hang-up; options: Inbound Answered, Inbound No Answer, Outbound Answered, Outbound No Answer |
XML Template Structure
Templates follow XML 1.1 + Go text/template syntax. Variable syntax: {{.varname}}. Conditional: {{ if .var }} ... {{ else }} ... {{ end }}.
Main Elements:
| Element | Role |
|---|---|
<Information> | Root element; template metadata and attributes |
<Scenarios> | Collection of functional scenarios |
<Parameters> | Configuration values for scenarios/requests |
<Requests> | HTTP request definitions |
<Outputs> | Data to extract from API responses (GJSON path syntax) |
Template Functions:
| Function | Purpose | Example |
|---|---|---|
TimeFormat | Format Unix timestamp | {{ TimeFormat .StartTimeUnix "yyyy-MM-ddTHH:mm:ss.000Zz" "1" }} |
ToMillis | Seconds → milliseconds | {{ ToMillis .StartTimeUnix }} |
Capitalize | Capitalize first letter | {{ Capitalize .ContactSyncType }} |
UrlEncode | URL-encode a string | {{ UrlEncode .variable }} |
Related Pages
- Yeastar P-Series — Parent PBX platform
- Yeastar P-Series Features — Integration capabilities overview
- Yeastar P-Series CRM Integration — Pre-built CRM integrations (Dynamics 365, Google, Odoo)
- Odoo Yeastar CRM Integration — Odoo CRM integration specifics