Bom dia, estou tentando realizar a conexão com atendimento humano via SDK. Quando uso o fluxo para abrir um ticket , como no código abaixo, vejo que o ticket não é aberto. … Estou tentando seguir a documentação … saberiam informar se falta algum processo?
// Put your identifier and access key here
let IDENTIFIER = 'identificador_do_meu_chatbot';
let ACCESS_KEY = 'chave_do_meu_chatbot';
// Create a client instance passing the identifier and accessKey of your chatbot
let client = new BlipSdk.ClientBuilder()
.withIdentifier(IDENTIFIER)
.withAccessKey(ACCESS_KEY)
.withTransportFactory(() => new WebSocketTransport())
.build();
// Connect with server asynchronously
// Connection will occurr via websocket on 8081 port.
client
.connect() // This method return a 'promise'.
.then(function (session) {
// QUANDO CHEGA AQUI, CONECTA NUMA BOA.
console.log('Application started. Press Ctrl + c to stop.');
})
.catch(function (err) {
/* Connection failed. */
console.log(`Connection failed: ${err}`);
});
client.addMessageReceiver(true, function (message) {
// Process received message
console.log(`Received message: ${message}`);
});
// CHAMO O MÉTODO ABAIXO EM OUTRA FUNÇAO .... MAS NO PAINEL
// DE ATENDIMENTO , NÃO VEJO O TICKET NOVO
client.sendCommand({
id: Lime.Guid(),
to: 'postmaster@desk.msging.net',
method: Lime.CommandMethod.SET,
uri: '/tickets/',
type: 'application/vnd.iris.ticket+json',
resource: {
customerIdentity: 'XPTO',
},
});