Introduction to Daktela Events
Within the Daktela system, a large number of events are generated that allow you to set up various actions - to call the webservice, send an e-mail or SMS or edit the form. All this can be set up in nice wizard based interface. At the same time, time constraints can be set, whether to trigger an event, or a timeout when to repeat the event. This is handy when you want to be alerted (eg. by SMS) when your SLA is over some specific limit. And you are OK with just one SMS within given period of time and don't want to receive SMS every minute or so.
Some great examples or use-cases for Events are:
Send pre-formatted SMS to your customer when operator finish the order using the campaign records (call-scripts)
Call your internal CRM when operator set the specific call status on the outgoing call in some specific queue
Send pre-formatted email to your helpdesk system when operator receives a new request over the phone in some queue
- Alert your company slack channel with caller details when customer enters your incoming queue named VIP
- Send webchat transcript to Salesforce
- When ticket in category Billing is closed, update your billing software with necessary info
How to create or edit event
Events are configured under Settings → Events. You can edit existing events or add new by clicking the respective buttons. Once Event is created you can assign which Profiles should see this Event (and can modify it) and create list of Actions which should be performed by Daktela when this Event is generated.
There are several pre-build Actions which can be performed when new Event is generated.
- Open URL address - open external URL address with given parameters, you can call both POST and GET methods
- Saving form - you can save a new Campaign Record value as a result of some Event
- Send email - you can send email with given template and subject line
- Send sms - you can send sms to some number with given template
When you need to configure a bit more sophisticated Event's Action you can use logical building blocks. You can put more Conditions into the logical Group and final result will be calculated based on the logical operator. Good example can be if you need to perform some Action when some Event is generated in the Queue A1 or Queue A2. In that case you create logical Group OR and put two Queue conditions - one for Queue A1 and second for Queue A2.
- Group AND - performs logical AND
- Group OR - performs logical OR
- Group FOREACH - this construct provides an easy way to iterate over items in array
- Break - exits the FOREACH loop
Loader can load the whole structure of object based (JSON) based on the id or name of the object. Lets say you have queue id and you need to know the queue name and queue type. In that case you create Loader of type Queue and give it queue id as a parametr. You get a result with the whole queue structure - Model Queue.
Record - loading campaignsrecords object
- Contact - loading contacts object
- Queue - loading queues object
- User - loading users object
- Phone call - loading activitiescall object
Array - helper which loads specified json array into variable
Conditions are important part of the Daktela Events. Usually when some Event is generated you want the Action to be performed only when some Condition is met. For example when the Event is generated on some Queue or from some User etc.
- Time - You can specify time interval by selecting start time and end time. Event Action is performed when event is generated in the specified time interval.
- Queue - You can specify the Queue name. Event Action is performed when event is generated on the specified Queue.
- User - You can specify the User (operator) name. Event Action is performed when event is generated on the specified User.
- Regular Expression - You can specify the pattern of a regular expression (php syntax) and value.
- Comparison - You can specify first value, operator and second value.
Event simulator - Debug
Event simulator helps developers to simulate the Event as it is generated by Daktela PBX. Its a great tool for debugging, finding the name and values of Event's parameters which you can use for your scenario. Event simulator works for Events generated by CRM Contacts, CRM Accounts, CRM Records, Campaigns Records and Tickets. It simulates all the conditions, loads the objects, works with logical groups and actions which are specified. You can see the results of all comparsions, actual values of parametrs and even the Action is called when conditions are met.
Create some Event and click Simulation button.
Choose some object for simulation (CRM record, campaign record, Ticket, ...) and see the available parameters and step-by-step detailed evaluation of all conditions.
Practical example - call Event
We want to create call Event which will send email to helpdesk when missed call is created in the queue PRICHOZI.
Create event of type Call → Terminate which is called every time the call is finished.
By configuration Event's action we say what tasks we need to perform. We are working with Call type Event, so we have access to activitiescall object. First we compare the id_queue item with queue PRICHOZI, because we need to perform other actions only if its queue PRICHOZI. Then we decide if its a missed call by comparing $answered item in activitiescall object. Finally we send out email where we specify the callerid of a customer in the email subject by specifying $clid item from the activitiescall object.
Practical example - campaign record Event with Event Simulator
Goal: We have outbound campaign named OUTBOUNDER with simple callscript which holds just two input boxes - first_name and last_name. We want our operators to fill in the name of a customer and select call status Order when they sell item to the customer. We would like to configure Event which will send email to finance department when new sell is made. We would like to have a name of a customer in the email subject.
Create new Daktela Event of type Campaign Record and call it when record is updated. For example operator saves the record when call is finished.
- Add the Condition Queue - Evaluate if its OUTBOUNDER queue.
- Add the Condition Comparsion - Evaluate if the status is set to Order, please note statuses are array and thats why we have to use $statuses[title]
- Add the Email Action - Specify sender, recipient, subject and template. We want to put name of a customer to the Subject, these values are in the customFields array, thats why we have to use $customFields[first_name] $customFields[last_name]
Now you can click on Simulation button, select some demo campaign record and see the available parameters, its values and other evaluations from this example.
Table: List of all Daktela Events and its description
|Event Type||Event Name||Description - when event is called||What parameters we can use in actions|
|Call||EnterQueue||When call enters the call queue||properties of object activitiescall|
|Call||Outgoing||When outgoing call is made||properties of object activitiescall|
|When waiting call in the queue is distributed (ringed) to available operator(s).||properties of object activitiescall|
|Call||Distribution stop||When waiting call in the queue finishes the round of distribution. Before the another call distribution round is started.||properties of object activitiescall|
|Call||Open||When call activity is opened. Usually when operator opens the call activity tab in GUI.||properties of object activitiescall|
|Call||Reject||When operator rejects the call.||properties of object activitiescall|
|Call||Terminate||When call is finished or someone hangs up.||properties of object activitiescall|
|Call||Close||When call activity is closed. Usually when operator saves or closes the call activity tab in GUI.||properties of object activitiescall|
|Webchat||Incoming||When new webchat from the customer is submitted.||properties of object activitiescall|
|Webchat||Distribution start||When distributor process starting to distribute webchat to available agent(s).||properties of object activitieschat|
|Webchat||Distribution stop||When distributor process finishes the distribution round (no one picked up).||properties of object activitieschat|
|Webchat||Open||When webchat activity is opened. Usually when operator opens the webchat activity tab in GUI.||properties of object activitieschat|
|Webchat||Reject||When operator rejects the incoming webchat.||properties of object activitieschat|
|Webchat||Terminate||When webchat is finished or ended. Usually when customer disconnects.||properties of object activitieschat|
|Webchat||Close||When SMSactivity is closed. Usually when operator saves or closes the SMS tab in GUI.||properties of object activitieschat|
|SMS||Incoming||When new SMS from the customer is submitted.||properties of object activitiessms|
|SMS||Distribution start||When distributor process starting to distribute SMS to available agent(s).||properties of object activitiessms|
|SMS||Distribution stop||When distributor process finishes the distribution round (no one picked up).||properties of object activitiessms|
|SMS||Open||When SMSactivity is opened. Usually when operator opens the SMS activity tab in GUI.||properties of object activitiessms|
|SMS||Reject||When operator rejects the incoming SMS.||properties of object activitiessms|
|SMS||Terminate||When SMSis finished or ended. Usually when customer disconnects.||properties of object activitiessms|
|SMS||Close||When SMSactivity is closed. Usually when operator saves or closes the SMS tab in GUI.||properties of object activitiessms|
|Messenger||Incoming||When new Messenger chat from the customer is submitted.||properties of object activitiesfbm|
|Messenger||Distribution start||When distributor process starting to distribute Messenger chat to available agent(s).||properties of object activitiessms|
|Messenger||Distribution stop||When distributor process finishes the distribution round (no one picked up).||properties of object activitiessms|
|Messenger||Open||When Messenger chat activity is opened. Usually when operator opens the Messenger chat activity tab in GUI.||properties of object activitiessms|
|Messenger||Reject||When operator rejects the incoming Messenger chat.||properties of object activitiessms|
|Messenger||Terminate||When Messenger chat is finished or ended. Usually when customer disconnects.||properties of object activitiessms|
|Messenger||Close||When Messenger chat activity is closed. Usually when operator saves or closes the Messenger chat tab in GUI.||properties of object activitiessms|
|Ticket||Create||When new helpdesk ticket is created.||properties of object tickets|
|Ticket||Update||When helpdesk ticket is updated.||properties of object tickets|
|Ticket||Delete||When helpdesk ticket is deleted.||properties of object tickets|
|Campaign record||Create||When new campaign record is created.||properties of object campaignsrecords|
|Campaign record||Update||When new campaign record is updated.||properties of object campaignsrecords|
|Campaign record||Delete||When new campaign record is edited.||properties of object campaignsrecords|
|Campaign record||Activity open||When operator opens new activity tab with campaign record in GUI.||properties of object campaignsrecords|
|Campaign record||Activity skip||When operator clicks on the "Skip the campaign record button" in the activity window tab in GUI.||properties of object campaignsrecords|
|Campaign record||Activity update||When operator updates the campaign record in activity window tab in GUI.||properties of object campaignsrecords|
|Contact||Create||When new contact is created.||properties of object contacts|
|Contact||Update||When contact is updated.||properties of object contacts|
|Contact||Delete||When contact is deleted.||properties of object contacts|
|Account||Create||When new account is created.||properties of object accounts|
|Account||Update||When account is updated.||properties of object accounts|
|Account||Delete||When account is deleted.||properties of object accounts|
|CRM record||Create||When new CRM record is created.||properties of object crmrecords|
|CRM record||Update||When CRM record is updated.||properties of object crmrecords|
|CRM record||Delete||When CRM record is deleted.||properties of object crmrecords|
|Session||Logged in||When user logged in to Daktela.|
|Session||Logged out||When user logged out from Daktela.|
|Session||Ready||When user is set to ready state.|
|Session||Unready||When user is set to unready state.|
|Session||Queue logged in||When user is logged to the queue.|
|Session||Queue logged out||When user is logged out from the queue.|
|Session||Paused||When user is paused.|
|Session||Unpaused||When user is unpaused.|