הערה
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות להיכנס או לשנות מדריכי כתובות.
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות לשנות מדריכי כתובות.
'ריבוי ערוצים לשירות לקוחות' מציע חבילת יכולות המרחיבות את העוצמה של Dynamics 365 Customer Service Enterprise כדי לאפשר לארגונים להתחבר באופן מיידי ולתקשר עם הלקוחות שלהם באמצעות ערוצים להעברת הודעות דיגיטליות. נדרש רישיון נוסף כדי לגשת ל'ריבוי ערוצים עבור Customer Service'. למידע נוסף, עיין בדפים סקירת מחירי Dynamics 365 Customer Service ותוכנית המחירים של Dynamics 365 Customer Service.
שיטה זו נדרשת ליישום במשאב אינטרנט. שיטה זו נקראת עבור כל הודעת שיחה שהוחלפה בין הלקוח לסוכן, אם התרגום מופעל ואם ההודעה לא תורגמה מוקדם יותר בשיחה עבור שפת היעד.
חשוב
עיין במשאב אינטרנט לדוגמה זה לקבלת מידע נוסף על אופן היישום של ה translateMessage - API.
תחביר
function (conversationId, translationConfig): Object
פרמטרים
| שם | Type | תיאור |
|---|---|---|
translationConfig |
אובייקט JavaScript | מורכב מ conversationId- , messagePayload וזוגות translateToC1orC2 מפתח-ערך. |
הנה מבנה הפרמטר translationConfig .
export class UserType {
public static readonly C1 = "Agent"; //Used if the sender of the message is agent
public static readonly C2 = "Customer"; //Used if the sender of the message is customer
public static readonly CONSULT = "Consult Agent"; //Used if the sender of the message is other than agent or customer
}
export class TranslateTo {
public static readonly C1 = "Agent"; //Used if message is translated for agent
public static readonly C2 = "Customer"; //Used if message is translated for customer
}
export class MessageContentType {
public static readonly Text = "Text"; //Used if the content type is text
}
interface Sender {
userType: UserType; //Points to any static field in UserType type,Represents the type of the user who is sending this message
}
interface MessagePayload {
content: string; //Contains the content to be translated
contentType: MessageContentType; //Points to any static field in MessageContentType type,Represents the type of message content. For example: "Text" etc.
sender: Sender; //Implements Sender interface, Represents the sender of the message
}
interface translationConfig {
conversationId: string; //Unique Id for conversation in Omnichannel for Customer Service
messagePayload: MessagePayload; //Implements MessagePayload interface, Represents the payload for the message to be translated
translateToC1orC2: TranslateTo; //Points to any static field in TranslateTo type,Represents for whom the message has to be translated
}
הנה דוגמה של הפרמטר conversationConfig .
translationConfig = {
"conversationId": "2b330c52-6844-4d36-8e05-03c78c9681dc",
"messagePayload": {
"content": "Hello",
"contentType": "Text",
"sender": {
"userType": "Agent"
}
},
"translateToC1orC2": "Customer"
}
ערך החזרה
החזרת הבטחה שנפתרת לממשק יישום TranslatedMessageResponse אובייקט JavaScript.
אובייקט ממשק
export interface ErrorObject{
isError: boolean; //mandatory field, represents true for error while executing this function else no
errorCode: ErrorCodes; //mandatory field, represents the type of error based on errorCode
}
export interface TranslatedMessageResponse {
translatedMessage: string; //mandatory field, Contains the translated message
sourceLanguage: string; //mandatory field, represents the language locale of the original content
destinationLanguage: string; //mandatory field, represents the language locale of the translated content
errorObject?: ErrorObject; //optional field, represents the error object for any error scenarios
}
הפרמטר errorCode ב- ErrorObject מייצג את השגיאות מהרשימה הבאה בלבד.
| הודעת שגיאה | קוד שגיאה | תיאור |
|---|---|---|
| MESSAGE_TOO_LONG | 100 | קוד שגיאה עבור הודעה ארוכה מאוד ששירות התרגום אינו יכול לתרגם |
| LANGUAGE_NOT_SUPPORTED | 101 | קוד שגיאה עבור שפה שאינה נתמכת על-ידי שירות התרגום |
| MESSAGE_NOT_TRANSLATED | 102 | קוד שגיאה עבור הודעה שלא תורגם על-ידי שירות התרגום |
| TRANSLATION_SERVICE_LIMIT_EXCEEDED | 103 | קוד שגיאה אם חריגה ממגבלת המיכסה עבור שירות התרגום |
| TRANSLATION_FAILED | 104 | קוד שגיאה אם שירות התרגום לא הצליח לתרגם הודעה |
| UNRECOGNIZED_TEXT | 105 | קוד שגיאה אם הטקסט אינו מזוהה על-ידי שירות התרגום |
| UNRECOGNIZED_ERROR | 200 | קוד שגיאה אם יש שגיאה כלשהי מלבד זו הרשומה. |
הפרמטר sourceLanguage and destinationLanguage בממשק TranslatedMessageResponse מייצג מזהה אזור. מידע נוסף: מזהה אזור.
תגובה לדוגמא
{
"translatedMessage": "Hola",
"destinationLanguage": "3082",
"errorObject": {
"isError": false,
"errorCode": null
},
"sourceLanguage": "3082"
}
הערה
- במקרה של חריגה במהלך ביצוע שיטה זו, ריבוי ערוצים לשירות לקוחות לא ינסה שוב ובמקום זאת יציג הודעת שגיאה של התרגום נכשל.
- ניתן להודיע על שגיאה בעת ביצוע שיטה זו באמצעות
errorObject. במקרה של שגיאה, ריבוי ערוצים לשירות לקוחות לא ינסה שוב ובמקום זאת יציג את הודעת השגיאה בהתבסס על קודי השגיאה שסופקו. - במקרה שהתגובה המוחזרת אינה חוקית או לא מלאה, הודעת שגיאה בכרזת התרגום תופיע בפקד השיחה.
- אם שיטה זו לא מיושמת, ההודעה לא תתורגם והודעת השגיאה הבאה תוצג לסוכן.