Recuperar i formatar missatges enriquits

Les plataformes Copilot Studio i Dynamics 365 Customer Service difereixen lleugerament en com suporten missatges de mitjans rics segons el canal i el tipus de missatge de mitjans rics. En aquest article es descriu com podeu admetre missatges multimèdia enriquits al Copilot Studio.

Recuperar el JSON de l'agent per a l'Apple Messages for Business

  1. Al mapa del lloc del Centre d'administració de Copilot Service, seleccioneu Productivitat a l'experiència de suport.
  2. A la pàgina Productivitat , seleccioneu Gestiona els missatges enriquits.
  3. A la llista de tots els missatges de llista disponibles, seleccioneu un missatge enriquit que vulgueu enviar a la conversa.
  4. Per als missatges enriquits de l'Apple Messages for Business, utilitzeu l'API Microsoft.Omnichannel.sendMessageToConversation per enviar fitxers JSON.

Recupera el JSON de l'agent per als formularis del xat en directe, el JSON personalitzat del xat en directe i les respostes suggerides de WhatsApp

  1. Al mapa del lloc del Centre d'administració de Copilot Service, seleccioneu Productivitat a l'experiència de suport.

  2. A la pàgina Productivitat , seleccioneu Gestiona els missatges enriquits.

  3. Cerqueu el missatge multimèdia enriquit que voleu que enviï un agent i, si té JSON disponible, apareixerà a la columna JSON per a Copilot Studio . Seleccioneu Visualitza JSON i el tipus de canal específic per copiar el JSON.

    Missatge enriquit JSON

  4. Per a les plantilles de xat en directe i WhatsApp rich multimèdia, podeu enganxar el JSON directament en un node de targeta adaptativa a Copilot Studio.

Exemples JSON per a missatges enriquits per a l'Apple Messages for Business

Aquesta secció inclou mostres JSON per als tipus de missatges rics disponibles al canal Apple Messages for Business de Dynamics 365 Customer Service. Més informació: Administrar missatges enriquits

Nota

No podeu enviar missatges enriquits de tipus Forms a les converses.

Apple Pay

let applePayJSON = // <copy_and_paste_details_content>
applePayJSON.survey = { Questions: JSON.parse(applePayJSON.survey)[0].Questions, Answers: JSON.parse(applePayJSON.survey)[1].Answers };
applePayJSON.survey.Answers.AppleMessagesforBusinessJSON = JSON.parse(applePayJSON.survey.Answers.AppleMessagesforBusinessJSON);
applePayJSON.survey.Answers.AppleMessagesforBusinessJSON = JSON.stringify(applePayJSON.survey.Answers.AppleMessagesforBusinessJSON);
applePayJSON.survey = JSON.stringify(applePayJSON.survey);

// Can now send this payload using the API
Microsoft.Omnichannel.sendMessageToConversation(applePayJSON, false);

// Or take the JSON elsewhere for use in bringing your own logic
copy(applePayJSON);

Autenticació

let authJSON = // <copy_and_paste_details_content>
authJSON.survey = { Questions: JSON.parse(authJSON.survey)[0].Questions, Answers: JSON.parse(authJSON.survey)[1].Answers };
authJSON.survey = JSON.stringify(authJSON.survey);

// Can now send this payload using the API
Microsoft.Omnichannel.sendMessageToConversation(authJSON, false);

// Or take the JSON elsewhere for use in bringing your own logic
copy(authJSON);

JSON personalitzat (aplicació iMessage)

let customJSON = // <copy_and_paste_details_content>
customJSON.survey = { Questions: JSON.parse(customJSON.survey)[0].Questions, Answers: JSON.parse(customJSON.survey)[1].Answers };
customJSON.survey.Answers.AppleMessagesforBusinessJSON = JSON.parse(customJSON.survey.Answers.AppleMessagesforBusinessJSON);
customJSON.survey.Answers.AppleMessagesforBusinessJSON = JSON.stringify(customJSON.survey.Answers.AppleMessagesforBusinessJSON);
customJSON.survey = JSON.stringify(customJSON.survey);

// Can now send this payload using the API
Microsoft.Omnichannel.sendMessageToConversation(customJSON, false);

// Or take the JSON elsewhere for use in bringing your own logic
copy(customJSON);

Selector de llistes

listPickerJSON = // <copy_and_paste_details_content>
listPickerJSON.survey = { Questions: JSON.parse(lpFromDetails.survey)[0].Questions, Answers: JSON.parse(listPickerJSON.survey)[1].Answers };
listPickerJSON.survey = JSON.stringify(listPickerJSON.survey);

// Can now send this payload using the API
Microsoft.Omnichannel.sendMessageToConversation(listPickerJSON, false);

// Or take the JSON elsewhere for use in bringing your own logic
copy(listPickerJSON);

Resposta suggerida

suggestedReplyJSON = // <copy_and_paste_details_content>
suggestedReplyJSON.survey = { Questions: JSON.parse(suggestedReplyJSON.survey)[0].Questions, Answers: JSON.parse(suggestedReplyJSON.survey)[1].Answers };
suggestedReplyJSON.survey = JSON.stringify(suggestedReplyJSON.survey);

// Can now send this payload using the API
Microsoft.Omnichannel.sendMessageToConversation(suggestedReplyJSON, false);

// Or take the JSON elsewhere for use in bringing your own logic
copy(suggestedReplyJSON);

Selector d'hora

timePickerJSON = // <copy_and_paste_details_content>
timePickerJSON.survey = { Questions: JSON.parse(timePickerJSON.survey)[0].Questions, Answers: JSON.parse(timePickerJSON.survey)[1].Answers };
timePickerJSON.survey = JSON.stringify(timePickerJSON.survey);

// Can now send this payload using the API
Microsoft.Omnichannel.sendMessageToConversation(timePickerJSON, false);

// Or take the JSON elsewhere for use in bringing your own logic
copy(timePickerJSON);
videoRichLinkJSON = // <copy_and_paste_details_content>
videoRichLinkJSON.survey = { Questions: JSON.parse(videoRichLinkJSON.survey)[0].Questions, Answers: JSON.parse(videoRichLinkJSON.survey)[1].Answers };
timePickerJSON.survey = JSON.stringify(videoRichLinkJSON.survey);

// Can now send this payload using the API
Microsoft.Omnichannel.sendMessageToConversation(videoRichLinkJSON, false);

// Or take the JSON elsewhere for use in bringing your own logic
copy(videoRichLinkJSON);
websiteRichLinkJSON = // <copy_and_paste_details_content>
websiteRichLinkJSON.survey = { Questions: JSON.parse(websiteRichLinkJSON.survey)[0].Questions, Answers: JSON.parse(websiteRichLinkJSON.survey)[1].Answers };
timePickerJSON.survey = JSON.stringify(websiteRichLinkJSON.survey);

// Can now send this payload using the API
Microsoft.Omnichannel.sendMessageToConversation(websiteRichLinkJSON, false);

// Or take the JSON elsewhere for use in bringing your own logic
copy(websiteRichLinkJSON);

Configurar els agents per enviar respostes suggerides de xat en directe i targetes/carrusels

Copilot Studio admet respostes suggerides i targetes bàsiques de fàbrica. Més informació a Enviar un missatge - Microsoft Copilot Studio.

Nota

Copilot Studio es refereix a les respostes suggerides com a respostes ràpides.

Referència de l'API JavaScript de l'SDK de xat en directe
Referència de l'API de JavaScript omnicanal
sendMessageToConversation