Trying to set wrap-up codes programmatically right after an interaction ends. The UI shows the wrap-up screen, but we need to force specific codes via API for analytics consistency. I’m using the Python SDK to update the wrap-up code via PUT /api/v2/routing/wrapupcodes/{codeId}. The interaction status is ended when I make the call. Here’s the payload:
{
"id": "my-wrapup-code-id",
"name": "My Wrap Up Code",
"description": "For analytics consistency",
"score": 5
}
I get a 409 Conflict with message Interaction is not in a state that allows this operation. The docs imply you can update data post-interaction, but the API seems locked down. I’ve tried waiting 5 seconds after the interaction.ended webhook fires, no luck. Is there a specific status like closed I need to wait for, or is this endpoint completely read-only once the agent hangs up? The wrapupcodes.update method in the SDK doesn’t seem to have a dedicated flag for wrap-ups either.