Package Exports
- botfactory-conversation
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (botfactory-conversation) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
BotFactory conversation
Componente de conversação com o Senior Bot Factory.
Este componente é iniciado em qualquer site, basta criar um elemento HTML no arquivo .html e colar o script abaixo ajustando as variáveis com o elemento html criado e, caso necessário, ajustando os parâmetros opcionais.
<script>
(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) { return; }
js = d.createElement(s); js.id = id;
js.src = "https://cdn.tecnologia.senior.com.br/platform/botfactory/conversation/production/bundle.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'botfactory-sdk'));
(function () {
window.onload = function () {
window.BotFactory.init({
appKey: 'fb8d3140-d4d9-4616-95eb-fb3a3c277f7b', // obrigatório - chave gerada pelo botfactory
username: 'usuario', // opcional - identificador do usuário que está conversando com o bot
expanded: true // opcional - indica se o bot deve iniciar com a caixa de conversação aberta
});
}
})();
</script>Para geração e disponibilização do bundle.js, os comandos são respectivamente:
webpack
node server.jsFoi criado um projeto sample onde no arquivo index.html é feita a importação do componente Botfactory-integration-sample-react