Chore: Make omnichannel settings dependent on omnichannel being enabled (#23495)

Co-authored-by: Diego Sampaio <chinello@gmail.com>
pull/23524/head^2
Kevin Aleman 4 years ago committed by GitHub
parent 9f402ac231
commit ce8870da5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 88
      app/livechat/server/config.ts
  2. 3
      ee/app/canned-responses/server/settings.ts
  3. 22
      ee/app/livechat-enterprise/server/settings.ts

@ -3,6 +3,8 @@ import { Meteor } from 'meteor/meteor';
import { SettingEditor } from '../../../definition/ISetting';
import { settingsRegistry } from '../../settings/server';
const omnichannelEnabledQuery = { _id: 'Livechat_enabled', value: true };
Meteor.startup(function() {
settingsRegistry.addGroup('Omnichannel', function() {
this.add('Livechat_enabled', true, {
@ -16,6 +18,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
section: 'Livechat',
public: true,
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_title_color', '#C1272D', {
@ -25,6 +28,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
section: 'Livechat',
public: true,
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_enable_message_character_limit', false, {
@ -32,6 +36,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
section: 'Livechat',
public: true,
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_message_character_limit', 0, {
@ -39,6 +44,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
section: 'Livechat',
public: true,
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_display_offline_form', true, {
@ -47,6 +53,7 @@ Meteor.startup(function() {
public: true,
section: 'Livechat',
i18nLabel: 'Display_offline_form',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_validate_offline_email', true, {
@ -55,6 +62,7 @@ Meteor.startup(function() {
public: true,
section: 'Livechat',
i18nLabel: 'Validate_email_address',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_offline_form_unavailable', '', {
@ -63,6 +71,7 @@ Meteor.startup(function() {
public: true,
section: 'Livechat',
i18nLabel: 'Offline_form_unavailable_message',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_offline_title', 'Leave a message', {
@ -71,7 +80,9 @@ Meteor.startup(function() {
public: true,
section: 'Livechat',
i18nLabel: 'Title',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_offline_title_color', '#666666', {
type: 'color',
editor: SettingEditor.COLOR,
@ -80,7 +91,9 @@ Meteor.startup(function() {
public: true,
section: 'Livechat',
i18nLabel: 'Color',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_offline_message', '', {
type: 'string',
group: 'Omnichannel',
@ -88,20 +101,25 @@ Meteor.startup(function() {
section: 'Livechat',
i18nLabel: 'Instructions',
i18nDescription: 'Instructions_to_your_visitor_fill_the_form_to_send_a_message',
enableQuery: omnichannelEnabledQuery,
multiline: true,
});
this.add('Livechat_offline_email', '', {
type: 'string',
group: 'Omnichannel',
i18nLabel: 'Email_address_to_send_offline_messages',
section: 'Livechat',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_offline_success_message', '', {
type: 'string',
group: 'Omnichannel',
public: true,
section: 'Livechat',
i18nLabel: 'Offline_success_message',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_allow_switching_departments', true, {
@ -110,6 +128,7 @@ Meteor.startup(function() {
public: true,
section: 'Livechat',
i18nLabel: 'Allow_switching_departments',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_show_agent_info', true, {
@ -118,6 +137,7 @@ Meteor.startup(function() {
section: 'Livechat',
public: true,
i18nLabel: 'Show_agent_info',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_show_agent_email', true, {
@ -125,7 +145,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
section: 'Livechat',
public: true,
enableQuery: { _id: 'Livechat_show_agent_info', value: true },
enableQuery: [{ _id: 'Livechat_show_agent_info', value: true }, omnichannelEnabledQuery],
i18nLabel: 'Show_agent_email',
});
@ -135,6 +155,7 @@ Meteor.startup(function() {
public: true,
i18nLabel: 'Request_comment_when_closing_conversation',
i18nDescription: 'Request_comment_when_closing_conversation_description',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_conversation_finished_message', '', {
@ -143,6 +164,7 @@ Meteor.startup(function() {
section: 'Livechat',
public: true,
i18nLabel: 'Conversation_finished_message',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_conversation_finished_text', '', {
@ -152,6 +174,7 @@ Meteor.startup(function() {
section: 'Livechat',
public: true,
i18nLabel: 'Conversation_finished_text',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_registration_form', true, {
@ -160,6 +183,7 @@ Meteor.startup(function() {
section: 'Livechat',
public: true,
i18nLabel: 'Show_preregistration_form',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_name_field_registration_form', true, {
@ -168,6 +192,7 @@ Meteor.startup(function() {
section: 'Livechat',
public: true,
i18nLabel: 'Show_name_field',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_email_field_registration_form', true, {
@ -176,20 +201,23 @@ Meteor.startup(function() {
section: 'Livechat',
public: true,
i18nLabel: 'Show_email_field',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_guest_count', 1, { type: 'int', group: 'Omnichannel' });
this.add('Livechat_guest_count', 1, { type: 'int', group: 'Omnichannel', hidden: true });
this.add('Livechat_Room_Count', 1, {
type: 'int',
group: 'Omnichannel',
i18nLabel: 'Livechat_room_count',
hidden: true,
});
this.add('Livechat_enabled_when_agent_idle', true, {
type: 'boolean',
group: 'Omnichannel',
i18nLabel: 'Accept_new_livechats_when_agent_is_idle',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_webhookUrl', '', {
@ -197,6 +225,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
section: 'CRM_Integration',
i18nLabel: 'Webhook_URL',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_secret_token', '', {
@ -205,6 +234,7 @@ Meteor.startup(function() {
section: 'CRM_Integration',
i18nLabel: 'Secret_token',
secret: true,
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_webhook_on_start', false, {
@ -212,6 +242,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
section: 'CRM_Integration',
i18nLabel: 'Send_request_on_chat_start',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_webhook_on_close', false, {
@ -219,6 +250,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
section: 'CRM_Integration',
i18nLabel: 'Send_request_on_chat_close',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_webhook_on_chat_taken', false, {
@ -226,6 +258,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
section: 'CRM_Integration',
i18nLabel: 'Send_request_on_chat_taken',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_webhook_on_chat_queued', false, {
@ -233,6 +266,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
section: 'CRM_Integration',
i18nLabel: 'Send_request_on_chat_queued',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_webhook_on_forward', false, {
@ -240,6 +274,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
section: 'CRM_Integration',
i18nLabel: 'Send_request_on_forwarding',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_webhook_on_offline_msg', false, {
@ -247,6 +282,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
section: 'CRM_Integration',
i18nLabel: 'Send_request_on_offline_messages',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_webhook_on_visitor_message', false, {
@ -254,6 +290,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
section: 'CRM_Integration',
i18nLabel: 'Send_request_on_visitor_message',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_webhook_on_agent_message', false, {
@ -261,6 +298,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
section: 'CRM_Integration',
i18nLabel: 'Send_request_on_agent_message',
enableQuery: omnichannelEnabledQuery,
});
this.add('Send_visitor_navigation_history_livechat_webhook_request', false, {
@ -269,7 +307,7 @@ Meteor.startup(function() {
section: 'CRM_Integration',
i18nLabel: 'Send_visitor_navigation_history_on_request',
i18nDescription: 'Feature_Depends_on_Livechat_Visitor_navigation_as_a_message_to_be_enabled',
enableQuery: { _id: 'Livechat_Visitor_navigation_as_a_message', value: true },
enableQuery: [{ _id: 'Livechat_Visitor_navigation_as_a_message', value: true }, omnichannelEnabledQuery],
});
this.add('Livechat_webhook_on_capture', false, {
@ -277,6 +315,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
section: 'CRM_Integration',
i18nLabel: 'Send_request_on_lead_capture',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_lead_email_regex', '\\b[A-Z0-9._%+-]+@(?:[A-Z0-9-]+\\.)+[A-Z]{2,4}\\b', {
@ -284,6 +323,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
section: 'CRM_Integration',
i18nLabel: 'Lead_capture_email_regex',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_lead_phone_regex', '((?:\\([0-9]{1,3}\\)|[0-9]{2})[ \\-]*?[0-9]{4,5}(?:[\\-\\s\\_]{1,2})?[0-9]{4}(?:(?=[^0-9])|$)|[0-9]{4,5}(?:[\\-\\s\\_]{1,2})?[0-9]{4}(?:(?=[^0-9])|$))', {
@ -291,6 +331,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
section: 'CRM_Integration',
i18nLabel: 'Lead_capture_phone_regex',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_history_monitor_type', 'url', {
@ -302,6 +343,7 @@ Meteor.startup(function() {
{ key: 'url', i18nLabel: 'Page_URL' },
{ key: 'title', i18nLabel: 'Page_title' },
],
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_Visitor_navigation_as_a_message', false, {
@ -310,6 +352,7 @@ Meteor.startup(function() {
section: 'Livechat',
public: true,
i18nLabel: 'Send_Visitor_navigation_history_as_a_message',
enableQuery: omnichannelEnabledQuery,
});
settingsRegistry.addGroup('Omnichannel', function() {
@ -319,6 +362,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
public: true,
i18nLabel: 'Business_hours_enabled',
enableQuery: omnichannelEnabledQuery,
});
});
});
@ -328,6 +372,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
public: true,
i18nLabel: 'Continuous_sound_notifications_for_new_livechat_room',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_videocall_enabled', false, {
@ -337,7 +382,7 @@ Meteor.startup(function() {
public: true,
i18nLabel: 'Videocall_enabled',
i18nDescription: 'Beta_feature_Depends_on_Video_Conference_to_be_enabled',
enableQuery: { _id: 'Jitsi_Enabled', value: true },
enableQuery: [{ _id: 'Jitsi_Enabled', value: true }, omnichannelEnabledQuery],
});
this.add('Livechat_fileupload_enabled', true, {
@ -345,7 +390,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
public: true,
i18nLabel: 'FileUpload_Enabled',
enableQuery: { _id: 'FileUpload_Enabled', value: true },
enableQuery: [{ _id: 'FileUpload_Enabled', value: true }, omnichannelEnabledQuery],
});
this.add('Livechat_enable_transcript', false, {
@ -353,6 +398,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
public: true,
i18nLabel: 'Transcript_Enabled',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_transcript_message', '', {
@ -360,7 +406,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
public: true,
i18nLabel: 'Transcript_message',
enableQuery: { _id: 'Livechat_enable_transcript', value: true },
enableQuery: [{ _id: 'Livechat_enable_transcript', value: true }, omnichannelEnabledQuery],
});
this.add('Livechat_registration_form_message', '', {
@ -369,6 +415,7 @@ Meteor.startup(function() {
section: 'Livechat',
public: true,
i18nLabel: 'Livechat_registration_form_message',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_AllowedDomainsList', '', {
@ -378,6 +425,7 @@ Meteor.startup(function() {
public: true,
i18nLabel: 'Livechat_AllowedDomainsList',
i18nDescription: 'Domains_allowed_to_embed_the_livechat_widget',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_OfflineMessageToChannel_enabled', false, {
@ -385,6 +433,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
section: 'Livechat',
public: true,
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_OfflineMessageToChannel_channel_name', '', {
@ -392,7 +441,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
section: 'Livechat',
public: true,
enableQuery: { _id: 'Livechat_OfflineMessageToChannel_enabled', value: true },
enableQuery: [{ _id: 'Livechat_OfflineMessageToChannel_enabled', value: true }, omnichannelEnabledQuery],
i18nLabel: 'Channel_name',
});
@ -400,6 +449,7 @@ Meteor.startup(function() {
type: 'boolean',
group: 'Omnichannel',
section: 'Facebook',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_Facebook_API_Key', '', {
@ -407,6 +457,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
section: 'Facebook',
i18nDescription: 'If_you_dont_have_one_send_an_email_to_omni_rocketchat_to_get_yours',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_Facebook_API_Secret', '', {
@ -414,6 +465,7 @@ Meteor.startup(function() {
group: 'Omnichannel',
section: 'Facebook',
i18nDescription: 'If_you_dont_have_one_send_an_email_to_omni_rocketchat_to_get_yours',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_RDStation_Token', '', {
@ -422,6 +474,7 @@ Meteor.startup(function() {
public: false,
section: 'RD Station',
i18nLabel: 'RDStation_Token',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_Routing_Method', 'Auto_Selection', {
@ -434,6 +487,7 @@ Meteor.startup(function() {
{ key: 'Auto_Selection', i18nLabel: 'Auto_Selection' },
{ key: 'Manual_Selection', i18nLabel: 'Manual_Selection' },
],
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_accept_chats_with_no_agents', false, {
@ -442,6 +496,7 @@ Meteor.startup(function() {
section: 'Routing',
i18nLabel: 'Accept_with_no_online_agents',
i18nDescription: 'Accept_incoming_livechat_requests_even_if_there_are_no_online_agents',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_assign_new_conversation_to_bot', false, {
@ -450,6 +505,7 @@ Meteor.startup(function() {
section: 'Routing',
i18nLabel: 'Assign_new_conversations_to_bot_agent',
i18nDescription: 'Assign_new_conversations_to_bot_agent_description',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_guest_pool_max_number_incoming_livechats_displayed', 0, {
@ -459,7 +515,7 @@ Meteor.startup(function() {
public: true,
i18nLabel: 'Max_number_incoming_livechats_displayed',
i18nDescription: 'Max_number_incoming_livechats_displayed_description',
enableQuery: { _id: 'Livechat_Routing_Method', value: 'Manual_Selection' },
enableQuery: [{ _id: 'Livechat_Routing_Method', value: 'Manual_Selection' }, omnichannelEnabledQuery],
});
this.add('Livechat_show_queue_list_link', false, {
@ -468,7 +524,7 @@ Meteor.startup(function() {
public: true,
section: 'Routing',
i18nLabel: 'Show_queue_list_to_all_agents',
enableQuery: { _id: 'Livechat_Routing_Method', value: { $ne: 'External' } },
enableQuery: [{ _id: 'Livechat_Routing_Method', value: { $ne: 'External' } }, omnichannelEnabledQuery],
});
this.add('Livechat_External_Queue_URL', '', {
@ -478,7 +534,7 @@ Meteor.startup(function() {
section: 'Routing',
i18nLabel: 'External_Queue_Service_URL',
i18nDescription: 'For_more_details_please_check_our_docs',
enableQuery: { _id: 'Livechat_Routing_Method', value: 'External' },
enableQuery: [{ _id: 'Livechat_Routing_Method', value: 'External' }, omnichannelEnabledQuery],
});
this.add('Livechat_External_Queue_Token', '', {
@ -487,7 +543,7 @@ Meteor.startup(function() {
public: false,
section: 'Routing',
i18nLabel: 'Secret_token',
enableQuery: { _id: 'Livechat_Routing_Method', value: 'External' },
enableQuery: [{ _id: 'Livechat_Routing_Method', value: 'External' }, omnichannelEnabledQuery],
});
this.add('Livechat_Allow_collect_and_store_HTTP_header_informations', false, {
@ -497,6 +553,7 @@ Meteor.startup(function() {
public: true,
i18nLabel: 'Allow_collect_and_store_HTTP_header_informations',
i18nDescription: 'Allow_collect_and_store_HTTP_header_informations_description',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_force_accept_data_processing_consent', false, {
@ -507,6 +564,7 @@ Meteor.startup(function() {
alert: 'Force_visitor_to_accept_data_processing_consent_enabled_alert',
i18nLabel: 'Force_visitor_to_accept_data_processing_consent',
i18nDescription: 'Force_visitor_to_accept_data_processing_consent_description',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_data_processing_consent_text', '', {
@ -517,7 +575,7 @@ Meteor.startup(function() {
public: true,
i18nLabel: 'Data_processing_consent_text',
i18nDescription: 'Data_processing_consent_text_description',
enableQuery: { _id: 'Livechat_force_accept_data_processing_consent', value: true },
enableQuery: [{ _id: 'Livechat_force_accept_data_processing_consent', value: true }, omnichannelEnabledQuery],
});
this.add('Livechat_agent_leave_action', 'none', {
@ -530,13 +588,14 @@ Meteor.startup(function() {
{ key: 'close', i18nLabel: 'Close' },
],
i18nLabel: 'How_to_handle_open_sessions_when_agent_goes_offline',
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_agent_leave_action_timeout', 60, {
type: 'int',
group: 'Omnichannel',
section: 'Sessions',
enableQuery: { _id: 'Livechat_agent_leave_action', value: { $ne: 'none' } },
enableQuery: [{ _id: 'Livechat_agent_leave_action', value: { $ne: 'none' } }, omnichannelEnabledQuery],
i18nLabel: 'How_long_to_wait_after_agent_goes_offline',
i18nDescription: 'Time_in_seconds',
});
@ -545,7 +604,7 @@ Meteor.startup(function() {
type: 'string',
group: 'Omnichannel',
section: 'Sessions',
enableQuery: { _id: 'Livechat_agent_leave_action', value: 'close' },
enableQuery: [{ _id: 'Livechat_agent_leave_action', value: 'close' }, omnichannelEnabledQuery],
i18nLabel: 'Comment_to_leave_on_closing_session',
});
@ -555,6 +614,7 @@ Meteor.startup(function() {
section: 'Sessions',
i18nLabel: 'How_long_to_wait_to_consider_visitor_abandonment',
i18nDescription: 'Time_in_seconds',
enableQuery: omnichannelEnabledQuery,
});
});
});

@ -1,5 +1,7 @@
import { settingsRegistry } from '../../../../app/settings/server';
const omnichannelEnabledQuery = { _id: 'Livechat_enabled', value: true };
export const createSettings = () => {
settingsRegistry.add('Canned_Responses_Enable', true, {
group: 'Omnichannel',
@ -11,5 +13,6 @@ export const createSettings = () => {
modules: [
'canned-responses',
],
enableQuery: omnichannelEnabledQuery,
});
};

@ -1,6 +1,9 @@
import { settingsRegistry } from '../../../../app/settings/server';
import { Settings } from '../../../../app/models/server';
const omnichannelEnabledQuery = { _id: 'Livechat_enabled', value: true };
const businessHoursEnabled = { _id: 'Livechat_enable_business_hours', value: true };
export const createSettings = () => {
settingsRegistry.add('Livechat_abandoned_rooms_action', 'none', {
type: 'select',
@ -17,6 +20,7 @@ export const createSettings = () => {
modules: [
'livechat-enterprise',
],
enableQuery: omnichannelEnabledQuery,
});
settingsRegistry.add('Livechat_abandoned_rooms_closed_custom_message', '', {
@ -24,7 +28,7 @@ export const createSettings = () => {
group: 'Omnichannel',
section: 'Sessions',
i18nLabel: 'Livechat_abandoned_rooms_closed_custom_message',
enableQuery: { _id: 'Livechat_abandoned_rooms_action', value: 'close' },
enableQuery: [{ _id: 'Livechat_abandoned_rooms_action', value: 'close' }, omnichannelEnabledQuery],
enterprise: true,
invalidValue: '',
modules: [
@ -41,6 +45,7 @@ export const createSettings = () => {
modules: [
'livechat-enterprise',
],
enableQuery: omnichannelEnabledQuery,
});
settingsRegistry.addGroup('Omnichannel', function() {
@ -61,6 +66,7 @@ export const createSettings = () => {
modules: [
'livechat-enterprise',
],
enableQuery: [omnichannelEnabledQuery, businessHoursEnabled],
});
});
@ -72,6 +78,7 @@ export const createSettings = () => {
i18nLabel: 'Waiting_queue',
enterprise: true,
invalidValue: false,
enableQuery: omnichannelEnabledQuery,
});
this.add('Livechat_waiting_queue_message', '', {
@ -80,7 +87,7 @@ export const createSettings = () => {
section: 'Queue_management',
i18nLabel: 'Waiting_queue_message',
i18nDescription: 'Waiting_queue_message_description',
enableQuery: { _id: 'Livechat_waiting_queue', value: true },
enableQuery: [{ _id: 'Livechat_waiting_queue', value: true }, omnichannelEnabledQuery],
enterprise: true,
invalidValue: '',
modules: [
@ -94,7 +101,7 @@ export const createSettings = () => {
section: 'Queue_management',
i18nLabel: 'Max_number_of_chats_per_agent',
i18nDescription: 'Max_number_of_chats_per_agent_description',
enableQuery: { _id: 'Livechat_waiting_queue', value: true },
enableQuery: [{ _id: 'Livechat_waiting_queue', value: true }, omnichannelEnabledQuery],
enterprise: true,
invalidValue: 0,
modules: [
@ -108,7 +115,7 @@ export const createSettings = () => {
section: 'Queue_management',
i18nLabel: 'Number_of_most_recent_chats_estimate_wait_time',
i18nDescription: 'Number_of_most_recent_chats_estimate_wait_time_description',
enableQuery: { _id: 'Livechat_waiting_queue', value: true },
enableQuery: [{ _id: 'Livechat_waiting_queue', value: true }, omnichannelEnabledQuery],
enterprise: true,
invalidValue: 100,
modules: [
@ -121,6 +128,7 @@ export const createSettings = () => {
group: 'Omnichannel',
section: 'Queue_management',
i18nLabel: 'Livechat_maximum_queue_wait_time',
enableQuery: omnichannelEnabledQuery,
i18nDescription: 'Livechat_maximum_queue_wait_time_description',
enterprise: true,
invalidValue: -1,
@ -140,6 +148,7 @@ export const createSettings = () => {
modules: [
'livechat-enterprise',
],
enableQuery: omnichannelEnabledQuery,
});
settingsRegistry.add('Livechat_auto_close_on_hold_chats_timeout', 3600, {
@ -151,13 +160,14 @@ export const createSettings = () => {
modules: [
'livechat-enterprise',
],
enableQuery: omnichannelEnabledQuery,
});
settingsRegistry.add('Livechat_auto_close_on_hold_chats_custom_message', '', {
type: 'string',
group: 'Omnichannel',
section: 'Sessions',
enableQuery: { _id: 'Livechat_auto_close_on_hold_chats_timeout', value: { $gte: 1 } },
enableQuery: [{ _id: 'Livechat_auto_close_on_hold_chats_timeout', value: { $gte: 1 } }, omnichannelEnabledQuery],
enterprise: true,
invalidValue: '',
modules: [
@ -175,6 +185,7 @@ export const createSettings = () => {
modules: [
'livechat-enterprise',
],
enableQuery: omnichannelEnabledQuery,
});
settingsRegistry.add('Livechat_auto_transfer_chat_timeout', 0, {
@ -187,6 +198,7 @@ export const createSettings = () => {
modules: [
'livechat-enterprise',
],
enableQuery: omnichannelEnabledQuery,
});
Settings.addOptionValueById('Livechat_Routing_Method', { key: 'Load_Balancing', i18nLabel: 'Load_Balancing' });

Loading…
Cancel
Save