Assign Agent

Now that we have all the agents that match the criteria, we create an Activity element to pick one of these agents for us.

Note that we're using the condition jsonsize(agents) > 0. This is to make sure that there was at least one agent returned from our searchagent(agent_criteria) function before executing this element.

And here in our example, we pick the first agent from this row of agents. You can customize this to specify a specific agent you want to be able to interact with the customer.

Schedule Callback

We create a simple Activity element with an HTTP action to vxcrm.jsp to schedule a callback.

Notice the condition __VG__CUSTOMER__.work_phone.length() == 10. You will want to customize this condition to make sure that a correct phone number has been entered into the CRM. Again, you can customize this condition to match whatever phone number you would like.

And here is the action that schedules a callback:

Now you should have a completed workflow.