Feat: Automations Actions (#3564)

This commit is contained in:
Tejaswini Chile
2022-01-13 11:21:06 +05:30
committed by GitHub
parent 905fd62974
commit 7df68c6388
13 changed files with 124 additions and 7 deletions

View File

@@ -4,6 +4,7 @@
#
# id :bigint not null, primary key
# actions :jsonb not null
# active :boolean default(TRUE), not null
# conditions :jsonb not null
# description :text
# event_name :string not null
@@ -23,6 +24,8 @@ class AutomationRule < ApplicationRecord
validate :json_conditions_format
validate :json_actions_format
scope :active, -> { where(active: true) }
CONDITIONS_ATTRS = %w[country_code status browser_language assignee_id team_id referer].freeze
ACTIONS_ATTRS = %w[send_message add_label send_email_to_team assign_team assign_best_agents].freeze