If you're using your own developed Embedded Framework application then you could use Javascript SDK to send the message using the Oauth token you've configured in the framework.js file.
You could even have it automatically trigger when it gets the event that a message interaction has been answered.
Don't know if the same is possible if you're using an AppFoundry app that uses Embedded Framework.
------------------------------
Jan Heinonen
Contact Center Specialist
GlobalConnect AB
------------------------------
Original Message:
Sent: 12-05-2025 10:11
From: Subhajit Podder
Subject: Send Automated Greeting Message in an existing conversation in Web Messenger
Hi Jan,
I am thinking whether it is possible to send the message from Embedded Framework where agents take chat/call. With that user's credential if we call the API to send message in that session it would be resolved. Is it possible?
Regards,
Subhajit Podder
------------------------------
Subhajit Podder
NA
Original Message:
Sent: 12-05-2025 07:25
From: Jan Heinonen
Subject: Send Automated Greeting Message in an existing conversation in Web Messenger
Hello,
You can't send messages via Data Actions since they require user context.
You would need to create a webapp (embedded into a script or as a widget) that logins as the agent which can then send a greeting message when the agent answers.
------------------------------
Jan Heinonen
Contact Center Specialist
GlobalConnect AB
Original Message:
Sent: 12-04-2025 15:47
From: Subhajit Podder
Subject: Send Automated Greeting Message in an existing conversation in Web Messenger
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
------------------------------