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

updateConversationField - Close dialog: missing parameter #153

@mseragiotto

Description

@mseragiotto

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)
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions