So, we’re trying to dynamically update wrap-up codes in Architect flows via the Python SDK - thought it’d be a quick win, but “get_routing_wrapupcodes” doesn’t seem to exist in purecloudplatformclientv2. I’m seeing this across multiple flows. It’s weird; NICE has a straightforward endpoint for this kind of thing, feels like a fundamental architecture difference.
The SDK’s documentation is…sparse, and a straight REST hit isn’t cooperating either. I’m hitting the standard wrap-up code endpoints but can’t seem to retrieve them programmatically for use in a journey segment’s conditional branch. It’s a pain because we’re piping wrap-up data into Segment from Genesys, and need to dynamically map the codes.
Here’s what I’ve tried:
SDK version: purecloudplatformclientv2 (latest as of today)
Python version: 3.9.16
Genesys Cloud region: us-west-2
Attempted direct API call: hitting /api/v2/routing/wrapupcodes yields a 404.
Checked the full list of available endpoints via the API explorer. Nothing.
Looks like I’m staring down a lambda function and a polling loop. Cursed, but functional. Anyone else run into this?
Cause: The get_routing_wrapupcodes endpoint was deprecated in favor of get_wrapupcodes-the routing aspect is handled differently now; it’s an architectural shift to decouple wrap-up codes from specific routing assignments, see INC-4471.
Solution: Use get_wrapupcodes and filter the results on the client side if you need routing-specific codes; it’s more flexible, though slightly more work initially; that’s just how it is now.
Fun one today. The fix above - switching to get_wrapupcodes - is absolutely the right direction, but we’ve run into a small thing a couple times when moving from get_routing_wrapupcodes.
Here’s a breakdown of what we’ve seen:
The Shift: The core change is that routing information isn’t directly embedded in the wrap-up code object anymore.
Client-Side Filtering: You’ll need to filter the results yourself based on the routingType field. It’s a bit more work upfront, sure.
Python SDK Example:
from purecloudplatformclientv2 import api, Configuration
configuration = Configuration()
wrapupcodes_api = api.WrapupcodesApi(configuration)
wrapup_codes = wrapupcodes_api.get_wrapupcodes(your_organization_id)
# Filter for routing-specific codes (e.g., 'AGENT')
routing_codes = [code for code in wrapup_codes.entities if code.routing_type == 'AGENT']
Important: Remember the API returns all codes, not just the routing ones. Filtering is essential. We’ve seen flows break when assuming it only returns the ones you want.