Time Based Rules
The timer based rules are executed only meeting the selected conditions.
![Timer Based Rule Timer Based Rule](../../../../images/manual/admin/4_8/timer-based-rules-tab.png)
Figure: Timer-based Rules
Create a Timer Based Rule
Perform the following steps to create a timer-based rule.
- Click "Add" to create a new rule. The following fields are displayed in the blank area.
![Add Timer Based Rule Add Timer Based Rule](../../../../images/manual/admin/4_3/automation-rule-tab-timer-create.png)
Figure: Add a Timer-based Rule
- Provide a name for the new rule.
- Provide a description for the rule.
- Select a process in which the rule will be applicable.
- After selecting, the process, you have to select the campaign in which the rule will be applicable.
- Conditions: Here, you can specify the conditions based upon which the actions will be taken. Perform the following steps.
- Click
icon in the middle of "Condition" box to add a new condition. It shows the following section.
Figure: Add a Condition
- Click "Condition" drop-down menu to select any of the following conditions.
- Queue: Select it to add a condition based upon "Queue". It contains following operators.
- is
- is not
- greater than
- less than
- Within
Figure: "Queue" Condition
Select the queue after selecting an operator.
- Current Time: Select it to add a condition based upon "Current Time". It contains following operators.
- is
- is not
- greater than
- less than
- Within
Figure: "Current Time" Condition
Provide a value in the text field after selecting an operator.
- Media Profile ID: Select it to add a condition based upon the ID of the media profile. It contains the following operators.
Figure: Condition for Media Profile
Select a media profile ID after selecting an operator.
- Subject: Select it to add a condition based upon the subject. It contains following operators.
After selecting an operator, provide a value in the adjoining text field.
- Requester Email: Select it to add a condition based upon the requester email address. It contains following operators.
- contains
- does not contain
Figure: "Request Email Address" Condition
After selecting an operator, provide a value in the adjoining text field.
- Email CC: Select it to add a condition based upon the email address in CC field. It contains following operators.
- contains
- does not contain
Figure: "Email CC" Condition
After selecting an operator, provide a value in the adjoining text field.
- Ticket Status: Select it to add a condition based upon "Ticket Status". It contains following operators.
Figure: "Ticket Status" Condition
Provide a value in the text field after selecting an operator.
- Priority: Select it to add a condition based upon "Priority". It contains following operators.
Figure: "Priority" Condition
Select an operator and then select a priority value.
- Hour Since Created: Select it to add a condition based upon the hours since the ticket has been created. It contains following operators.
- less than
- greater than
- (office hours) less than
- (office hours) greater than
Figure: "Hours Since Created" Condition
Select an operator and provide a value.
- Hour Since First Assigned: Select it to add a condition based upon the hours since the ticket has been assigned at the very first time. It contains following operators.
- less than
- greater than
- (office hours) less than
- (office hours) greater than
Figure: "Hours Since First Assigned" Condition
Select an operator and provide a value.
- Hour Since Resolved: Select it to add a condition based upon the hours since the ticket has been resolved. It contains following operators.
- less than
- greater than
- (office hours) less than
- (office hours) greater than
Figure: "Hours Since Resolved" Condition
Select an operator and provide a value.
- Hour Since Reopened: Select it to add a condition based upon the hours since the ticket has been reopened. It contains following operators.
- less than
- greater than
- (office hours) less than
- (office hours) greater than
Figure: "Hours Since Reopened" Condition
Select an operator and provide a value.
- Hour Since Unassigned: Select it to add a condition based upon the hours since the ticket has been left unassigned. It contains following operators.
- less than
- greater than
- (office hours) less than
- (office hours) greater than
Figure: "Hours Since Unassigned" Condition
Select an operator and provide a value.
- Hour Since Agent Responded: Select it to add a condition based upon the hours since the last response of agent on the ticket was sent through any medium such as chat, voice, email, or messaging. It contains following operators.
- less than
- greater than
- (office hours) less than
- (office hours) greater than
Figure: "Hours Since Agent Responded" Condition
Select an operator and provide a value.
- Hour Since Requester Responded: Select it to add a condition based upon the hours since the last response of requester was received on the ticket through any medium such as chat, voice, email, or messaging. It contains following operators.
- less than
- greater than
- (office hours) less than
- (office hours) greater than
Figure: "Hours Since Requester Responded" Condition
Select an operator and provide a value.
- Hour Since First Response Due: Select it to add a condition based upon the hours since the the ticket is due for First Response SLA. It contains following operators.
- less than
- greater than
- (office hours) less than
- (office hours) greater than
Figure: "Hours Since First Response Due" Condition
Select an operator and provide a value.
- Hour Since First Assign Due: Select it to add a condition based upon the hours elapsed since the the ticket is not assigned for the very first time. It contains following operators.
- less than
- greater than
- (office hours) less than
- (office hours) greater than
Figure: "Hours Since First Assign Due" Condition
Select an operator and provide a value.
- Hour Since Ticket Resolution Due: Select it to add a condition based upon the hours elapsed since the the ticket is due for resolution or closure. It contains following operators.
- less than
- greater than
- (office hours) less than
- (office hours) greater than
Figure: "Hours Since Ticket Resolution Due" Condition
Select an operator and provide a value.
- Requester Message Count: Select it to add a condition based upon count of requester's messages. It contains following operators.
- less than
- greater than
- (office hours) less than
- (office hours) greater than
Figure: "Requester Message Count" Condition
Select an operator and provide a value.
- Agent Message Count: Select it to add a condition based upon count of agent's messages. It contains following operators.
- less than
- greater than
- (office hours) less than
- (office hours) greater than
Figure: "Agent Message Count" Condition
Select an operator and provide a value.
- Requester Message Count (Today): Select it to add a condition based upon count of requester's messages received today. It contains following operators.
- less than
- greater than
- (office hours) less than
- (office hours) greater than
Figure: "Requester Message Count (Today)" Condition
Select an operator and provide a value.
- Customer Current Sentiment: This condition lets you filter the customers who are happy, irritated, or angry.
Select it to add a condition based upon the sentiment of customers. It contains following operators.
- is
- is not
- greater than
- less than
- Within
Figure: "Customer Current Sentiment" Condition
Select an operator and provide a value.
- Customer Overall Positive Index: This condition lets you filter the customers upon their overall positive index.
Select it to add a condition based upon a customer's overall positive index. It contains following operators.
- is
- is not
- greater than
- less than
- Within
Figure: "Customer Overall Positive Index" Condition
Select an operator and provide a value.
- Ticket Heat Index: Select it to add a condition based upon the heat index of tickets. It contains following operators.
- is
- is not
- greater than
- less than
- Within
Figure: "Ticket Heat Index" Condition
Select an operator and provide a value.
- You can add multiple conditions using the steps discussed above.
Figure: Multiple Conditions
When multiple conditions are added, the following new options are displayed on the top of "Conditions" Tab.
- Match any of the following: Select this option to match any of the conditions. The rule will be applied if one or more conditions are being matched.
- Match all of the following: Select this option to match all conditions collectively. The Rule will be applied only when all conditions are being matched, else the rule will not be applied.
You can click "X" icon on the top right corner of an condition to remove it.
- Actions: You can select actions in this section, which will be performed only upon those messages which meet the pre-selected conditions. Perform the following steps.
- Click
icon to add an action. it shows a section.
- You click the drop-down menu to select any of the following actions.
-
- Assign Ticket to Agent: Select it to assign those tickets to the selected agent which meets the pre-selected conditions.
Figure: Send Email To All Supervisors
The agents available in the previously selected campaign and process are listed in the drop-down menu. You just have to select the agent here.
- Transfer Ticket to Queue: Select it to transfer those tickets to the selected queue and the selected agent which meets the pre-selected conditions.
Figure: Transfer to Queue
Select a queue and then select any of the following option in "Assign to User" drop-down menu.
- Available Agent: Select it to transfer the ticket to the agent who is available.
- Agent Available to Take Tickets: Select it to transfer the ticket to any of the agents, who are available to take the ticket.
- Any Agent: Select it to transfer the ticket to any agent randomly irrespective of its availability status.
- Escalate Ticket: Select it to escalate the tickets which meets the pre-selected conditions.
Figure: Escalate Ticket
Select any of the following operators.
- true: Select it to escalate the ticket.
- false: Select it to not escalate the ticket.
- Priority: Select it to increase or decrease the priority of those tickets which meets the pre-selected conditions.
Figure: "Priority" Action
Select any of the following options in the drop-down menu.
- Increment: Select it to increase the priority of the ticket.
- Decrement: Select it to decrease the priority of the ticket.
- Send Email To: Select it to send an email to any recipient for those tickets which meets the pre-selected conditions.
Figure: Send Email To Action
- Enter the email address of the recipient in the very first text field.
- Select the media profile in "Media Profile" drop-down menu.
- Provide a Subject in the subject text field.
- Write a message in the text area, which you can format using the provided tools.
- You can click "Insert Placeholders" button to add the placeholders in the message body.
![Placeholders Placeholders](../../../../images/manual/admin/4_3/automation-rule-tab-event-based-add-action-send-email-to-placeholder.png)
Figure: Placeholders
- Following is screenshot of such a message.
Figure: Sample Email
- Send Email To Agent: Select it to send an email to the selected agent for those tickets which meets the pre-selected conditions.
Figure: Send Email To Agent
- All the agents in the already selected campaign and process will be listed in the drop-down menu. Select an agent to whom you want to send the email.
- Select the media profile in "Media Profile" drop-down menu.
- Provide a Subject in the subject text field.
- Write a message in the text area, which you can format using the provided tools.
- You can click "Insert Placeholders" button to add the placeholders in the message body.
![Placeholders Placeholders](../../../../images/manual/admin/4_3/automation-rule-tab-event-based-add-action-send-email-to-placeholder.png)
Figure: Placeholders
- Following is screenshot of such a message.
Figure: Sample Email
- Send Email To All Agents Assigned to Queue: Select it to send an email to all agents assigned to the queue for those tickets which meets the pre-selected conditions.
Figure: Send Email To All Agents Assgined to the Queue
- Select the media profile in "Media Profile" drop-down menu.
- Provide a Subject in the subject text field.
- Write a message in the text area, which you can format using the provided tools.
- You can click "Insert Placeholders" button to add the placeholders in the message body.
![Placeholders Placeholders](../../../../images/manual/admin/4_3/automation-rule-tab-event-based-add-action-send-email-to-placeholder.png)
Figure: Placeholders
- Following is screenshot of such a message.
Figure: Sample Email
- Send Email To Requester: Select it to send an email to the requester for those tickets which meets the pre-selected conditions.
![Send Email Send Email To Requester](../../../../images/manual/admin/4_3/automation-rule-tab-event-based-add-action-send-email-to-requester.png)
Figure: Send Email To Requester
- Select the media profile in "Media Profile" drop-down menu.
- Provide a Subject in the subject text field.
- Write a message in the text area, which you can format using the provided tools.
- You can click "Insert Placeholders" button to add the placeholders in the message body.
![Placeholders Placeholders](../../../../images/manual/admin/4_3/automation-rule-tab-event-based-add-action-send-email-to-placeholder.png)
Figure: Placeholders
- Following is screenshot of such a message.
Figure: Sample Email
- Send Email To All Supervisors: Select it to send an email to all supervisors for those tickets which meets the pre-selected conditions.
Figure: Send Email To All Supervisors
- Select the media profile in "Media Profile" drop-down menu.
- Provide a Subject in the subject text field.
- Write a message in the text area, which you can format using the provided tools.
- You can click "Insert Placeholders" button to add the placeholders in the message body.
![Placeholders Placeholders](../../../../images/manual/admin/4_3/automation-rule-tab-event-based-add-action-send-email-to-placeholder.png)
Figure: Placeholders
- Following is screenshot of such a message.
Figure: Sample Email
- Set Custom Field: Select it to set a custom field on those tickets who meet the pre-selected conditions.
Figure: Custom Field Action
Select a custom field from the provided options.
- Set Priority: Select it to set the priority of those tickets which meets the pre-selected conditions.
Figure: "Set Priority" Action
Select any of the following options in the drop-down menu.
- Set Status: Select it to set the status of those tickets which meets the pre-selected conditions.
Figure: "Set Status" Action
- HTTP Action: Select it to apply HTTP Action (also called Webhook) to trigger an external API to process those messages which meet the pre-selected conditions. Please refer to "HTTP Action" Page to know more about the same.
You can follow the same steps to add different kinds of multiple actions. They will run in sequential order from top to bottom.
-
Set Custom Field Using HTTP Action Response: Select it to allow to ask an external system to update the custom field and as a result thereof, take any additional action upon the creation or modification of a ticket.
When a custom field is hidden then also custom field is getting update, checked from the backend. And able to search the same from the advance filter even custom field is hidden for that ticket.
Sample JSON Formats
The required sample JSON formats for the following custom fields for integer, boolean, and string values, which has to be generated, after calling the API of the third-party external system are also provided.
Following is the database entry of a single Selection List Box.
custom_field_id | d625-5d094290-cf-0
column_name | CB
contact_center_id | 1
custom_field_data_type | String
custom_field_name | SSLB
custom_field_type | SingleSelectionListBox
default_value |
possible_values | ["1","2","3","4","['k']"]
process_id | 2
is_required | f
is_searchable | f
custom_field_category_id | 2
date_added | 2019-06-19 01:40:08.397
date_modified | 2019-06-26 20:51:12.223
mandatory_on_creation | f
is_editable | t
The required output from the Sample API stored in the AppServer to modify the above SingleSelectionListBox using "HTTP Response Data" should be in the following format.
JSON for Integer Type:
{d625-5d094290-cf-0:2}
JSON for String Type
{d934-5d0229ef-cf-0:\"Payment Query\"}"
The required output from the Sample API stored in the AppServer to modify the multiple Custom Fields in a ticket using "HTTP Response Data" should be in the following format.
JSON to update multiple Custom Fields
{d119-5d134249-cf-2:[1.1,1.2],d119-5d134249-cf-1:[\"string1\",\"string2\",\"string3\",\"string4\"]}
Example of Third-Party API
Following is the sample API that will be called in the test case created for this story.
<?php
echo "{d581-5d0a3128-cf-0:{\"Country\":\"New Zealand\",\"State\":\"Zero\"}}";
?>
Steps to create a HTTP Response to update a Custom Field using above Sample API
Perform the following steps.
-
The Administrator has to create or modify a Routing Rule, Event-based Rule, or Timer-based Rule.
-
Select "GET" as the method.
-
In URL, provide the URL at which the Sample API is stored in Ameyo AppServer.
-
Select "HTTP Action" as the first action in "Actions".
-
Select "Post-Request Script" tab and provide the following JavaScript Code.
variables.put("$thridPartyCustomFieldData",responseString);
The above code has to be used as-it-is in whenever you want to update the Custom Field using HTTP Response.
-
Now, click "Add New Action" button in the right corner.
-
Select "Set Custom Field Using HTTP Action Response" in the new action. Refer to the following screenshot.
![New Action New HTTP Action Response](../../../../images/relnotes/4_8/new-action-in-http-response.png)
Figure: New Action for HTTP Response
-
Click "Save".
- Following is a sample screenshot containing an Timer-Based Rule with sample details.
![Timer-Based Rule Sample Sample Timer-Based Rule](../../../../images/manual/admin/4_3/automation-rule-tab-timer-based-sample.png)
Figure: Timer-based Rule
- Click "Save" to create the rule.You can create multiple rules for same or different campaigns to filter the same or different leads using these steps.
![Added Multiple Rules](../../../../images/manual/admin/4_8_1/automation-rule-tab-timer-add-select.png)
Figure: Added Multiple Timer-based Rules
Enable or Disable the Rule
You can disable the rules. The disabled rules will be hidden, but you can make them visible. You can also enable the disabled rules.
Disable a Rule
Click the toggle
switch on a rule to disable it. It shows the following message.
![Confirm to Disable the Rule Asking to Disable the Rule](../../../../images/manual/admin/4_3/system-rules-disable.png)
Figure: Asking to disable the rule
Click "Yes" to disable the selected rule. The disabled rule will not be applied in the already selected campaign. Here, it will be hidden now.
View Disabled Rules
Click to check "View Disabled Rules" box to view its details.
![Showing Disabled Rule Displaying the Rule](../../../../images/manual/admin/4_8_1/automation-rule-tab-timer-displaying-disabled-rule.png)
Figure: Displaying the Disabled Rule
Enable a Disabled Rule
To enable a disabled rule, click the gray toggle
switch to enable it. The following message is displayed.
![Confirm to Enable the Rule Asking to Enable the Rule](../../../../images/manual/admin/4_3/system-rules-enable-message.png)
Figure: Asking to enable the rule
Click "Yes" to enable the selected rule. The enabled rule will be applied in the campaign, where it has been selected.
Edit a Timer-based Rule
Perform the following steps to edit a rule.
- Click a rule to select it and click
icon. It shows the following pop-up.
![Edit a Rule](../../../../images/manual/admin/4_3/automation-rule-tab-timer-edit.png)
Figure: Edit a Timer-based Rule
- You can make the following changes here.
- Rule Name
- Rule Description
- Process
- Campaign
- Conditions
- Actions
You have to perform the same steps here, which you have performed while creating a Timer-based Rule.
- Click "Save" to save the changes.
Rather you can click "Cancel" to discard the changes.
Delete a Timer-based Rule
The Deleted Rule cannot be retrieved back. Also, the deleted rule will not be applicable in the selected campaign.
Perform the following steps to delete a rule.
- Click to select a rule and click
icon to remove it. The following warning message is displayed on the screen.
![Delete a Rule](../../../../images/manual/admin/4_3/automation-rule-tab-event-based-delete-warning.png)
Figure: Warning before deleting a Timer-based Rule
- Click "Yes" to delete the rule.
Rather, you can click "No" to not delete the rule.