Hi all,
I am trying to get the lastest Textbody of the message keyed by a user over Whatsapp and then save the textbody as a variable in Architect in the fastest way possible.
My use case is something like:-
Bot: "Describe your problem"
User: "My printer ran out of toner"
Bot: "Problem Description: My printer ran out of toner"
I just need the textbody word for word and read it out back to the user in the next line.
I have found out that I can get the latest Message by these 2 APIs
/api/v2/conversations/messages/{conversationId}
to find the all the messages related to the conversation ID
/api/v2/conversations/messages/{messageId}/details
Use this to extract the textbody
However, the current set up takes too long to reflect the latest message, I have tested and it takes 30 seconds before the latest messageID is the one that the user types, anything less than this will be the second latest message.
Any other method to get the latest text that the user type instantaneously?
I also tried the architect variable, "message.message.body" - this only works for the first message typed when initiating the session, it does not update in the middle of a whatsapp session.