Reputation: 936
I followed this tutorial: https://www.ibm.com/blogs/bluemix/2016/05/bot-for-facebook-messenger-using-bluemix/
It works like a charm but my app does not recognize entities (like @sys_number) in messenger. How can I solve that?
Upvotes: 1
Views: 326
Reputation: 936
I solv my problem with convResults.entities[0].value
function callWatson(payload, sender) {
w_conversation.message(payload, function (err, convResults) {
//Consultar Ticket
if(convResults.intents[0].intent == 'ajax'){
if(typeof convResults.entities !== 'undefined' && convResults.entities.length > 0){
numberTicket = convResults.entities[0].value;
ticket_id = numberTicket.substr(6,6);
sendAjax(sender, ticket_id, numberTicket);
}else {
messengerSend();
}
}
});
}
Upvotes: 2
Reputation: 849
Are you saying it recognizes them in the tryout panel but not in messenger? that seems odd to me. Go to into your entities, into system entities, and make sure they are all flipped to on.
Upvotes: 0