ClientSDK - call transfers

Hi there,
I have a browser extension that intercepts the hangup button and transfers the call to an IVR survey.
We do this with the following JavaScript;

        const observer = new MutationObserver(function(mutations_list) {

            // console.log('centra: observer triggered:', mutations_list);
            mutations_list.forEach(function(mutation) {
                mutation.addedNodes.forEach(function(added_node) {

                    if (added_node.tagName == "BUTTON") {

                        if((added_node.className.indexOf('interaction-end-btn') >= 0) && (added_node.className.indexOf('consult-destination-end-btn') == -1)) {

And works fine...
Except it ALSO transfers to our survey - if the call is transferred from one agent to another.
(I think it is a Consult transfer in GC terms)

How do I determine if the call is a consult-transfer?
I thought it might be tested via "interactionType" - as an example...

Nonetheless,
I have been reading through the forums and also consumed all of my google-fu - trying to find an appropriate example or explanation / documentation for this over the last 2 days and have succomb to asking for help!

How can I determine if a call is being transferred internally?
So that I can write an appropriate if-then-else - to steer it away from our "transfer to survey" code.

As always - Thanks for anything you might be able to share!

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.