Skip to main content

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.

AD_4nXebuRFigLv2ar4DwRXzC46BrZTjsgsejBo5lAeZmcamNdUbT-ycaV2efxFZV8RrZQrHcCux8TEQWPYRiSKFChSk-SErYEN-IkkUtdPI3k3KpAuSrYKHdLJ2o_ly-wVzhPyZxUBS3Q?key=-ghjr1CJkUlblPi9vp8hfON2

 

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.
AD_4nXevlY8upQdLPYqJ3vguSUsdu6h4DkPGttQ8sJNDyyDyFGAU2COM4iCc2dmUWp6Nmq6U3dWR5VAd1tD6t-cEU5eyz9-hKrmMv_y6A5EycwGybJ23cN29Wksq7n6WeZF_Eo8oBIzt1A?key=-ghjr1CJkUlblPi9vp8hfON2


 

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

 

AD_4nXdzSzcObM-4jFKdR3scsjiCTVfWZDPPbhOewWvON1piivw64iJGmhPAoSEelN6u-2Eh_nYHwls19zBRRZU2hLKga2OSrbQPpUHAna6i-hn74s0gPSwCQ3XrZipOdyHw8fwrZnd_gg?key=-ghjr1CJkUlblPi9vp8hfON2

AD_4nXcC67SVjBf0xTdCVVAkNMna363gRFUFFBMrT78RiMacMZDbCYlrROTa7_wYr3zHiD6Xd5zJXy51kx5x986jc5t2q9hj9wp7vEZN-w0BsaBe1-p6fC--yLsOM2BMS4uarn2StTLGCA?key=-ghjr1CJkUlblPi9vp8hfON2

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.


 

Join the Community or User Group to Participate in this Discussion

Reply