Genesys Cloud - Developer Community!

 View Only

Sign Up

Send Automated Greeting Message in an existing conversation in Web Messenger

  • 1.  Send Automated Greeting Message in an existing conversation in Web Messenger

    Posted 7 hours ago

    Problem Statement: I would like to send an automated greeting message to customer as soon as the agent joins the chat, just before starting a communication with a customer. As I know there is OOB feature to do this, I am trying to achieve this with different approaches. Hence, I need one assistance from you.

    Approach: 

    • Trigger a workflow on event "v2.detail.events.conversation.{id}.user.start".
    • In the workflow, I want to send the outbound message with the API /api/v2/conversations/messages/{conversationId}/communications/{communicationId}/messages. I initiated a test chat, accepted it and tried this API to send the message from API Explorer. It worked as per expectation. But when I tried to do the same with a Data Action it is throwing below error.

    Error Details: REST call for action execute failed. Message: Request to backend service failed. Response from web service: {"message":"This request requires a user context. Client credentials cannot be used for requests to this resource.","code":"bad.request","status":400,"contextId":"d1d186e9-e347-4cb3-afba-d2435d987d23","details":[],"errors":[]} [214e64f2-078d-4c13-bc97-3985f4ec4ce8]

    Please suggest some way to solve the problem.


    #Architect
    #DataActions
    #PlatformAPI
    #Triggers
    #WebMessaging

    ------------------------------
    Subhajit Podder
    NA
    ------------------------------