Incorporating the first name of the agent who last interacted with a contact into SMS copy can enhance the personalization of the message and help the recipient recognize that they are communicating with the same agent from their previous conversation.
Step 1: Journey
To dynamically reference the first name of the last handling agent, the first step is to set up a journey that will write that information to a custom property on the contact's profile.
- Start by creating a new journey (don't forget to name it, write a description, and add any relevant tags!)
- The trigger of the journey should be call.completed
- Next, add a webhook:
- Name: Add Last Handling Agent First Name to Custom Properties
- Endpoint URL: https://events.regalvoice.com/events
- Method: POST
- Custom Headers:
- Authorization : [Your API Key]
- JSON Payload:
{
"traits": {
"phone": "{{contact.contactPhone}}",
"lastHandlingAgentFirstName": "{{event.properties.agent_firstname}}"
},
"name": "Update Last Agent First Name",
"properties": {
"lastHandlingAgentFirstName": "{{event.properties.agent_firstname}}"
},
"eventSource": "Regal Journey #123"
}
-
- Save the journey
- Duplicate the journey and change the trigger to sms.conversation.completed
- This will ensure the event fires at the end of every conversation, not just voice or just SMS.
Example of the webhook:
Example of the journey:
If you don't know your API key, please reach out to support@regal.io or submit a ticket here and someone from our tech support team will provide it.
Step 2: Referencing the Property in Campaigns
To dynamically reference the property in the message content, use
{{contact.customProperties.lastHandlingAgentFirstName}}