Assign Conversation ID Snippet

这个 Snippet 代码可为每一次联系生成一个唯一的聊天 ID。例如,如果您希望使用聊天 ID 来检索知识库文章并显示给坐席看,您可以将此代码用于 Google Contact Center AI 坐席助手。

对话 ID 的格式必须为 BusNo-<BusNo>_ContactId-<ContactId>,其中 <BusNo>业务单位编号,<ContactId> 是联系人 ID,保存在调用的 contactId 变量中。例如,BusNo-12345678_ContactId-987654321。

将此代码添加至您脚本中的 Snippet 操作中:

// Assign conversationID using BusNo and ContactId
ASSIGN conversationID = "BusNo-{BusNo}_contactId-{contactId}"