feat: Add an action on automation to change the priority (#6925)

This commit is contained in:
Muhsin Keloth
2023-04-20 11:31:33 +05:30
committed by GitHub
parent 527042afd1
commit d1584eea72
5 changed files with 50 additions and 1 deletions

View File

@@ -16,6 +16,29 @@ const MESSAGE_CONDITION_VALUES = [
},
];
export const PRIORITY_CONDITION_VALUES = [
{
id: 'nil',
name: 'None',
},
{
id: 'low',
name: 'Low',
},
{
id: 'medium',
name: 'Medium',
},
{
id: 'high',
name: 'High',
},
{
id: 'urgent',
name: 'Urgent',
},
];
export const getCustomAttributeInputType = key => {
const customAttributeMap = {
date: 'date',
@@ -103,6 +126,7 @@ export const getActionOptions = ({ agents, teams, labels, type }) => {
assign_team: teams,
send_email_to_team: teams,
add_label: generateConditionOptions(labels, 'title'),
change_priority: PRIORITY_CONDITION_VALUES,
};
return actionsMap[type];
};

View File

@@ -575,4 +575,9 @@ export const AUTOMATION_ACTION_TYPES = [
label: 'Send a message',
inputType: 'textarea',
},
{
key: 'change_priority',
label: 'Change Priority',
inputType: 'search_select',
},
];