onCreateEngagementSucceeded event not firing for incomingCall() with createEngagement: true
SOLVE
I'm using the HubSpot Calling Extensions SDK to build a custom calling app. I'm currently looking into inbound calling and notifying Hubspot about incoming calls following the documentation here
When I do
extensions.incomingCall(callInfo)
with
createEngagement: true
and call
extensions.callCompleted(callInfo)
with
externalCallId
The engagement is successfully created in HubSpot, but I never receive the onCreateEngagementSucceeded or onCreateEngagementFailed events.
What I've confirmed:
My event handlers are registered in the SDK initialization
I am using the latest SDK version
createEngagement: trueis set in the extensions.incomingCall()call
extensions.callCompleted(data) is being called with my externalCallId
An engagement is created in Hubspot detailing the incoming call
According to the Calling SDK documentation, these events should fire when calling incomingCall() with createEngagement: true, but they're not being triggered despite the engagement being created successfully.
Has anyone else experienced this issue or found a workaround?
onCreateEngagementSucceeded event not firing for incomingCall() with createEngagement: true
SOLVE
Hi,
I wanted to follow up and share that I believe I've identified the root cause of my issue.
After taking a step back and reviewing the demo code more carefully, I realised I had misunderstood the distinction between the calling remote context and the window context.
In the demo code provided by HubSpot, events are sent to HubSpot using thirdPartyToHostEvents with
cti.contract.incomingCall
from the appropriate context. However, I had been incorrectly calling
cti.incomingCall
directly from the remote window context, which was preventing the events from properly reaching HubSpot.
What made this particularly confusing was I could see in the console Hubspot had received an incomingCall event from the app and the calling widget was still popping up in HubSpot despite this mistake, which led me to believe I was doing things correctly.
I'm still not entirely clear on why that partial functionality was working, but it explains why the event handlers weren't firing as expected.
Apologies for the confusion on my end, and thanks for your patience in helping me work through this!
onCreateEngagementSucceeded event not firing for incomingCall() with createEngagement: true
SOLVE
Hi,
I wanted to follow up and share that I believe I've identified the root cause of my issue.
After taking a step back and reviewing the demo code more carefully, I realised I had misunderstood the distinction between the calling remote context and the window context.
In the demo code provided by HubSpot, events are sent to HubSpot using thirdPartyToHostEvents with
cti.contract.incomingCall
from the appropriate context. However, I had been incorrectly calling
cti.incomingCall
directly from the remote window context, which was preventing the events from properly reaching HubSpot.
What made this particularly confusing was I could see in the console Hubspot had received an incomingCall event from the app and the calling widget was still popping up in HubSpot despite this mistake, which led me to believe I was doing things correctly.
I'm still not entirely clear on why that partial functionality was working, but it explains why the event handlers weren't firing as expected.
Apologies for the confusion on my end, and thanks for your patience in helping me work through this!
I understand that, despite correctly following the HubSpot Calling Extensions SDK documentation and successfully creating an engagement for an incoming call, you are not receiving the expected onCreateEngagementSucceeded or onCreateEngagementFailed events.
I'd like to tag in some of our Community Champions to see if they have experienced anything like this before -- Hi @GRajput@Aly_Mourady and @Alex_Elborn Have any of you seen this? If so, how did you go about resolving it? Any advice?
Cassie, Community Manager
Loop Marketing is a new four-stage approach that combines AI efficiency and human authenticity to drive growth.