This is a real basic script I set up to prove the concept of sending data via HTTP Post for an after call survey.
It works fine but I am hung up trying to get the HTTP Post to go after the call is complete. The script as you see it send the data upon connection to the agent.
Any help is appreciated.
this won't work in just one script cause the script just continues after the call got connected. This is a normal behaviour since the call got handled and there is no need to keep the session up and running.
A solution might be to run a workflow action from your CAD after the call got disconnected, including the variables needed. The target could be a HTTP trigger that leads to a 2nd script that again does what you want. Or you open your HTTP trigger directly from the CAD action.