Peroleh dan format mesej beraneka

Platform Copilot Studio dan Dynamics 365 Customer Service sedikit berbeza dalam cara mereka menyokong mesej media kaya berdasarkan saluran dan jenis mesej media kaya. Artikel ini menerangkan cara anda boleh menyokong mesej media kaya dalam Copilot Studio.

Dapatkan semula ejen JSON untuk Apple Messages for Business

  1. Dalam peta laman pusat pentadbiran Perkhidmatan Copilot, pilih Produktiviti dalam pengalaman Sokongan.
  2. Pada halaman Produktiviti , pilih Urus untuk mesej Kaya.
  3. Daripada senarai semua mesej senarai yang tersedia, pilih mesej kaya yang anda mahu hantar ke perbualan.
  4. Untuk mesej kaya Apple Messages for Business, gunakan API Microsoft.Omnichannel.sendMessageToConversation untuk menghantar fail JSON.

Dapatkan JSON ejen untuk borang Sembang Langsung, JSON tersuai Sembang Langsung dan balasan yang dicadangkan WhatsApp

  1. Dalam peta laman pusat pentadbiran Perkhidmatan Copilot, pilih Produktiviti dalam pengalaman Sokongan.

  2. Pada halaman Produktiviti , pilih Urus untuk mesej Kaya.

  3. Cari mesej media kaya yang anda mahu ejen hantar dan jika ia mempunyai JSON yang tersedia, ia muncul di bawah lajur JSON untuk Copilot Studio . Pilih Lihat JSON dan jenis saluran tertentu untuk menyalin JSON.

    JSON mesej kaya

  4. Untuk templat media kaya Sembang Langsung dan WhatsApp, anda boleh menampal JSON terus ke dalam nod kad penyesuaian dalam Copilot Studio.

Sampel JSON untuk mesej kaya untuk Apple Messages for Business

Bahagian ini termasuk contoh JSON untuk jenis mesej kaya yang tersedia dalam saluran Apple Messages for Business dalam Dynamics 365 Customer Service. Maklumat lanjut: Urus mesej kaya

Nota

Anda tidak boleh menghantar Borang jenis mesej kaya kepada perbualan.

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);

Pengesahan

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 Tersuai (Aplikasi 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);

Pemilih Senarai

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);

Jawapan yang dicadangkan

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);

Pemilih masa

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);

Konfigurasikan ejen untuk menghantar balasan yang dicadangkan Sembang Langsung dan kad/karusel

Copilot Studio menyokong jawapan yang dicadangkan dan kad asas di luar kotak. Ketahui lebih lanjut dalam Hantar mesej - Microsoft Copilot Studio.

Nota

Copilot Studio merujuk kepada jawapan yang dicadangkan sebagai balasan pantas.

Rujukan API JavaScript SDK sembang langsung
Rujukan API JavaScript omnichannel
sendMessageToConversation