Skip to main content
Skip table of contents

Events

Using the Events module in Manage → Settings → Events, you can trigger an action after an event in your PBX, by using a time condition or using the API. You can e.g. send an email to the contact centre manager when a new ticket is created. You can set up multiple actions to take and limit them using different conditions. Using the loader, you can save an object into a variable a use it in your actions, you can e.g. save the current user's object into a variable and send the user's name in an email.


Create a New Event/Edit an Event

Create a New Event/Edit an Event

Go to Manage → Settings → Events to see a list of your events.

To create a new event from scratch, click Add new.

To use an existing event as a template for your new one, click Clone in the Actions column.

To edit an event, click its title.

The event details will open.


Event Details

Event Details

Fill out the Title and Description (optional).

Under Step, choose how soon after the event start it can be started again (counted from previous start) or select the time from the drop down menu.

Select the Event type. Follow the instructions in the table below according to your chosen type.

Select whether the event should be Active. If you select No, it will not be triggered. You can also activate and deactivate events from the event list using the toggle switch.

Event type

Description

Regular

  • Event: in the first column, select where you are expecting the event to take place - see List of events by type. In the second column, select the event that will trigger the Event. If you want your event to be triggered by batch editing, turn on Use in multi-actions. If you select No and your event is e.g. ticket deletion, if you select multiple tickets and delete them in batch, the event will not be triggered.

Time condition

  • Select the Time conditions when the event will be triggered.

Custom 

There are 2 ways to use Custom events:

1. Trigger your event using the API:

  • In the Event field, enter the name that you will use to trigger the event in your API call, e.g. event1.

  • When you want to trigger the event, make an API call to the eventsLogs endpoint using the POST method. Pass the name you entered in Event using the name key.

    In this example, each part of the API call is on a new line for clarity. In practice, it should be sent as one piece.

    CODE
    https://yourcompany.daktela.com/api/v6/eventsLogs.json?
    _method=POST&
    name=event1&
    params[person]=John&
    params[deadline]=08/04/2022&
    accessToken=dfjkhfdgkj8698

  • You can use the params you send in your API call e.g. in your Templates in the format {{person}}, {{deadline}} to insert their values.


2. Trigger your event by a Daktela system event that is not available in Regular events:

  • In the Event field, enter the event trigger in the format model::action, e.g. queues::update. You can see a list of models and actions recently performed in your contact centre in Listings → Audit and Batches.

Save your event.

Don't forget to set up the Rights that can work with the event and the Actions that should happen when the event is triggered.

List of Events By Type

List of Events By Type

Event type

Event name

When the event is triggered

Available properties in Actions

Session

Logged in

When a user logs in to Daktela

  • {{user}} – username

  • {{_sys[host]}} – user IP address

  • {{_sys[aclUser]}} – username of the user who set this status for user {{user}}

  • {{time}} – time of the event

Session

Logged out

When a user logs out of Daktela

  • {{user}} – username

  • {{_sys[host]}} – user IP address

  • {{_sys[aclUser]}} – username of the user who set this status for user {{user}}

  • {{time}} – time of the event

Session

Ready

When a user goes ready

  • {{user}} – username

  • {{_sys[host]}} – user IP address

  • {{_sys[aclUser]}} – username of the user who set this status for user {{user}}

  • {{time}} – time of the event

Session

Unready

When a user goes unready

  • {{user}} – username

  • {{_sys[host]}} – user IP address

  • {{_sys[aclUser]}} – username of the user who set this status for user {{user}}

  • {{time}} – time of the event

Session

Queue logged in

When a user logs in to a queue

  • {{user}} – username

  • {{_sys[host]}} – user IP address

  • {{_sys[aclUser]}} – username of the user who set this status for user {{user}}

  • {{time}} – time of the event

Session

Queue logged out

When a user logs out of a queue

  • {{user}} – username

  • {{_sys[host]}} – user IP address

  • {{_sys[aclUser]}} – username of the user who set this status for user {{user}}

  • {{time}} – time of the event

Session

Paused

When a user starts a pause

  • {{user}} – username

  • {{_sys[host]}} – user IP address

  • {{_sys[aclUser]}} – username of the user who set this status for user {{user}}

  • {{time}} – time of the event

Session

Unpaused

When a user ends a pause

  • {{user}} – username

  • {{_sys[host]}} – user IP address

  • {{_sys[aclUser]}} – username of the user who set this status for user {{user}}

  • {{time}} – time of the event

Campaign record

Create

When a new Campaign record is created

CampaignsRecords object properties

Campaign record

Update

When a Campaign record is edited

CampaignsRecords object properties

Campaign record

Delete

When a Campaign record is deleted

CampaignsRecords object properties

Campaign record

Activity open

When an agents opens a tab with a new campaign record activity in the GUI

CampaignsRecords object properties

Campaign record

Activity skip

When an agent clicks the "Skip" button in an open campaign record activity

CampaignsRecords object properties

Campaign record

Activity update

When an agent edits a campaign record in an open campaign record activity

CampaignsRecords object properties

Ticket

Create

When a new ticket is created

Tickets object properties

Ticket

Update

When a ticket is edited

Tickets object properties

Ticket

Delete

When a ticket is deleted

Tickets object properties

Contact

Create

When a new contact is created

Contacts object properties

Contact

Update

When a contact is edited

Contacts object properties

Contact

Delete

When a contact is deleted

Contacts object properties

Account

Create

When a new account is created

Accounts object properties

Account

Update

When an account is edited

Accounts object properties

Account

Delete

When an account is deleted

Accounts object properties

CRM record

Create

When a new CRM record is created

CrmRecords object properties

CRM record

Update

When a CRM record is edited

CrmRecords object properties

CRM record

Delete

When a CRM record is deleted

CrmRecords object properties

Call

Enter queue

When a call enters a queue

ActivitiesCall object properties

Call

Outgoing

When an outgoing call is created

ActivitiesCall object properties

Call

Distribution start

When a call waiting in a queue is distributed to an available agent (starts ringing)

ActivitiesCall object properties

Call

Distribution stop

When a call waiting in a queue end a distribution cycle, before the next cycle begins

ActivitiesCall object properties

Call

Open

When the call activity is open – usually when an agent opens a tab with the activity in the GUI

ActivitiesCall object properties

Call

Answered

When an agent answers a call

ActivitiesCall object properties

Call

Terminate

When a call is ended or someone hangs up

ActivitiesCall object properties

Call

Close

When a call activity is closed – usually when an agent saves or closes a tab with an activity

ActivitiesCall object properties

Call

Hangup during IVR

When the caller ends the call during IVR

ActivitiesCall object properties

Call

DTMF


ActivitiesCall object properties

Call recordings

Delete

When a recording is deleted


Web chat

Incoming

When a customer starts a new web chat

ActivitiesWeb object properties

Web chat

Distribution start

When the distributor starts to distribute the web chat to available agents

ActivitiesWeb object properties

Web chat

Distribution stop

When the distributor stops distributing – no one answered

ActivitiesWeb object properties

Web chat

Open

When the web chat activity is opened – usually when an agent opens a tab with the activity in the GUI

ActivitiesWeb object properties

Web chat

Reject

When an agent rejects the activity

ActivitiesWeb object properties

Web chat

Terminate

When a web chat ends – usually when the customer disconnects

ActivitiesWeb object properties

Web chat

Close

When a web chat activity is closed – usually when an agent saves or closes the tab with the activity

ActivitiesWeb object properties

Web chat

Monitor

When web chat monitoring is started

ActivitiesWeb object properties

SMS

Incoming

When the customer sends an SMS

ActivitiesSms object properties

SMS

Distribution start

When the distributor starts to distribute the SMS chat to available agents

ActivitiesSms object properties

SMS

Distribution stop

When the distributor stops distributing – no one answered

ActivitiesSms object properties

SMS

Open

When the SMS activity is opened – usually when an agent opens a tab with the activity in the GUI

ActivitiesSms object properties

SMS

Reject

When an agent rejects the activity

ActivitiesSms object properties

SMS

Terminate

When an SMS chat ends – usually when the customer disconnects

ActivitiesSms object properties

SMS

Close

When an SMS chat activity is closed – usually when an agent saves or closes the tab with the activity

ActivitiesSms object properties

SMS

Postpone

When an agent postpones the activity for later

ActivitiesSms object properties

SMS

Monitor

When the supervisor starts SMS chat monitoring

ActivitiesSms object properties

Email

Incoming

When the customer sends an email

ActivitiesEmail object properties

Email

Outgoing

When an email is sent

ActivitiesEmail object properties

Email

Open

When the email activity is opened – usually when an agent opens a tab with the activity in the GUI

ActivitiesEmail object properties

Email

Postpone

When an agent postpones the activity for later

ActivitiesEmail object properties

Email

Close

When an email activity is closed – usually when an agent saves or closes the tab with the activity

ActivitiesEmail object properties

Email files

Delete

When an agent deletes an email attachment


Messenger

Incoming

When the customer sends a Messenger message

ActivitiesFbm object properties

Messenger

Outgoing

When the agent sends a Messenger message

ActivitiesFbm object properties

Messenger

Distribution start

When the distributor starts to distribute the Messenger chat to available agents

ActivitiesFbm object properties

Messenger

Distribution stop

When the distributor stops distributing – no one answered

ActivitiesFbm object properties

Messenger

Open

When the Messenger activity is opened – usually when an agent opens a tab with the activity in the GUI

ActivitiesFbm object properties

Messenger

Reject

When an agent rejects the activity

ActivitiesFbm object properties

Messenger

Terminate

When a Messenger chat ends – usually when the customer disconnects

ActivitiesFbm object properties

Messenger

Postpone

When an agent postpones the activity for later

ActivitiesFbm object properties

Messenger

Close

When a Messenger chat activity is closed – usually when an agent saves or closes the tab with the activity

ActivitiesFbm object properties

WhatsApp

Incoming

When the customer sends a WhatsApp message

ActivitiesWap object properties

WhatsApp

Outgoing

When the agent sends a WhatsApp message

ActivitiesWap object properties

WhatsApp

Distribution start

When the distributor starts to distribute the WhatsApp chat to available agents

ActivitiesWap object properties

WhatsApp

Distribution stop

When the distributor stops distributing – no one answered

ActivitiesWap object properties

WhatsApp

Open

When the WhatsApp activity is opened – usually when an agent opens a tab with the activity in the GUI

ActivitiesWap object properties

WhatsApp

Reject

When an agent rejects the activity

ActivitiesWap object properties

WhatsApp

Terminate

When a WhatsApp chat ends – usually when the customer disconnects

ActivitiesWap object properties

WhatsApp

Close

When a WhatsApp chat activity is closed – usually when an agent saves or closes the tab with the activity

ActivitiesWap object properties

Viber

Incoming

When the customer sends a Viber message

ActivitiesVbr object properties

Viber

Outgoing

When the agent sends a Viber message

ActivitiesVbr object properties

Viber

Distribution start

When the distributor starts to distribute the Viber chat to available agents

ActivitiesVbr object properties

Viber

Distribution stop

When the distributor stops distributing – no one answered

ActivitiesVbr object properties

Viber

Open

When the Viber activity is opened – usually when an agent opens a tab with the activity in the GUI

ActivitiesVbr object properties

Viber

Reject

When an agent rejects the activity

ActivitiesVbr object properties

Viber

Terminate

When a Viber chat ends – usually when the customer disconnects

ActivitiesVbr object properties

Viber

Close

When a Viber chat activity is closed – usually when an agent saves or closes the tab with the activity

ActivitiesVbr object properties

Comment

Create

When an agent adds a new comment



Set up Rights

Set up Rights

  1. In the list of your events, click Change in the Rights column. The rights settings of the given event will open.

  2. Check the rights that you want to be able to work with the event.

  3. Save your rights settings.


Set up Actions

Set up Actions

Click Change in the Actions column to open the given event's actions.

Add actions by dragging them from the right hand side column (Action, Loader, Group, Condition) and dropping them into the rectangle on the left hand side.

The Available parameters under the column with Actions shows which objects are available for this event. There is a link to the API documentation where you can find individual properties (or see List of events by type above).

Actions are run from the top down. If a condition is not met or an invalid operation is started (e.g. working with an unavailable object), the action will be terminated.

To set up your actions, we recommend also reading the Templating language documentation.

Event Simulator

You can simulate the Actions and Conditions in your event – this can come in handy if you are working with an object and you have an error in your syntax. The Simulation button is in the top right corner of Actions.

Choose an object for simulation (CRM record, campaign record, Ticket, ...) and see the available parameters and step-by-step detailed evaluation of all conditions.

Actions

Actions

You can choose different Actions that can be run after an event is triggered (you can also add conditions – see below).

Extremely complicated events might determine the whole Daktela instance performance.

Action

Description

Wait

Wait before continuing to the next step. Enter the wait time in milliseconds. 

Timeout

Block an event for a given time. The actions, conditions etc. following the timeout will only start to be run after the set time passes. E.g. if you have a cron event that is called every minute but don't want to send an email every time, you can set the timeout to e.g. 24 hours and the email will only be sent every 24 hours. 

Open URL address

Opens an external URL using the GET method. If you need to use POST/PUT/DELETE, include the parameter _method=POST/PUT/DELETE in your URL.

Only for calling the Daktela API. If you want to call your own API, it has to able to transform a GET request using the requested method as a parameter (e.g. _method).

Saving form

Save a new value in a campaign record.

Send email

Send an email. If you want to create a ticket and record your email as an activity, turn on With activity.

Turn on Queue by name, Ticket by name or Template by name to use the templating language to enter your queue, ticket or template as a variable from the object parameters.

Send SMS

Send an SMS.

Turn on Queue by name or Template by name to use the templating language to enter your queue or template as a variable from the object parameters.

Loader

Loader

Use the loader to load an object or JSON array using its identifier – you can then work with it in your actions and conditions. 

E.g. if you know a queue's identifier and want to know its title, you can use the Queue loader to load the object into the variable and then use {{queue.title}} to get the queue's title.

Loader type

Description

Ticket

Loads the Tickets object.

Record

Loads the CampaignsRecords object

Array

Loads the defined JSON array.

Contact

Loads the Contacts object.

Phone call

Loads the ActivitiesCall object.

Queue

Loads the Queues object.

User

Loads the Users object.

Group

Group

Groups are used to group together actions or conditions. You can use logical operators AND and OR.

E.g. if you want your action to be triggered by an event that can happen on several queues, you can use the logical operator OR and then drag and drop the Queue conditions into it.

Group type

Description

Break

Stop the FOREACH cycle.

Group FOREACH

Iterate over items in an array – you can use the Loader to load and array.

Group OR

Group together Actions or Conditions with logical OR between them.

Group AND

Group together Actions or Conditions with logical AND between them.

Condition

Condition

Conditions are an important part of Daktela Events. You can specify the conditions for an action to happen. E.g. you can start an action only if it is triggered by a specific agent.

Condition type

Description

Time

Specify a time interval – the condition is met if the event happens within this interval.

Queue

Specify a queue – the condition is met if the queue's object is the same as the queue you specify.

Users

Specify a user – the condition is met if the user's object is the same as the user you specify.

Regular expression

Specify the content of a text or variable (use PHP syntax).

Comparison

Compare 2 values – you can use different operators.


Examples

Examples

Missed Call Email Notification

The goal is to send an email to the helpdesk when a missed call is created in the Incoming queue.

  1. Add a new Call → Terminate event. This event will be called every time a call is ended.

  2. Set up the actions that will be triggered by the event. Since the event is a call, the ActivitiesCall object parameters are available.

Set up the following actions:

  • Condition → Queue: select the Incoming queue under Object – the email should only be sent when a missed call is created in this queue.

  • Condition → Compare: Find out if the call was answered by comparing {{answered}} = 0.

  • Actions → Send email: If the conditions above are met, send out your email.

Campaign Record Event With Event Simulator

Goal: We have an outbound campaign called OUTBOUNDER with a simple call script which holds just two customField input boxes – first_name and last_name. We want our agents to fill in the name of the customer and select the call status "Order" when they sell an item to the customer. We would like to configure an Event which will send an email to the finance department when a new sale is made. We would like to have the name of the customer in the subject of the email.

  1. Create a new Campaign Record → Activity update event that will be called every time a campaign record is updated in an activity, e.g. when an agent saves the record when a call is finished.

  2. Set up the following actions:

  • Condition → Queue: select the OUTBOUNDER queue under Object. We only want to send an email for records in this queue.

  • Condition → Comparison: compare {{statuses[0].title}} = Order – to only include records with this status.

  • Actions → Email: Specify a sender, a recipient, select a template and enter the customer's name into the subject using variables from the customFields, e.g.: New order from {{customFields.first_name[0]}} {{customFields.last_name[0]}}.

Now you can click the Simulation button, select a demo campaign record and see the available parameters.













JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.