Skip to main content

How to Route Calls to the Previously Present Agent

Ensure calls are routed to the most recent agent who communicated with the client.

V
Written by Valeriia Volobrinskaia
Updated yesterday

Learn how to set up call routing automation that ensures clients are always connected to the last agent they spoke with. This guide walks you through configuring the logic step-by-step, improving customer experience by maintaining continuity and personalizing support with every call.

User Level:

  • Admin


Routing calls to the last agent a client spoke with is a powerful strategy to enhance customer experience. This approach is especially beneficial for businesses with recurring interactions, ongoing support cases, or high-value clients. It builds trust, reduces repetition, and ensures smoother, more personalized conversations -ultimately boosting satisfaction and efficiency.

How to Set Up Routing to the Last Agent

To implement this use case effectively, the setup involves two key components working together.

  • An automation scenario in CloudTalk Workflow Automation ensures the agent who last spoke with the client is automatically assigned as their favorite agent.

  • A routing logic is configured in the Call Flow Designer to prioritise connecting incoming calls to this favorite agent.

This two-part setup guarantees both continuity and flexibility in customer interactions.

Automating Favorite Agent Assignment

  1. Navigate to Cloudtalk Dashboard -> Account -> Workflow Automation and click + Add Workflow

  2. Select Call ended as the trigger event.

  3. Define conditions to determine when a favorite agent should be assigned. For example, only after an outgoing call where conversation with contact lasted longer than 5 seconds.

  4. To assign a favorite agent to the contact profile, set up an API Request to CloudTalk’s Edit Contact endpoint. Configure the API Request action using the structure below:

    1. Endpoint:
      https://my.cloudtalk.io/api/contacts/edit/{{ event.properties.contacts[0].id }}.json

    2. Method: POST

    3. Headers:

      • Authorization: Basic your_encoded_credentials

    4. Values:

      • name → {{ event.properties.contacts[0].name }}

      • favorite_agent → {{ event.properties.agent.id }}

  5. Once all steps are configured, save the setup and activate the workflow to start assigning favorite agents automatically based on your defined conditions.

💡This setup enables assigning a favorite agent to existing contacts in your contact list. If you also need to assign agents to unknown numbers, please reach out to CloudTalk Support for guidance on the required implementation.

Prioritising Favorite Agent in Call Routing

  1. Go to your CloudTalk Dashboard → Numbers, and click the edit icon next to the number you want to apply the routing logic to.

  2. In the number details, click “Configure Call Flow” under the Sequence of steps for incoming call.

  3. Once the Call Flow Designer opens, insert the “Call Favorite Agent” step at the appropriate point in your routing sequence.

  4. Set up follow-up actions for both answered and unanswered branches, if needed (e.g., forward to team or voicemail).

  5. Save you Call flow.

💡If the contact doesn’t have a favorite agent yet, the “Call to favorite agent” step will be skipped automatically. The call will then continue with the next step you’ve set up under the “unanswered” path in your call flow.


If you have any further questions, please reach out to our Support team, we are always happy to help!


Did this answer your question?