Client App SDK - Screen Pop Not Triggering on Inbound Call with Custom Data

Hey all,

So, we’re trying to get a screen pop working on inbound calls, nothing too wild. The idea is to pass some custom data from the IVR - specifically a policy number - and have that data used to open a specific record in our system when the call reaches an agent. Seems straightforward enough, but it’s been…a journey.

The core of this is the PureCloudPlatformClientV2 SDK, and we’re using the onBeforeCall event to pull the data and trigger the screen pop. Everything looks right on the Architect side, the custom data is definitely being sent with the call, but the screen pop just isn’t happening. We’ve tested this with a simple data pass-through to a text field on the agent desktop just to verify the data arrives, and that works, so it’s not a data transport issue, which is good. It’s the screen pop itself that’s failing.

I’m leaning towards something wonky with how we’re constructing the screen pop payload, but honestly, the documentation isn’t super clear on the expected format when using custom data. It’s a lot of “here’s an example” without really explaining the underlying logic. We’re on SDK version 12.1.0, which should be pretty current. It feels like the platform isn’t even seeing the data in the right format to trigger the pop.

Here’s what we’ve tried, in no particular order, because honestly, it’s been a lot of poking around:

  • We’re using the client.onBeforeCall event to intercept the call. This seems like the correct place.
  • The custom data is passed as a JSON object in the call context using the user.custom field in Architect. The object looks like this: {"policyNumber": "1234567890"}.
  • We’ve confirmed the call.customFields.policyNumber is populated with the correct value inside the onBeforeCall handler. It’s definitely not null or undefined.
  • The screen pop is configured to look for the policyNumber in the call context.
  • We tried passing the entire call.customFields object as the screen pop data, thinking maybe it’s a key name issue, but that didn’t work either.
  • We’ve checked the agent’s permissions and roles. They have full access to the application that should be opened by the screen pop.

Here’s a snippet of the code handling the onBeforeCall event. I’ve stripped out some logging, but the core logic is intact:

client.onBeforeCall(call => {
 console.log('onBeforeCall triggered');
 const policyNumber = call.customFields.policyNumber;
 console.log(`Policy Number: ${policyNumber}`);

 if (policyNumber) {
 const screenPopData = {
 "policyNumber": policyNumber
 };

 console.log("Screen pop data:", screenPopData);
 client.openScreenPop({
 url: 'https://oursystem.com/policy?number=' + policyNumber,
 data: screenPopData,
 }).then(() => {
 console.log('Screen pop initiated successfully');
 }).catch(error => {
 console.error('Error initiating screen pop:', error);
 });
 } else {
 console.log('Policy Number not found in call context');
 }
});

The console logs confirm the policyNumber is populated, and the screenPopData object is constructed correctly. However, there’s no output from the then() block - which means the openScreenPop() function isn’t successfully triggering the pop. No errors are being thrown either, which is… frustrating.

I suspect it’s something subtle with how PureCloudPlatformClientV2 is serializing the data object, or maybe the platform expects the data in a specific format that we’re not providing. I’ve tried different ways of formatting the data parameter in openScreenPop(), including stringifying it, but nothing seems to work. It’s starting to feel like there’s a mismatch between what the SDK documentation says and what the platform actually expects. Anyone else run into this?