Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

updateConversationField - Close dialog: missing parameter #153

Open
mseragiotto opened this issue Aug 24, 2022 · 0 comments
Open

updateConversationField - Close dialog: missing parameter #153

mseragiotto opened this issue Aug 24, 2022 · 0 comments

Comments

@mseragiotto
Copy link

I tried to implement the listed code for closing the conversation dialog and trigger the PCS bot, but was not working: conversation looks closed from consumer side, Survey in progress without any survey triggered was shown from Agent side.

Looking at the way to do the same action through Connector API (the 'unofficial' way), sounds like the closedCause parameter is missing.

By adding it, using the value 'AGENT', the PCS bot trigger works fine.

Here below the updated code to add in the readme file:

    agent.updateConversationField({
    conversationId: conversationId/dialogId,
    conversationField: [{
        field: 'DialogChange',
        type: 'UPDATE',
        dialog: {
            dialogId: conversationId/dialogId,
            state: 'CLOSE',
            closedCause: 'AGENT'
        }
    }]
}, (e, resp) => {
    if (e) { console.error(e) }
    console.log(resp)
});
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant