แชร์ผ่าน


ดาวน์โหลดการถอดเสียง Dynamics 365 Contact Center จํานวนมาก

การถอดเสียง Dynamics 365 Contact Center จะถูกเก็บไว้ในรูปแบบที่เข้ารหัส base64 ในตารางคําอธิบายประกอบใน Microsoft Dataverse สิ่งที่แนบมาจะถูกเก็บไว้เป็นระเบียนแยกต่างหากในตารางคําอธิบายประกอบ ถ้าการสนทนามีสองไฟล์ที่แลกเปลี่ยนระหว่างตัวแทนและลูกค้า จะมีการสร้างเรกคอร์ดทั้งหมดสามเรกคอร์ดที่เกี่ยวข้องกับการสนทนานี้ การสนทนาใดๆ จะมีระเบียน n+1 ที่เก็บไว้ในตารางคําอธิบายประกอบเสมอ โดยที่ n คือจํานวนสิ่งที่แนบมาในการสนทนา ไฟล์แนบยังเข้ารหัส base64 ก่อนบันทึก

ตัวเลือกในการดาวน์โหลดการถอดเสียงจํานวนมากไม่สามารถใช้งานได้ทันที คุณสามารถใช้คําขอ Web API ต่อไปนี้เพื่อดึงข้อมูลการถอดเสียงและไฟล์แนบทั้งหมดที่แลกเปลี่ยนในช่วงหนึ่งเดือนที่ผ่านมา

คําขอ Web API ต่อไปนี้จะดึงข้อมูลการถอดเสียงที่เป็นข้อความทั้งหมด:

GET [Organization URI]/api/data/v9.1/annotations?$filter=objecttypecode eq 'msdyn_transcript'
Accept: application/json  
OData-MaxVersion: 4.0  
OData-Version: 4.0  

คําขอ Web API ต่อไปนี้จะดึงคําอธิบายประกอบไฟล์แนบทั้งหมด:

GET [Organization URI]/api/data/v9.1/annotations?$filter=objecttypecode eq 'msdyn_ocliveworkitem'
Accept: application/json  
OData-MaxVersion: 4.0  
OData-Version: 4.0  

documentBodyแอตทริบิวต์ในการตอบกลับที่ได้รับจากคําขอ API บนเว็บแต่ละรายการประกอบด้วยการถอดเสียงหรือไฟล์แนบที่เข้ารหัส base64

คุณสามารถเรียก API โดยใช้โค้ด C# แล้วทําซ้ําแต่ละระเบียนที่ส่งคืน เข้าถึงแอ documentBody ตทริบิวต์ และประมวลผลเพื่อรับการถอดเสียงทั้งหมด

จําเป็นต้องมีข้อความที่ลูกค้าส่งอย่างน้อยหนึ่งข้อความเพื่อสร้างการถอดเสียง

โครงสร้างของการถอดเสียง JSON

ข้อความถอดเสียงที่คุณเห็นในลิงก์อาจมีข้อความประเภทต่างๆ ดังนี้

  • ข้อความควบคุม
  • ข้อความของระบบ
  • ข้อความ (เช่น สวัสดี สวัสดี และเป็นอย่างไรบ้าง)
  • ข้อมูลเมตาของไฟล์แนบ

ในข้อความแต่ละชนิดเหล่านี้ คุณจะเห็น createdDateTime ฟิลด์ที่แสดงเวลาที่แน่นอนที่มีการโพสต์หรือสร้างข้อความนี้

ข้อความควบคุมไม่มีคุณค่าทางภาพและบ่งชี้เหตุการณ์ เช่น ตัวแทนเข้าร่วมหรือออกจากการสนทนา โดยปกติจะมีธงที่เรียกว่าisControlMessageตั้งค่าเป็นtrue

{
    "content": "<addmember><eventtime>1589863236124</eventtime><initiator>28:bc81db89-c4d7-4763-91fe-086fcc2e6daf</initiator><rosterVersion>1589863235629</rosterVersion><lastRosterVersion>1589801089959</lastRosterVersion><target>8:orgid:04fd615d-586d-4866-9791-b24c5f7a9e78</target></addmember>",
    "contentType": "text",
    "createdDateTime": "2020-05-19T04:40:36.124+00:00",
    "likes": [],
    "attachments": [],
    "id": "1589863236124",
    "created": "2020-05-19T04:40:36.124Z",
    "culture": null,
    "deleted": null,
    "important": null,
    "modified": null,
    "modifiedDateTime": null,
    "isControlMessage": true,
    "from": null
},

ข้อความระบบเป็นข้อความชนิดพิเศษที่แสดงต่อลูกค้าเกี่ยวกับเหตุการณ์ระหว่างการสนทนา ตัวอย่างเช่น เมื่อตัวแทนเข้าร่วม เมื่อตัวแทนยกเลิกการเชื่อมต่อ และเมื่อตัวแทนใหม่เข้าร่วม

{
	"content": "Alan Steiner has left the conversation.",
	"contentType": "text",
	"createdDateTime": "2020-05-19T04:43:12.976+00:00",
	"from": {
		"application": {
			"displayName": "DynamicsBot",
			"id": "bc81db89-c4d7-4763-91fe-086fcc2e6daf"
		},
		"user": null,
		"phone": null,
		"guest": null,
		"encrypted": null,
		"onPremises": null,
		"azureApplicationInstance": null,
		"applicationInstance": null,
		"device": null
	},
	"likes": [],
	"attachments": [],
	"id": "1589863392976",
	"created": "2020-05-19T04:43:12.976Z",
	"culture": null,
	"deleted": null,
	"important": null,
	"modified": null,
	"modifiedDateTime": null,
	"tags": "system"
},

ข้อความที่แลกเปลี่ยนระหว่างการแชทระหว่างตัวแทนและลูกค้าจะปรากฏดังนี้:

{
	"content": "I am using product A",
	"contentType": "text",
	"createdDateTime": "2020-05-19T04:43:03.979+00:00",
	"from": {
		"user": {
			"displayName": "Customer",
			"id": "04fd615d-586d-4866-9791-b24c5f7a9e78"
		},
		"phone": null,
		"guest": null,
		"encrypted": null,
		"onPremises": null,
		"azureApplicationInstance": null,
		"applicationInstance": null,
		"application": null,
		"device": null
	},
	"likes": [],
	"attachments": [],
	"id": "1589863384036",
	"created": "2020-05-19T04:43:03.979Z",
	"culture": null,
	"deleted": null,
	"important": null,
	"modified": null,
	"modifiedDateTime": null,
	"tags": "private,parentID-5493180821148088016",
	"deliveryMode": "unbridged"
},

ดังที่เห็นในรหัสก่อนหน้านี้ ข้อความที่ส่งโดยลูกค้าจะมีชื่อที่แสดงเป็น "ลูกค้า" หากพวกเขาเป็นลูกค้าที่ไม่ระบุชื่อ หรือชื่อจริงของพวกเขาหากรู้จักกับ Dynamics 365 Contact Center

สําหรับข้อความที่เจ้าหน้าที่ส่งถึงลูกค้า จะมีแท็กที่แสดงว่าเป็นข้อความ "สาธารณะ" ข้อความที่มีเครื่องหมาย "ส่วนตัว" ในแท็กคือข้อความที่แลกเปลี่ยนระหว่างเจ้าหน้าที่สองคนและลูกค้าจะไม่เห็น

{
	"content": "Great! Just give me a moment. \\nWhich product are you using currently?",
	"contentType": "text",
	"createdDateTime": "2020-05-19T04:42:44.202+00:00",
	"from": {
		"user": {
			"displayName": "Alan Steiner",
			"id": "04fd615d-586d-4866-9791-b24c5f7a9e78"
		},
		"phone": null,
		"guest": null,
		"encrypted": null,
		"onPremises": null,
		"azureApplicationInstance": null,
		"applicationInstance": null,
		"application": null,
		"device": null
	},
	"likes": [],
	"attachments": [],
	"id": "1589863364220",
	"created": "2020-05-19T04:42:44.202Z",
	"culture": null,
	"deleted": null,
	"important": null,
	"modified": null,
	"modifiedDateTime": null,
	"tags": "public,messageId-1589863364202,RTT-C1",
	"deliveryMode": "unbridged"
},

ข้อความมีลักษณะ FileAttachment เหมือนข้อมูลโค้ดต่อไปนี้ใน JSON:

{
    "content": "",
    "contentType": "text",
    "createdDateTime": "2020-05-06T21:31:37.316+00:00",
    "from": {
      "application": {
        "displayName": "Customer",
        "id": "6cc05310-05d9-4ce5-8fc0-d606c478f896"
      },
      "user": null,
      "phone": null,
      "guest": null,
      "encrypted": null,
      "onPremises": null,
      "azureApplicationInstance": null,
      "applicationInstance": null,
      "device": null
    },
    "likes": [
    ],
    "attachments": [
      {
        "id": "0-wus-d3-37f4fa3cd63945c526799ae5b4e009f5",
        "index": 0,
        "fileType": "docx",
        "name": "mr Hand goes to the moon, By contoso.docx",
        "sourceUrl": "https://us-api.asm.contoso.com/v1/objects/0-wus-d3-37f4fa3cd63945c526799ae5b4e009f5/",
        "annotationid": "cfb551a8-ef4f-431a-871f-9b027ff940e3"
      }
    ],
    "id": "1588800697316",
    "created": "2020-05-06T21:31:37.316Z",
    "culture": null,
    "deleted": null,
    "important": null,
    "modified": null,
    "modifiedDateTime": null,
    "deliveryMode": "bridged"
  },

โดยปกติจะมีข้อมูลเมตาที่เกี่ยวข้องกับไฟล์แนบที่แลกเปลี่ยนระหว่างการแชท เป็น annotationid กุญแจสําคัญของระเบียนที่เข้ารหัส base64 ในตารางคําอธิบายประกอบสําหรับไฟล์ที่แนบมานั้น คุณสามารถเรียกข้อมูลเรกคอร์ดได้โดยใช้คําขอ Web API ต่อไปนี้ คําขอ Web API จะให้ไฟล์แนบที่เข้ารหัส base64 ซึ่งคุณสามารถถอดรหัสและใช้ได้ตามที่คุณต้องการ

GET [Organization URI]/api/data/v9.1/annotations(<annotationid>)
Accept: application/json  
OData-MaxVersion: 4.0  
OData-Version: 4.0  

Dynamics 365 Contact Center สําหรับนักพัฒนา