Probatu mezularitza-kanal pertsonalizatua

Dynamics 365 Contact Center-ek mezularitza kanal pertsonalizatuak integratzeko konektore bat inplementatzeko aukera ematen du. adibide kodea osoak erakusten du nola sor dezakezun zure konektore propioa, Dynamics 365 Contact Center Direct Line Bot erabiliz.

Mezularitza-kanal pertsonalizatua probatzeko adibide-kodea

Hurrengo kode adibide hau erabil dezakezu Dynamics 365 Contact Center-era ekarri nahi duzun mezularitza kanal pertsonalizatua probatzeko. Adibide-kodea alda dezakezu, erakundearen beharretara egokitzeko.

<!DOCTYPE html>
<html lang="en-US">
<head>
    <title>Web Chat: Full-featured bundle</title>

    <script src="https://cdn.botframework.com/botframework-webchat/latest/webchat.js"></script>

    <style>
    html, body { height: 100% }
    body {
      margin: 0;
      background-color: paleturquoise;
    }
    #webchat {
      height: 100%;
      width: 100%;
    }
  </style>
</head>
<body>
       <div id="webchat" role="main"></div>
    <script>
    (async function () {
        const res = await fetch('https://directline.botframework.com/v3/directline/conversations', 
{ method: 'POST', headers: { Authorization: 'Bearer ***************Insert Direct Line Secret here *******************' }});

      const { token } = await res.json();

      (async function () {
	window.WebChat.renderWebChat({
      directLine: window.WebChat.createDirectLine({ token }),
      styleOptions: {
        rootHeight: '100%',
        rootWidth: '50%',
		bubbleMaxWidth: 1200,               
        botAvatarInitials: 'C',                
        userAvatarInitials: 'A',  
      }
    }, document.getElementById('webchat'));
    })()
    })().catch(err => console.error(err));
   </script>
</body>
</html>

Hurrengo urratsak

Direct Line API 3.0 kontzeptu klabeak

Ekarri zure kanal pertsonalizatua Direct Line erabiliz
Konfiguratu mezularitza-kanal pertsonalizatua