SOLVED

Handling Teams latency

%3CLINGO-SUB%20id%3D%22lingo-sub-1297509%22%20slang%3D%22en-US%22%3EHandling%20Teams%20latency%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1297509%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%20We%20have%20a%20bot%20that%20is%20showing%20users%20adaptive%20cards.%26nbsp%3B%20The%20cards%20are%20built%20with%20submit%20action%20buttons.%26nbsp%3B%20We%20have%20noticed%20that%20when%20users%20click%20on%20the%20submit%20buttons%2C%20the%20bot%20and%20its%20web%20app%20may%20take%20time%20to%20respond.%26nbsp%3B%20During%20this%20%22waiting%20period%22%2C%20users%20would%20click%20on%20the%20buttons%20again%2C%20resulting%20in%20duplicate%20actions%20being%20performed.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20give%20an%20indicator%20to%20the%20users%20that%20the%20button%20has%20been%20clicked%20and%20an%20action%20is%20performing%20in%20the%20background%3F%26nbsp%3B%20For%20eg.%20disable%20the%20button%20after%20it's%20been%20clicked%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20You%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1297509%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EThe%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1297626%22%20slang%3D%22en-US%22%3ERe%3A%20Handling%20Teams%20latency%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1297626%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F493333%22%20target%3D%22_blank%22%3E%40voonsionglum%3C%2FA%3E%26nbsp%3B%20Does%20your%20Button%20event%20click%20is%20executing%20the%20POST%20call.%20If%20not%20then%20request%20you%20to%20perform%20HTTP%20POST%20request.%20This%20would%20disable%20the%20button.%20I%20have%20performed%20this%20in%20%3CSTRONG%3EMessage%20card%3C%2FSTRONG%3E%20and%20it%20works%20fine%20for%20me.%20I%20mean%2C%20it%20disables%20my%20button%20until%20the%20response%20received%20back%20from%20the%20server.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1297656%22%20slang%3D%22en-US%22%3ERe%3A%20Handling%20Teams%20latency%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1297656%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F561606%22%20target%3D%22_blank%22%3E%40NadirRiyani%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKudos!%26nbsp%3B%20I%20did%20not%20know%20there%20was%20another%20action%20type%20called%20Action.HTTP.%26nbsp%3B%20From%26nbsp%3B%3CA%20href%3D%22http%3A%2F%2Fwww.msclouddeveloper.com%2Fadaptive-card-with-http-post%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fwww.msclouddeveloper.com%2Fadaptive-card-with-http-post%2F%3C%2FA%3E%2C%20it%20looks%20like%20we%20might%20be%20able%20to%20handle%20latency%20better.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20You!%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

Hi, We have a bot that is showing users adaptive cards.  The cards are built with submit action buttons.  We have noticed that when users click on the submit buttons, the bot and its web app may take time to respond.  During this "waiting period", users would click on the buttons again, resulting in duplicate actions being performed.  

 

Is there a way to give an indicator to the users that the button has been clicked and an action is performing in the background?  For eg. disable the button after it's been clicked?

 

Thank You

2 Replies
Highlighted
Best Response confirmed by voonsionglum (Contributor)
Solution

@voonsionglum  Does your Button event click is executing the POST call. If not then request you to perform HTTP POST request. This would disable the button. I have performed this in Message card and it works fine for me. I mean, it disables my button until the response received back from the server.

 

Highlighted

@NadirRiyani 

 

Kudos!  I did not know there was another action type called Action.HTTP.  From http://www.msclouddeveloper.com/adaptive-card-with-http-post/, it looks like we might be able to handle latency better.  

 

Thank You!