Chat with Prodapt kjhkjh

Online
User Image

Prodapt

Hi! Welcome to Prodapt.
How may I help you?

Input should not be more than 200 characters!

By talking to this bot, I understand that Prodapt will process my personal information in accordance with its Privacy Policy

Powered by Prodapt

// if (window.globalVar == true) { (async function () { // Specifies style options to customize the Web Chat canvas. // Please visit https://microsoft.github.io/BotFramework-WebChat for customization samples. const styleOptions = { // Hide upload button. hideUploadButton: true }; // Specifies the token endpoint URL. // To get this value, visit Copilot Studio > Settings > Channels > Mobile app page. // // if (globalVar == true) { const tokenEndpointURL = new URL('https://034b67b3612be1a1a3fd8fb7c85c5b.d2.environment.api.powerplatform.com/powervirtualagents/botsbyschema/cr12b_aptio/directline/token?api-version=2022-03-01-preview'); // const tokenEndpointURL = new URL('https://034b67b3612be1a1a3fd8fb7c85c5b.d2.environment.api.powerplatform.com/powervirtualagents/botsbyschema/cr12b_dotcomChatbot/directline/token?api-version=2022-03-01-preview'); // } else { // const tokenEndpointURL = ''; // } // Specifies the language the agent and Web Chat should display in: // - (Recommended) To match the page language, set it to document.documentElement.lang // - To use current user language, set it to navigator.language with a fallback language // - To use another language, set it to supported Unicode locale // Setting page language is highly recommended. // When page language is set, browsers will use native font for the respective language. const locale = document.documentElement.lang || 'en'; // Uses language specified in element and fallback to English (United States). // const locale = navigator.language || 'ja-JP'; // Uses user preferred language and fallback to Japanese. // const locale = 'zh-HAnt'; // Always use Chinese (Traditional). const apiVersion = tokenEndpointURL.searchParams.get('api-version'); // const apiVersion = window.globalVar == true ? tokenEndpointURL.searchParams.get('api-version') : ''; const [directLineURL, token] = await Promise.all([ fetch(new URL(`/powervirtualagents/regionalchannelsettings?api-version=${apiVersion}`, tokenEndpointURL)) .then(response => { if (!response.ok) { throw new Error('Failed to retrieve regional channel settings.'); } return response.json(); }) .then(({ channelUrlsById: { directline } }) => directline), fetch(tokenEndpointURL) .then(response => { if (!response.ok) { throw new Error('Failed to retrieve Direct Line token.'); } return response.json(); }) .then(({ token }) => token) ]); // The "token" variable is the credentials for accessing the current conversation. // To maintain conversation across page navigation, save and reuse the token. // The token could have access to sensitive information about the user. // It must be treated like user password. const directLine = WebChat.createDirectLine({ domain: new URL('v3/directline', directLineURL), token }); // Sends "startConversation" event when the connection is established. const subscription = directLine.connectionStatus$.subscribe({ next(value) { if (value === 2) { directLine .postActivity({ localTimezone: Intl.DateTimeFormat().resolvedOptions().timeZone, locale, name: 'startConversation', type: 'event' }) .subscribe(); // Only send the event once, unsubscribe after the event is sent. subscription.unsubscribe(); } } }); WebChat.renderWebChat({ directLine, locale, styleOptions }, document.getElementById('webchat')); })(); // }
Insights
Leadership Team
News & Events
Pages
Success-story