Amazon Connect Streams API (Streams) allows developers to create custom agent experiences for Amazon Connect. The code for Streams is hosted in Github and open for community contributions in the form of pull requests. This is the third installment of my running series covering changes to the Streams API. Prior installments can be found here:
Newly Approved Pull Requests
Since my last installment, there have been 2 approved pull requests (PRs) to Streams.
Code Clean-Up: Fixing a Null Pointer Exception (PR #74)
PR #74 is a code change to the softphone.js file that adds some initialization logic and null checks for some audio metadata (the audio “stats”) for the current call. When a call connects, these stats are populated by the startStatsCollectionJob in the onRefreshContact handler. When a call failed to connect, these stats were never populated and a subsequent call to send these stats via sendSoftphoneReport failed with a null pointer exception. With the changes, sendSoftphoneReport succeeds even when the call fails to connect.
This kind of fix is nice to see as it reduces the noise of extra error logs when troubleshooting issues with the Streams API and the Contact Control Panel.
TypeScript Tooling Support (PR #41)
I highlighted this PR back in my last post and am happy to see it get approved. A TypeScript declaration file for Streams API helps developers write better code faster, by lighting up type checking and code completion in editors like Visual Studio Code.
New & Open Pull Requests
Learn the six most common pitfalls when upgrading your contact center, and how Amazon Connect can help you avoid them.
There are no new PRs since last time and only 2 open PRs at this point:
- PR #21: Corrects the name of two contact methods, adds text re: friendly name
- My old PR, which I’m the process of closing as it has been superseded by other PR’s.
- PR #64: Exposing rtc session for callstats integration
- I covered this PR last installment; as I said this is an interesting PR that opens up possibilities for real-time monitoring but cracks open the internals of Amazon Connect in a way that could make this PR fragile to later Streams changes
Closed Pull Requests
- PR #39: Update Documentation.md to reflect contact “status” instead of “state”
- This was closed because the Amazon Connect team said they will update the documentation when the duplicate methods are deprecated
For this installment, I’m adding this section to take a quick look at some recently updated Issues. Issues in Github are used to track problems, ask for help or suggest new features. An issue sometimes will end up spawning a PR for a code fix. Looking through the issues list on Github I saw three I wanted to highlight:
- Issue #54: Transfer a call to an agent
- Issue #27: Call transfers and quick connect support
- Issue #67: Help needed to integrated auto-selection of headset for audio input and output
Transfer to Quick Connect via Streams (Issue #54 and #27)
The always helpful jagadeeshaby responded to both of these requests for help on how to do transfers to Quick Connects using Streams API with a short code snippet:
This code path is not immediately obvious from the documentation. Thanks for the tip jagadeeshaby!
Audio Device Selector & Speaker Ring (Issue #67)
extmchristensen and mschersten bring up a user experience issue we see across customers. Between the browser and Windows sound settings, agents can have a hard time selecting the right audio device to use for Amazon Connect calls. This issue is requesting some changes to Streams API to let partners implement their own audio device selection user experience. mschersten brings up that it would be nice to have simultaneous ring across multiple audio devices, so a low utilization agent can hear a ring over their PC speakers.
I’d love to see changes along these lines, and I’ll be sure to keep an eye out on this issue for any further activity.
Thanks for reading. Any questions, comments or corrections are greatly appreciated. To learn more about what we can do with Amazon Connect, check out Helping You Get the Most Out of Amazon Connect