Quick question about setting wrap-up codes programmatically after an interaction ends.
I’m hitting a wall with the Conversations API. I need to update the wrapUpCode for a closed interaction to feed my quality scoring engine. The interaction is already in the CLOSED state.
I’m using the Node.js SDK genesys-cloud/conversations. My code looks like this:
const updatePayload = {
wrapUpCode: 'QA_REVIEW_REQUIRED',
wrapUpDuration: 15000
};
try {
await conversationsApi.patchConversation(
interactionId,
{
body: updatePayload,
'X-Genesys-Application': 'QualityScorer'
}
);
} catch (error) {
console.error('Update failed:', error.response.status, error.response.data);
}
The response is consistent:
405 Method Not Allowed
{ “code”: “405”, “message”: “Method PATCH is not allowed for this resource” }
I know I can’t modify a conversation while it’s active, but the docs imply you can update metadata after closure. I’ve tried:
- Using
PUTinstead ofPATCH(same 405). - Adding the
X-Genesys-Applicationheader (no change). - Checking the
conversationType(it’svoice).
Is there a specific endpoint I’m missing? Or is the only way to do this via the Quality API directly after the evaluation is created? I’d prefer to set the code on the conversation object itself so it’s available in the webhook payload for downstream processing.
Also, note that I’m in Asia/Seoul timezone, so I’m working late. If there’s a known workaround, please link the specific API version or SDK method. No fluff, just the fix.