Current scenario
Customers using Advanced Automation to send automated follow-up messages on chat want these messages to feel personalized. Currently, any automated message sent through Advanced Automation is delivered as the administrator associated with the API key used to configure the app.
Challenge faced
Native functionality does not exist
Approach
While there isn’t a native option available, it is still possible to send personalized messages using the Advanced Automation app. This method leverages the API library within Advanced Automation along with the Freshchat conversation APIs.
Before proceeding, make sure the APIs and Custom Placeholders option is enabled on the Settings page of the Advanced Automation app.
Go to the API Library section and create a new API definition.
Request Type: POST
URL: https://<companyname>.freshchat.com/v2/conversations/{conversation.id}/messages
Custom Headers:
{
"Authorization": "Bearer <Chat API key>"
}
Encoding: JSON
Content:
{
"message_parts": "
{
"text": {
"content": "<Your message goes here>"
}
}
],
"message_type": "normal",
"actor_type": "agent",
"actor_id": "{actor.id}"
}
After defining the API, configure a scheduled automation with the following parameters:
Trigger: Agent updates status to waiting on customer
Action: Trigger an API -> <API name>
Schedule: Execute actions in this automation after <X> seconds
Cancel execution of actions if any of these events occur - User sends a reply
Personalised follow up message
Callouts:
- This method utilizes APIs to provide a personalized experience. Be sure to account for Freshchat API rate limits (which vary based on your plan) and the app's request rate limit, typically capped at 50 requests per minute.