Hey all,
So, we’ve got a weird one happening with screen pops and the PureCloudPlatformClientV2 SDK - specifically, the custom data we’re sending isn’t making it through to the agent desktop. Not 100% sure but I suspect it’s related to the way we’re handling the data field in the POST request.
The flow is roughly this: an inbound call comes in, the IVR collects a policy number, then that policy number needs to kick off a screen pop. We’re using an Architect flow with a POST action to trigger a screen pop. The userId is populated correctly - confirmed that part works fine. What’s not making it is the custom data. Here’s the Python snippet:
from purecloudplatformclientv2 import Configuration, ApiClient, ScreenPopsApi
config = Configuration()
config.host = 'https://genesyscloud.com'
api_client = ApiClient(config)
screen_pops_api = ScreenPopsApi(api_client)
user_id = 'some_user_id'
policy_number = '1234567890'
data = {'policyNumber': policy_number}
try:
screen_pops_api.post_user_screen_pop(user_id, data)
print(f"Screen pop triggered for user {user_id} with policy number {policy_number}")
except Exception as e:
print(f"Error triggering screen pop: {e}")
The API call itself doesn’t throw an error. It returns a 200 OK, which is super confusing. However, the agent desktop isn’t showing the policyNumber in the screen pop payload. We’ve tested this with a simple URL, and that works, so the core screen pop functionality is fine.
I’m wondering if the SDK is doing something weird with the JSON serialization - maybe escaping characters or something? Or perhaps there is some limit on the size of the data payload? Long story short, we’re hitting a 200 OK but the data isn’t getting through. It’s a bit frustrating.