useSuggestion(prompt)"
>
- {{ prompt.label }}
+ {{ t(prompt.label) }}
diff --git a/app/javascript/dashboard/components-next/message/Message.vue b/app/javascript/dashboard/components-next/message/Message.vue
index 9d6b30f81..63a779a7a 100644
--- a/app/javascript/dashboard/components-next/message/Message.vue
+++ b/app/javascript/dashboard/components-next/message/Message.vue
@@ -117,7 +117,7 @@ const props = defineProps({
},
conversationId: { type: Number, required: true },
createdAt: { type: Number, required: true }, // eslint-disable-line vue/no-unused-properties
- currentUserId: { type: Number, required: true },
+ currentUserId: { type: Number, required: true }, // eslint-disable-line vue/no-unused-properties
groupWithNext: { type: Boolean, default: false },
inboxId: { type: Number, default: null }, // eslint-disable-line vue/no-unused-properties
inboxSupportsReplyTo: { type: Object, default: () => ({}) },
@@ -173,7 +173,10 @@ const variant = computed(() => {
return variants[props.messageType] || MESSAGE_VARIANTS.USER;
});
-const isMyMessage = computed(() => {
+const isBotOrAgentMessage = computed(() => {
+ if (props.messageType === MESSAGE_TYPES.ACTIVITY) {
+ return false;
+ }
// if an outgoing message is still processing, then it's definitely a
// message sent by the current user
if (
@@ -186,13 +189,10 @@ const isMyMessage = computed(() => {
const senderType = props.senderType ?? props.sender?.type;
if (!senderType || !senderId) {
- return false;
+ return true;
}
- return (
- senderType.toLowerCase() === SENDER_TYPES.USER.toLowerCase() &&
- props.currentUserId === senderId
- );
+ return senderType.toLowerCase() === SENDER_TYPES.USER.toLowerCase();
});
/**
@@ -200,7 +200,7 @@ const isMyMessage = computed(() => {
* @returns {import('vue').ComputedRef<'left'|'right'|'center'>} The computed orientation
*/
const orientation = computed(() => {
- if (isMyMessage.value) {
+ if (isBotOrAgentMessage.value) {
return ORIENTATION.RIGHT;
}
@@ -221,8 +221,8 @@ const flexOrientationClass = computed(() => {
const gridClass = computed(() => {
const map = {
- [ORIENTATION.LEFT]: 'grid grid-cols-[24px_1fr]',
- [ORIENTATION.RIGHT]: 'grid grid-cols-1fr',
+ [ORIENTATION.LEFT]: 'grid grid-cols-1fr',
+ [ORIENTATION.RIGHT]: 'grid grid-cols-[1fr_24px]',
};
return map[orientation.value];
@@ -231,13 +231,13 @@ const gridClass = computed(() => {
const gridTemplate = computed(() => {
const map = {
[ORIENTATION.LEFT]: `
- "avatar bubble"
- "spacer meta"
- `,
- [ORIENTATION.RIGHT]: `
"bubble"
"meta"
`,
+ [ORIENTATION.RIGHT]: `
+ "bubble avatar"
+ "meta spacer"
+ `,
};
return map[orientation.value];
@@ -251,7 +251,7 @@ const shouldGroupWithNext = computed(() => {
const shouldShowAvatar = computed(() => {
if (props.messageType === MESSAGE_TYPES.ACTIVITY) return false;
- if (orientation.value === ORIENTATION.RIGHT) return false;
+ if (orientation.value === ORIENTATION.LEFT) return false;
return true;
});
@@ -394,23 +394,29 @@ function handleReplyTo() {
}
const avatarInfo = computed(() => {
- if (!props.sender || props.sender.type === SENDER_TYPES.AGENT_BOT) {
+ // If no sender, return bot info
+ if (!props.sender) {
return {
name: t('CONVERSATION.BOT'),
src: '',
};
}
- if (props.sender) {
+ const { sender } = props;
+ const { name, type, avatarUrl, thumbnail } = sender || {};
+
+ // If sender type is agent bot, use avatarUrl
+ if (type === SENDER_TYPES.AGENT_BOT) {
return {
- name: props.sender.name,
- src: props.sender?.thumbnail,
+ name: name ?? '',
+ src: avatarUrl ?? '',
};
}
+ // For all other senders, use thumbnail
return {
- name: '',
- src: '',
+ name: name ?? '',
+ src: thumbnail ?? '',
};
});
@@ -438,7 +444,7 @@ provideMessageContext({
isPrivate: computed(() => props.private),
variant,
orientation,
- isMyMessage,
+ isBotOrAgentMessage,
shouldGroupWithNext,
});
@@ -470,14 +476,14 @@ provideMessageContext({
'w-full': variant === MESSAGE_VARIANTS.EMAIL,
},
]"
- class="gap-x-3"
+ class="gap-x-2"
:style="{
gridTemplateAreas: gridTemplate,
}"
>
@@ -485,7 +491,8 @@ provideMessageContext({
diff --git a/app/javascript/dashboard/components-next/message/provider.js b/app/javascript/dashboard/components-next/message/provider.js
index f4c501845..f40eaefa0 100644
--- a/app/javascript/dashboard/components-next/message/provider.js
+++ b/app/javascript/dashboard/components-next/message/provider.js
@@ -98,7 +98,7 @@ const MessageControl = Symbol('MessageControl');
* @property {import('vue').Ref} [sender=null] - The sender information
* @property {import('vue').ComputedRef} orientation - The visual variant of the message
* @property {import('vue').ComputedRef} variant - The visual variant of the message
- * @property {import('vue').ComputedRef} isMyMessage - Does the message belong to the current user
+ * @property {import('vue').ComputedRef} isBotOrAgentMessage - Does the message belong to the current user
* @property {import('vue').ComputedRef} isPrivate - Proxy computed value for private
* @property {import('vue').ComputedRef} shouldGroupWithNext - Should group with the next message or not, it is differnt from groupWithNext, this has a bypass for a failed message
*/
diff --git a/app/javascript/dashboard/components-next/selectmenu/SelectMenu.vue b/app/javascript/dashboard/components-next/selectmenu/SelectMenu.vue
index cc584dcbb..922c0069e 100644
--- a/app/javascript/dashboard/components-next/selectmenu/SelectMenu.vue
+++ b/app/javascript/dashboard/components-next/selectmenu/SelectMenu.vue
@@ -15,6 +15,13 @@ const props = defineProps({
type: String,
required: true,
},
+ subMenuPosition: {
+ type: String,
+ default: 'right',
+ validator: value => {
+ return ['right', 'left', 'bottom'].includes(value);
+ },
+ },
});
const emit = defineEmits(['update:modelValue']);
@@ -44,14 +51,21 @@ const handleSelect = value => {
trailing-icon
color="slate"
variant="faded"
- class="!w-fit"
+ class="!w-fit max-w-40"
:class="{ 'dark:!bg-n-alpha-2 !bg-n-slate-9/20': isOpen }"
:label="labelValue"
@click="toggleMenu"
/>
-import wootConstants from 'dashboard/constants/globals';
-import { mapGetters } from 'vuex';
-import FilterItem from './FilterItem.vue';
+
@@ -99,39 +135,39 @@ export default {
slate
faded
xs
- @click="toggleDropdown"
+ @click="toggleDropdown()"
/>
-
- {{
- $t('CHAT_LIST.CHAT_SORT.STATUS')
- }}
-
+
+ {{ $t('CHAT_LIST.CHAT_SORT.STATUS') }}
+
+
-
- {{
- $t('CHAT_LIST.CHAT_SORT.ORDER_BY')
- }}
-
+
+ {{ $t('CHAT_LIST.CHAT_SORT.ORDER_BY') }}
+
+
diff --git a/app/javascript/dashboard/i18n/locale/am/integrations.json b/app/javascript/dashboard/i18n/locale/am/integrations.json
index fa46b1900..b1ba1d222 100644
--- a/app/javascript/dashboard/i18n/locale/am/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/am/integrations.json
@@ -334,7 +334,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/javascript/dashboard/i18n/locale/ar/integrations.json b/app/javascript/dashboard/i18n/locale/ar/integrations.json
index 1fc3f38d2..5110af135 100644
--- a/app/javascript/dashboard/i18n/locale/ar/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/ar/integrations.json
@@ -334,7 +334,21 @@
"YOU": "أنت",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "أنت",
diff --git a/app/javascript/dashboard/i18n/locale/az/integrations.json b/app/javascript/dashboard/i18n/locale/az/integrations.json
index fa46b1900..b1ba1d222 100644
--- a/app/javascript/dashboard/i18n/locale/az/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/az/integrations.json
@@ -334,7 +334,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/javascript/dashboard/i18n/locale/bg/integrations.json b/app/javascript/dashboard/i18n/locale/bg/integrations.json
index 6432e684b..0932a3e3c 100644
--- a/app/javascript/dashboard/i18n/locale/bg/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/bg/integrations.json
@@ -334,7 +334,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/javascript/dashboard/i18n/locale/ca/integrations.json b/app/javascript/dashboard/i18n/locale/ca/integrations.json
index dd75e22c0..bf5353bbb 100644
--- a/app/javascript/dashboard/i18n/locale/ca/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/ca/integrations.json
@@ -334,7 +334,21 @@
"YOU": "Tu",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "Tu",
diff --git a/app/javascript/dashboard/i18n/locale/cs/integrations.json b/app/javascript/dashboard/i18n/locale/cs/integrations.json
index ddca19146..445de9f40 100644
--- a/app/javascript/dashboard/i18n/locale/cs/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/cs/integrations.json
@@ -334,7 +334,21 @@
"YOU": "Vy",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "Vy",
diff --git a/app/javascript/dashboard/i18n/locale/da/integrations.json b/app/javascript/dashboard/i18n/locale/da/integrations.json
index f9a46c365..edc6207f3 100644
--- a/app/javascript/dashboard/i18n/locale/da/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/da/integrations.json
@@ -334,7 +334,21 @@
"YOU": "Dig",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "Dig",
diff --git a/app/javascript/dashboard/i18n/locale/de/integrations.json b/app/javascript/dashboard/i18n/locale/de/integrations.json
index 3bab5dec5..ed634a57a 100644
--- a/app/javascript/dashboard/i18n/locale/de/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/de/integrations.json
@@ -334,7 +334,21 @@
"YOU": "Sie",
"USE": "Verwenden",
"RESET": "Zurücksetzen",
- "SELECT_ASSISTANT": "Assistent auswählen"
+ "SELECT_ASSISTANT": "Assistent auswählen",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "Sie",
diff --git a/app/javascript/dashboard/i18n/locale/el/integrations.json b/app/javascript/dashboard/i18n/locale/el/integrations.json
index f62a3dcbd..d5ba66aba 100644
--- a/app/javascript/dashboard/i18n/locale/el/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/el/integrations.json
@@ -334,7 +334,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/javascript/dashboard/i18n/locale/en/integrations.json b/app/javascript/dashboard/i18n/locale/en/integrations.json
index ed56b1669..76dd56e49 100644
--- a/app/javascript/dashboard/i18n/locale/en/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/en/integrations.json
@@ -331,7 +331,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
@@ -389,15 +403,18 @@
},
"NAME": {
"LABEL": "Name",
- "PLACEHOLDER": "Enter assistant name"
+ "PLACEHOLDER": "Enter assistant name",
+ "ERROR": "The name is required"
},
"DESCRIPTION": {
"LABEL": "Description",
- "PLACEHOLDER": "Enter assistant description"
+ "PLACEHOLDER": "Enter assistant description",
+ "ERROR": "The description is required"
},
"PRODUCT_NAME": {
"LABEL": "Product Name",
- "PLACEHOLDER": "Enter product name"
+ "PLACEHOLDER": "Enter product name",
+ "ERROR": "The product name is required"
},
"WELCOME_MESSAGE": {
"LABEL": "Welcome Message",
diff --git a/app/javascript/dashboard/i18n/locale/es/integrations.json b/app/javascript/dashboard/i18n/locale/es/integrations.json
index a086947e1..496ce36b9 100644
--- a/app/javascript/dashboard/i18n/locale/es/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/es/integrations.json
@@ -334,7 +334,21 @@
"YOU": "Tú",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "Tú",
diff --git a/app/javascript/dashboard/i18n/locale/fa/integrations.json b/app/javascript/dashboard/i18n/locale/fa/integrations.json
index ba0bba48c..d388f17b7 100644
--- a/app/javascript/dashboard/i18n/locale/fa/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/fa/integrations.json
@@ -334,7 +334,21 @@
"YOU": "شما",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "شما",
diff --git a/app/javascript/dashboard/i18n/locale/fi/integrations.json b/app/javascript/dashboard/i18n/locale/fi/integrations.json
index fa18e4a7b..61ed78700 100644
--- a/app/javascript/dashboard/i18n/locale/fi/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/fi/integrations.json
@@ -334,7 +334,21 @@
"YOU": "Sinä",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "Sinä",
diff --git a/app/javascript/dashboard/i18n/locale/fr/integrations.json b/app/javascript/dashboard/i18n/locale/fr/integrations.json
index 8e0558aaf..e810fb00d 100644
--- a/app/javascript/dashboard/i18n/locale/fr/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/fr/integrations.json
@@ -334,7 +334,21 @@
"YOU": "Vous",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "Vous",
diff --git a/app/javascript/dashboard/i18n/locale/he/integrations.json b/app/javascript/dashboard/i18n/locale/he/integrations.json
index da2c9fed5..e1544588b 100644
--- a/app/javascript/dashboard/i18n/locale/he/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/he/integrations.json
@@ -334,7 +334,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/javascript/dashboard/i18n/locale/hi/integrations.json b/app/javascript/dashboard/i18n/locale/hi/integrations.json
index b8519af8e..5474a2f1a 100644
--- a/app/javascript/dashboard/i18n/locale/hi/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/hi/integrations.json
@@ -334,7 +334,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/javascript/dashboard/i18n/locale/hr/integrations.json b/app/javascript/dashboard/i18n/locale/hr/integrations.json
index 8dde5e71c..2af0316aa 100644
--- a/app/javascript/dashboard/i18n/locale/hr/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/hr/integrations.json
@@ -334,7 +334,21 @@
"YOU": "Vi",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "Vi",
diff --git a/app/javascript/dashboard/i18n/locale/hu/integrations.json b/app/javascript/dashboard/i18n/locale/hu/integrations.json
index ef921584d..f71ae12ee 100644
--- a/app/javascript/dashboard/i18n/locale/hu/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/hu/integrations.json
@@ -334,7 +334,21 @@
"YOU": "Ön",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "Ön",
diff --git a/app/javascript/dashboard/i18n/locale/hy/integrations.json b/app/javascript/dashboard/i18n/locale/hy/integrations.json
index 90c27e381..daee18937 100644
--- a/app/javascript/dashboard/i18n/locale/hy/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/hy/integrations.json
@@ -334,7 +334,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/javascript/dashboard/i18n/locale/id/integrations.json b/app/javascript/dashboard/i18n/locale/id/integrations.json
index 6aa9c3e39..5f9ba032f 100644
--- a/app/javascript/dashboard/i18n/locale/id/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/id/integrations.json
@@ -334,7 +334,21 @@
"YOU": "Anda",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "Anda",
diff --git a/app/javascript/dashboard/i18n/locale/is/integrations.json b/app/javascript/dashboard/i18n/locale/is/integrations.json
index 66394b0b9..9036a7cd6 100644
--- a/app/javascript/dashboard/i18n/locale/is/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/is/integrations.json
@@ -334,7 +334,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/javascript/dashboard/i18n/locale/it/integrations.json b/app/javascript/dashboard/i18n/locale/it/integrations.json
index 96530c13b..4ef930b6b 100644
--- a/app/javascript/dashboard/i18n/locale/it/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/it/integrations.json
@@ -334,7 +334,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/javascript/dashboard/i18n/locale/ja/integrations.json b/app/javascript/dashboard/i18n/locale/ja/integrations.json
index a58570213..a9ed39cb7 100644
--- a/app/javascript/dashboard/i18n/locale/ja/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/ja/integrations.json
@@ -334,7 +334,21 @@
"YOU": "あなた",
"USE": "これを使用",
"RESET": "リセット",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "あなた",
diff --git a/app/javascript/dashboard/i18n/locale/ka/integrations.json b/app/javascript/dashboard/i18n/locale/ka/integrations.json
index 90c27e381..daee18937 100644
--- a/app/javascript/dashboard/i18n/locale/ka/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/ka/integrations.json
@@ -334,7 +334,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/javascript/dashboard/i18n/locale/ko/integrations.json b/app/javascript/dashboard/i18n/locale/ko/integrations.json
index 258a150aa..8050a6077 100644
--- a/app/javascript/dashboard/i18n/locale/ko/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/ko/integrations.json
@@ -334,7 +334,21 @@
"YOU": "나",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "나",
diff --git a/app/javascript/dashboard/i18n/locale/lt/integrations.json b/app/javascript/dashboard/i18n/locale/lt/integrations.json
index 4caf532bb..b091c0218 100644
--- a/app/javascript/dashboard/i18n/locale/lt/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/lt/integrations.json
@@ -334,7 +334,21 @@
"YOU": "Jūs",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "Jūs",
diff --git a/app/javascript/dashboard/i18n/locale/lv/integrations.json b/app/javascript/dashboard/i18n/locale/lv/integrations.json
index f162f7ab9..b35d1e91e 100644
--- a/app/javascript/dashboard/i18n/locale/lv/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/lv/integrations.json
@@ -334,7 +334,21 @@
"YOU": "Jūs",
"USE": "Izmantot šo",
"RESET": "Atiestatīt",
- "SELECT_ASSISTANT": "Izvēlēties Asistentu"
+ "SELECT_ASSISTANT": "Izvēlēties Asistentu",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "Jūs",
diff --git a/app/javascript/dashboard/i18n/locale/ml/integrations.json b/app/javascript/dashboard/i18n/locale/ml/integrations.json
index b08a033b2..e23550f8e 100644
--- a/app/javascript/dashboard/i18n/locale/ml/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/ml/integrations.json
@@ -334,7 +334,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/javascript/dashboard/i18n/locale/ms/integrations.json b/app/javascript/dashboard/i18n/locale/ms/integrations.json
index 1691bad11..288590bbc 100644
--- a/app/javascript/dashboard/i18n/locale/ms/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/ms/integrations.json
@@ -334,7 +334,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/javascript/dashboard/i18n/locale/ne/integrations.json b/app/javascript/dashboard/i18n/locale/ne/integrations.json
index 2504c6dde..e8c23d314 100644
--- a/app/javascript/dashboard/i18n/locale/ne/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/ne/integrations.json
@@ -334,7 +334,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/javascript/dashboard/i18n/locale/nl/integrations.json b/app/javascript/dashboard/i18n/locale/nl/integrations.json
index 31bb4efc8..4031170e4 100644
--- a/app/javascript/dashboard/i18n/locale/nl/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/nl/integrations.json
@@ -334,7 +334,21 @@
"YOU": "Jij",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "Jij",
diff --git a/app/javascript/dashboard/i18n/locale/no/integrations.json b/app/javascript/dashboard/i18n/locale/no/integrations.json
index 90f2c1b8a..12f71da4a 100644
--- a/app/javascript/dashboard/i18n/locale/no/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/no/integrations.json
@@ -334,7 +334,21 @@
"YOU": "Du",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "Du",
diff --git a/app/javascript/dashboard/i18n/locale/pl/integrations.json b/app/javascript/dashboard/i18n/locale/pl/integrations.json
index b45fb8152..8d3bc7ea0 100644
--- a/app/javascript/dashboard/i18n/locale/pl/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/pl/integrations.json
@@ -334,7 +334,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/javascript/dashboard/i18n/locale/pt/integrations.json b/app/javascript/dashboard/i18n/locale/pt/integrations.json
index 794385023..c333c89b5 100644
--- a/app/javascript/dashboard/i18n/locale/pt/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/pt/integrations.json
@@ -334,7 +334,21 @@
"YOU": "Você",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "Você",
diff --git a/app/javascript/dashboard/i18n/locale/pt_BR/inboxMgmt.json b/app/javascript/dashboard/i18n/locale/pt_BR/inboxMgmt.json
index 3b7526529..a49bc6b7e 100644
--- a/app/javascript/dashboard/i18n/locale/pt_BR/inboxMgmt.json
+++ b/app/javascript/dashboard/i18n/locale/pt_BR/inboxMgmt.json
@@ -242,8 +242,8 @@
"ERROR": "Por favor, insira um valor válido."
},
"BUSINESS_ACCOUNT_ID": {
- "LABEL": "ID da Conta de Negócios",
- "PLACEHOLDER": "Por favor, insira o ID da Conta de Negócios obtido do painel do desenvolvedor do Facebook.",
+ "LABEL": "ID da conta do WhatsApp Business",
+ "PLACEHOLDER": "Por favor, insira o ID da conta do WhatsApp Business obtido do painel do desenvolvedor do Facebook.",
"ERROR": "Por favor, insira um valor válido."
},
"WEBHOOK_VERIFY_TOKEN": {
diff --git a/app/javascript/dashboard/i18n/locale/pt_BR/integrations.json b/app/javascript/dashboard/i18n/locale/pt_BR/integrations.json
index 3dad66edd..3e73109e4 100644
--- a/app/javascript/dashboard/i18n/locale/pt_BR/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/pt_BR/integrations.json
@@ -334,7 +334,21 @@
"YOU": "Você",
"USE": "Use isto",
"RESET": "Reiniciar",
- "SELECT_ASSISTANT": "Selecione o Assistente"
+ "SELECT_ASSISTANT": "Selecione o Assistente",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Resumir esta conversa",
+ "CONTENT": "Resuma os pontos-chave discutidos entre o cliente e o agente de suporte, incluindo as preocupações do cliente, as questões e as soluções ou respostas dadas pelo agente de suporte"
+ },
+ "SUGGEST": {
+ "LABEL": "Sugerir uma resposta",
+ "CONTENT": "Analise a pergunta do cliente e elabore uma resposta que responda efetivamente às suas preocupações ou perguntas. Certifique-se de que a resposta seja clara, concisa e forneça informações úteis."
+ },
+ "RATE": {
+ "LABEL": "Avaliar esta conversa",
+ "CONTENT": "Revise a conversa para ver o quanto ela atende às necessidades do cliente. Compartilhe uma classificação de 0 a 5 com base em tom, clareza e eficácia."
+ }
+ }
},
"PLAYGROUND": {
"USER": "Você",
diff --git a/app/javascript/dashboard/i18n/locale/ro/integrations.json b/app/javascript/dashboard/i18n/locale/ro/integrations.json
index a15b6d704..460e3d12c 100644
--- a/app/javascript/dashboard/i18n/locale/ro/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/ro/integrations.json
@@ -334,7 +334,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/javascript/dashboard/i18n/locale/ru/integrations.json b/app/javascript/dashboard/i18n/locale/ru/integrations.json
index f1c08812a..4e9507f5f 100644
--- a/app/javascript/dashboard/i18n/locale/ru/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/ru/integrations.json
@@ -334,7 +334,21 @@
"YOU": "Вы",
"USE": "Использовать это",
"RESET": "Сброс",
- "SELECT_ASSISTANT": "Выбрать ассистента"
+ "SELECT_ASSISTANT": "Выбрать ассистента",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "Вы",
diff --git a/app/javascript/dashboard/i18n/locale/sh/integrations.json b/app/javascript/dashboard/i18n/locale/sh/integrations.json
index 90c27e381..daee18937 100644
--- a/app/javascript/dashboard/i18n/locale/sh/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/sh/integrations.json
@@ -334,7 +334,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/javascript/dashboard/i18n/locale/sk/integrations.json b/app/javascript/dashboard/i18n/locale/sk/integrations.json
index 608cf2337..dc3526dd7 100644
--- a/app/javascript/dashboard/i18n/locale/sk/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/sk/integrations.json
@@ -334,7 +334,21 @@
"YOU": "Vy",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "Vy",
diff --git a/app/javascript/dashboard/i18n/locale/sl/integrations.json b/app/javascript/dashboard/i18n/locale/sl/integrations.json
index c15d92b1a..dab4c00ab 100644
--- a/app/javascript/dashboard/i18n/locale/sl/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/sl/integrations.json
@@ -334,7 +334,21 @@
"YOU": "Vi",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "Vi",
diff --git a/app/javascript/dashboard/i18n/locale/sq/integrations.json b/app/javascript/dashboard/i18n/locale/sq/integrations.json
index dc4d77681..0b379ae24 100644
--- a/app/javascript/dashboard/i18n/locale/sq/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/sq/integrations.json
@@ -334,7 +334,21 @@
"YOU": "Ju",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "Ju",
diff --git a/app/javascript/dashboard/i18n/locale/sr/integrations.json b/app/javascript/dashboard/i18n/locale/sr/integrations.json
index 4eb10c036..3409e0558 100644
--- a/app/javascript/dashboard/i18n/locale/sr/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/sr/integrations.json
@@ -334,7 +334,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/javascript/dashboard/i18n/locale/sv/integrations.json b/app/javascript/dashboard/i18n/locale/sv/integrations.json
index 3947f53ff..8fbf84666 100644
--- a/app/javascript/dashboard/i18n/locale/sv/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/sv/integrations.json
@@ -334,7 +334,21 @@
"YOU": "Du",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "Du",
diff --git a/app/javascript/dashboard/i18n/locale/ta/integrations.json b/app/javascript/dashboard/i18n/locale/ta/integrations.json
index db8393bdf..5c58f914e 100644
--- a/app/javascript/dashboard/i18n/locale/ta/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/ta/integrations.json
@@ -334,7 +334,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/javascript/dashboard/i18n/locale/th/integrations.json b/app/javascript/dashboard/i18n/locale/th/integrations.json
index 7cb4345ac..9a4b8c16a 100644
--- a/app/javascript/dashboard/i18n/locale/th/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/th/integrations.json
@@ -334,7 +334,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/javascript/dashboard/i18n/locale/tl/integrations.json b/app/javascript/dashboard/i18n/locale/tl/integrations.json
index fa46b1900..b1ba1d222 100644
--- a/app/javascript/dashboard/i18n/locale/tl/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/tl/integrations.json
@@ -334,7 +334,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/javascript/dashboard/i18n/locale/tr/integrations.json b/app/javascript/dashboard/i18n/locale/tr/integrations.json
index 4b34583ba..922acb8ab 100644
--- a/app/javascript/dashboard/i18n/locale/tr/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/tr/integrations.json
@@ -334,7 +334,21 @@
"YOU": "Sen",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "Sen",
diff --git a/app/javascript/dashboard/i18n/locale/uk/integrations.json b/app/javascript/dashboard/i18n/locale/uk/integrations.json
index b357294bd..78ccb4818 100644
--- a/app/javascript/dashboard/i18n/locale/uk/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/uk/integrations.json
@@ -334,7 +334,21 @@
"YOU": "Ви",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "Ви",
diff --git a/app/javascript/dashboard/i18n/locale/ur/integrations.json b/app/javascript/dashboard/i18n/locale/ur/integrations.json
index ddaa0a2bf..639a27b25 100644
--- a/app/javascript/dashboard/i18n/locale/ur/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/ur/integrations.json
@@ -334,7 +334,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/javascript/dashboard/i18n/locale/ur_IN/integrations.json b/app/javascript/dashboard/i18n/locale/ur_IN/integrations.json
index 90c27e381..daee18937 100644
--- a/app/javascript/dashboard/i18n/locale/ur_IN/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/ur_IN/integrations.json
@@ -334,7 +334,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/javascript/dashboard/i18n/locale/vi/integrations.json b/app/javascript/dashboard/i18n/locale/vi/integrations.json
index b077b8da3..2226348ba 100644
--- a/app/javascript/dashboard/i18n/locale/vi/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/vi/integrations.json
@@ -334,7 +334,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/javascript/dashboard/i18n/locale/zh_CN/integrations.json b/app/javascript/dashboard/i18n/locale/zh_CN/integrations.json
index a41eb6cde..2504327b6 100644
--- a/app/javascript/dashboard/i18n/locale/zh_CN/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/zh_CN/integrations.json
@@ -334,7 +334,21 @@
"YOU": "您",
"USE": "使用此",
"RESET": "重置",
- "SELECT_ASSISTANT": "选择助手"
+ "SELECT_ASSISTANT": "选择助手",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "您",
diff --git a/app/javascript/dashboard/i18n/locale/zh_TW/integrations.json b/app/javascript/dashboard/i18n/locale/zh_TW/integrations.json
index 6e7331dbf..7b4829c54 100644
--- a/app/javascript/dashboard/i18n/locale/zh_TW/integrations.json
+++ b/app/javascript/dashboard/i18n/locale/zh_TW/integrations.json
@@ -334,7 +334,21 @@
"YOU": "You",
"USE": "Use this",
"RESET": "Reset",
- "SELECT_ASSISTANT": "Select Assistant"
+ "SELECT_ASSISTANT": "Select Assistant",
+ "PROMPTS": {
+ "SUMMARIZE": {
+ "LABEL": "Summarize this conversation",
+ "CONTENT": "Summarize the key points discussed between the customer and the support agent, including the customer's concerns, questions, and the solutions or responses provided by the support agent"
+ },
+ "SUGGEST": {
+ "LABEL": "Suggest an answer",
+ "CONTENT": "Analyze the customer's inquiry, and draft a response that effectively addresses their concerns or questions. Ensure the reply is clear, concise, and provides helpful information."
+ },
+ "RATE": {
+ "LABEL": "Rate this conversation",
+ "CONTENT": "Review the conversation to see how well it meets the customer's needs. Share a rating out of 5 based on tone, clarity, and effectiveness."
+ }
+ }
},
"PLAYGROUND": {
"USER": "You",
diff --git a/app/jobs/internal/process_stale_contacts_job.rb b/app/jobs/internal/process_stale_contacts_job.rb
index eaf53be75..a40e73a01 100644
--- a/app/jobs/internal/process_stale_contacts_job.rb
+++ b/app/jobs/internal/process_stale_contacts_job.rb
@@ -8,6 +8,8 @@ class Internal::ProcessStaleContactsJob < ApplicationJob
queue_as :scheduled_jobs
def perform
+ return unless ChatwootApp.chatwoot_cloud?
+
Account.find_in_batches(batch_size: 100) do |accounts|
accounts.each do |account|
Rails.logger.info "Enqueuing RemoveStaleContactsJob for account #{account.id}"
diff --git a/app/services/instagram/message_text.rb b/app/services/instagram/message_text.rb
index c3978f2ee..66445f5a5 100644
--- a/app/services/instagram/message_text.rb
+++ b/app/services/instagram/message_text.rb
@@ -44,7 +44,7 @@ class Instagram::MessageText < Instagram::BaseMessageText
Rails.logger.warn("[InstagramUserFetchError]: account_id #{@inbox.account_id} inbox_id #{@inbox.id}")
Rails.logger.warn("[InstagramUserFetchError]: #{error_message} #{error_code}")
- ChatwootExceptionTracker.new(error, account: @inbox.account).capture_exception
+ ChatwootExceptionTracker.new(parsed_response, account: @inbox.account).capture_exception
end
def base_uri
diff --git a/config/schedule.yml b/config/schedule.yml
index f86015de6..afb9d98c7 100644
--- a/config/schedule.yml
+++ b/config/schedule.yml
@@ -33,9 +33,9 @@ remove_stale_redis_keys_job.rb:
class: 'Internal::RemoveStaleRedisKeysJob'
queue: scheduled_jobs
-# executed daily at 2230 UTC
-# which is our lowest traffic time
-# process_stale_contacts_job:
-# cron: '30 22 * * *'
-# class: 'Internal::ProcessStaleContactsJob'
-# queue: scheduled_jobs
+#executed daily at 0430 UTC
+# which will be IST 10:00 AM
+process_stale_contacts_job:
+ cron: '30 04 * * *'
+ class: 'Internal::ProcessStaleContactsJob'
+ queue: scheduled_jobs
diff --git a/lib/tasks/generate_test_data.rake b/lib/tasks/generate_test_data.rake
new file mode 100644
index 000000000..898ed340d
--- /dev/null
+++ b/lib/tasks/generate_test_data.rake
@@ -0,0 +1,30 @@
+require_relative '../test_data'
+
+namespace :data do
+ desc 'Generate large, distributed test data'
+ task generate_distributed_data: :environment do
+ if Rails.env.production?
+ puts 'Generating large amounts of data in production can have serious performance implications.'
+ puts 'Exiting to avoid impacting a live environment.'
+ exit
+ end
+
+ # Configure logger
+ Rails.logger = ActiveSupport::Logger.new($stdout)
+ Rails.logger.formatter = proc do |severity, datetime, _progname, msg|
+ "#{datetime.strftime('%Y-%m-%d %H:%M:%S.%L')} #{severity}: #{msg}\n"
+ end
+
+ begin
+ TestData::DatabaseOptimizer.setup
+ TestData.generate
+ ensure
+ TestData::DatabaseOptimizer.restore
+ end
+ end
+
+ desc 'Clean up existing test data'
+ task cleanup_test_data: :environment do
+ TestData.cleanup
+ end
+end
diff --git a/lib/test_data.rb b/lib/test_data.rb
new file mode 100644
index 000000000..f797029dc
--- /dev/null
+++ b/lib/test_data.rb
@@ -0,0 +1,18 @@
+module TestData
+ def self.generate
+ Orchestrator.call
+ end
+
+ def self.cleanup
+ CleanupService.call
+ end
+end
+
+require_relative 'test_data/constants'
+require_relative 'test_data/database_optimizer'
+require_relative 'test_data/cleanup_service'
+require_relative 'test_data/account_creator'
+require_relative 'test_data/inbox_creator'
+require_relative 'test_data/display_id_tracker'
+require_relative 'test_data/contact_batch_service'
+require_relative 'test_data/orchestrator'
diff --git a/lib/test_data/account_creator.rb b/lib/test_data/account_creator.rb
new file mode 100644
index 000000000..13540ce91
--- /dev/null
+++ b/lib/test_data/account_creator.rb
@@ -0,0 +1,31 @@
+class TestData::AccountCreator
+ DATA_FILE = 'tmp/test_data_account_ids.txt'.freeze
+
+ def self.create!(id)
+ company_name = generate_company_name
+ domain = generate_domain(company_name)
+ account = Account.create!(
+ id: id,
+ name: company_name,
+ domain: domain,
+ created_at: Faker::Time.between(from: 2.years.ago, to: 6.months.ago)
+ )
+ persist_account_id(account.id)
+ account
+ end
+
+ def self.generate_company_name
+ "#{Faker::Company.name} #{TestData::Constants::COMPANY_TYPES.sample}"
+ end
+
+ def self.generate_domain(company_name)
+ "#{company_name.parameterize}.#{TestData::Constants::DOMAIN_EXTENSIONS.sample}"
+ end
+
+ def self.persist_account_id(account_id)
+ FileUtils.mkdir_p('tmp')
+ File.open(DATA_FILE, 'a') do |file|
+ file.write("#{account_id},")
+ end
+ end
+end
diff --git a/lib/test_data/cleanup_service.rb b/lib/test_data/cleanup_service.rb
new file mode 100644
index 000000000..6f952ec2c
--- /dev/null
+++ b/lib/test_data/cleanup_service.rb
@@ -0,0 +1,51 @@
+class TestData::CleanupService
+ DATA_FILE = 'tmp/test_data_account_ids.txt'.freeze
+
+ class << self
+ def call
+ Rails.logger.info 'Cleaning up any existing test data...'
+
+ return log_no_file_found unless file_exists?
+
+ account_ids = parse_account_ids_from_file
+
+ if account_ids.any?
+ delete_accounts(account_ids)
+ else
+ log_no_accounts_found
+ end
+
+ delete_data_file
+ Rails.logger.info '==> Cleanup complete!'
+ end
+
+ private
+
+ def file_exists?
+ File.exist?(DATA_FILE)
+ end
+
+ def log_no_file_found
+ Rails.logger.info 'No test data file found, skipping cleanup'
+ end
+
+ def parse_account_ids_from_file
+ File.read(DATA_FILE).split(',').map(&:strip).reject(&:empty?).map(&:to_i)
+ end
+
+ def delete_accounts(account_ids)
+ Rails.logger.info "Found #{account_ids.size} test accounts to clean up: #{account_ids.join(', ')}"
+ start_time = Time.zone.now
+ Account.where(id: account_ids).destroy_all
+ Rails.logger.info "Deleted #{account_ids.size} accounts in #{Time.zone.now - start_time}s"
+ end
+
+ def log_no_accounts_found
+ Rails.logger.info 'No test account IDs found in the data file'
+ end
+
+ def delete_data_file
+ File.delete(DATA_FILE)
+ end
+ end
+end
diff --git a/lib/test_data/constants.rb b/lib/test_data/constants.rb
new file mode 100644
index 000000000..0ef15dc2e
--- /dev/null
+++ b/lib/test_data/constants.rb
@@ -0,0 +1,18 @@
+module TestData::Constants
+ NUM_ACCOUNTS = 20
+ MIN_MESSAGES = 1_000_000 # 1M
+ MAX_MESSAGES = 10_000_000 # 10M
+ BATCH_SIZE = 5_000
+
+ MAX_CONVERSATIONS_PER_CONTACT = 20
+ INBOXES_PER_ACCOUNT = 5
+ STATUSES = %w[open resolved pending].freeze
+ MESSAGE_TYPES = %w[incoming outgoing].freeze
+
+ MIN_MESSAGES_PER_CONVO = 5
+ MAX_MESSAGES_PER_CONVO = 50
+
+ COMPANY_TYPES = %w[Retail Healthcare Finance Education Manufacturing].freeze
+ DOMAIN_EXTENSIONS = %w[com io tech ai].freeze
+ COUNTRY_CODES = %w[1 44 91 61 81 86 49 33 34 39].freeze # US, UK, India, Australia, Japan, China, Germany, France, Spain, Italy
+end
diff --git a/lib/test_data/contact_batch_service.rb b/lib/test_data/contact_batch_service.rb
new file mode 100644
index 000000000..eaa41b5c4
--- /dev/null
+++ b/lib/test_data/contact_batch_service.rb
@@ -0,0 +1,196 @@
+class TestData::ContactBatchService
+ def initialize(account:, inboxes:, batch_size:, display_id_tracker:)
+ @account = account
+ @inboxes = inboxes
+ @batch_size = batch_size
+ @display_id_tracker = display_id_tracker
+ @total_messages = 0
+ end
+
+ # Generates contacts, contact_inboxes, conversations, and messages
+ # Returns the total number of messages created in this batch
+ def generate!
+ Rails.logger.info { "Starting batch generation for account ##{@account.id} with #{@batch_size} contacts" }
+
+ create_contacts
+ create_contact_inboxes
+ create_conversations
+ create_messages
+
+ Rails.logger.info { "Completed batch with #{@total_messages} messages for account ##{@account.id}" }
+ @total_messages
+ end
+
+ private
+
+ # rubocop:disable Rails/SkipsModelValidations
+ def create_contacts
+ Rails.logger.info { "Creating #{@batch_size} contacts for account ##{@account.id}" }
+ start_time = Time.current
+
+ @contacts_data = Array.new(@batch_size) { build_contact_data }
+ Contact.insert_all!(@contacts_data) if @contacts_data.any?
+ @contacts = Contact
+ .where(account_id: @account.id)
+ .order(created_at: :desc)
+ .limit(@batch_size)
+
+ Rails.logger.info { "Contacts created in #{Time.current - start_time}s" }
+ end
+ # rubocop:enable Rails/SkipsModelValidations
+
+ def build_contact_data
+ created_at = Faker::Time.between(from: 1.year.ago, to: Time.current)
+ {
+ account_id: @account.id,
+ name: Faker::Name.name,
+ email: "#{SecureRandom.uuid}@example.com",
+ phone_number: generate_e164_phone_number,
+ additional_attributes: maybe_add_additional_attributes,
+ created_at: created_at,
+ updated_at: created_at
+ }
+ end
+
+ def maybe_add_additional_attributes
+ return unless rand < 0.3
+
+ {
+ company: Faker::Company.name,
+ city: Faker::Address.city,
+ country: Faker::Address.country_code
+ }
+ end
+
+ def generate_e164_phone_number
+ return nil unless rand < 0.7
+
+ country_code = TestData::Constants::COUNTRY_CODES.sample
+ subscriber_number = rand(1_000_000..9_999_999_999).to_s
+ subscriber_number = subscriber_number[0...(15 - country_code.length)]
+ "+#{country_code}#{subscriber_number}"
+ end
+
+ # rubocop:disable Rails/SkipsModelValidations
+ def create_contact_inboxes
+ Rails.logger.info { "Creating contact inboxes for #{@contacts.size} contacts" }
+ start_time = Time.current
+
+ contact_inboxes_data = @contacts.flat_map do |contact|
+ @inboxes.map do |inbox|
+ {
+ inbox_id: inbox.id,
+ contact_id: contact.id,
+ source_id: SecureRandom.uuid,
+ created_at: contact.created_at,
+ updated_at: contact.created_at
+ }
+ end
+ end
+
+ count = contact_inboxes_data.size
+ ContactInbox.insert_all!(contact_inboxes_data) if contact_inboxes_data.any?
+ @contact_inboxes = ContactInbox.where(contact_id: @contacts.pluck(:id))
+
+ Rails.logger.info { "Created #{count} contact inboxes in #{Time.current - start_time}s" }
+ end
+ # rubocop:enable Rails/SkipsModelValidations
+
+ # rubocop:disable Rails/SkipsModelValidations
+ def create_conversations
+ Rails.logger.info { "Creating conversations for account ##{@account.id}" }
+ start_time = Time.current
+
+ conversations_data = []
+ @contact_inboxes.each do |ci|
+ num_convos = rand(1..TestData::Constants::MAX_CONVERSATIONS_PER_CONTACT)
+ num_convos.times { conversations_data << build_conversation(ci) }
+ end
+
+ count = conversations_data.size
+ Rails.logger.info { "Preparing to insert #{count} conversations" }
+
+ Conversation.insert_all!(conversations_data) if conversations_data.any?
+ @conversations = Conversation.where(
+ account_id: @account.id,
+ display_id: conversations_data.pluck(:display_id)
+ ).order(:created_at)
+
+ Rails.logger.info { "Created #{count} conversations in #{Time.current - start_time}s" }
+ end
+ # rubocop:enable Rails/SkipsModelValidations
+
+ def build_conversation(contact_inbox)
+ created_at = Faker::Time.between(from: contact_inbox.created_at, to: Time.current)
+ {
+ account_id: @account.id,
+ inbox_id: contact_inbox.inbox_id,
+ contact_id: contact_inbox.contact_id,
+ contact_inbox_id: contact_inbox.id,
+ status: TestData::Constants::STATUSES.sample,
+ created_at: created_at,
+ updated_at: created_at,
+ display_id: @display_id_tracker.next_id
+ }
+ end
+
+ # rubocop:disable Rails/SkipsModelValidations
+ def create_messages
+ Rails.logger.info { "Creating messages for #{@conversations.size} conversations" }
+ start_time = Time.current
+
+ batch_count = 0
+ @conversations.find_in_batches(batch_size: 1000) do |batch|
+ batch_count += 1
+ batch_start = Time.current
+
+ messages_data = batch.flat_map do |convo|
+ build_messages_for_conversation(convo)
+ end
+
+ batch_message_count = messages_data.size
+ Rails.logger.info { "Preparing to insert #{batch_message_count} messages (batch #{batch_count})" }
+
+ Message.insert_all!(messages_data) if messages_data.any?
+ @total_messages += batch_message_count
+
+ Rails.logger.info { "Created batch #{batch_count} with #{batch_message_count} messages in #{Time.current - batch_start}s" }
+ end
+
+ Rails.logger.info { "Created total of #{@total_messages} messages in #{Time.current - start_time}s" }
+ end
+ # rubocop:enable Rails/SkipsModelValidations
+
+ def build_messages_for_conversation(conversation)
+ num_messages = rand(TestData::Constants::MIN_MESSAGES_PER_CONVO..TestData::Constants::MAX_MESSAGES_PER_CONVO)
+ message_type = TestData::Constants::MESSAGE_TYPES.sample
+ time_range = [conversation.created_at, Time.current]
+ generate_messages(conversation, num_messages, message_type, time_range)
+ end
+
+ def generate_messages(conversation, num_messages, initial_message_type, time_range)
+ message_type = initial_message_type
+
+ Array.new(num_messages) do
+ message_type = (message_type == 'incoming' ? 'outgoing' : 'incoming')
+ created_at = Faker::Time.between(from: time_range.first, to: time_range.last)
+ build_message_data(conversation, message_type, created_at)
+ end
+ end
+
+ def build_message_data(conversation, message_type, created_at)
+ {
+ account_id: @account.id,
+ inbox_id: conversation.inbox_id,
+ conversation_id: conversation.id,
+ message_type: message_type,
+ content: Faker::Lorem.paragraph(sentence_count: 2),
+ created_at: created_at,
+ updated_at: created_at,
+ private: false,
+ status: 'sent',
+ content_type: 'text',
+ source_id: SecureRandom.uuid
+ }
+ end
+end
diff --git a/lib/test_data/database_optimizer.rb b/lib/test_data/database_optimizer.rb
new file mode 100644
index 000000000..f3fd42f7b
--- /dev/null
+++ b/lib/test_data/database_optimizer.rb
@@ -0,0 +1,80 @@
+class TestData::DatabaseOptimizer
+ class << self
+ # Tables that need trigger management
+ TABLES_WITH_TRIGGERS = %w[conversations messages].freeze
+
+ # Memory settings in MB
+ # Increased work_mem for better query performance with complex operations
+ WORK_MEM = 256
+
+ def setup
+ Rails.logger.info '==> Setting up database optimizations for improved performance'
+
+ # Remove statement timeout to allow long-running operations to complete
+ Rails.logger.info ' Removing statement timeout'
+ ActiveRecord::Base.connection.execute('SET statement_timeout = 0')
+
+ # Increase working memory for better query performance
+ Rails.logger.info " Increasing work_mem to #{WORK_MEM}MB"
+ ActiveRecord::Base.connection.execute("SET work_mem = '#{WORK_MEM}MB'")
+
+ # Set tables to UNLOGGED mode for better write performance
+ # This disables WAL completely for these tables
+ Rails.logger.info ' Setting tables to UNLOGGED mode'
+ set_tables_unlogged
+
+ # Disable triggers on specified tables to avoid overhead
+ Rails.logger.info ' Disabling triggers on specified tables'
+ disable_triggers
+
+ Rails.logger.info '==> Database optimizations complete, data generation will run faster'
+ end
+
+ def restore
+ Rails.logger.info '==> Restoring database settings to normal'
+
+ Rails.logger.info ' Re-enabling triggers on specified tables'
+ enable_triggers
+
+ Rails.logger.info ' Setting tables back to LOGGED mode'
+ set_tables_logged
+
+ # Reset memory settings to defaults
+ Rails.logger.info ' Resetting memory settings to defaults'
+ ActiveRecord::Base.connection.execute('RESET work_mem')
+ ActiveRecord::Base.connection.execute('RESET maintenance_work_mem')
+
+ Rails.logger.info '==> Database settings restored to normal operation'
+ end
+
+ private
+
+ def disable_triggers
+ TABLES_WITH_TRIGGERS.each do |table|
+ Rails.logger.info " Disabling triggers on #{table} table"
+ ActiveRecord::Base.connection.execute("ALTER TABLE #{table} DISABLE TRIGGER ALL")
+ end
+ end
+
+ def enable_triggers
+ TABLES_WITH_TRIGGERS.each do |table|
+ Rails.logger.info " Enabling triggers on #{table} table"
+ ActiveRecord::Base.connection.execute("ALTER TABLE #{table} ENABLE TRIGGER ALL")
+ end
+ end
+
+ def set_tables_unlogged
+ TABLES_WITH_TRIGGERS.each do |table|
+ Rails.logger.info " Setting #{table} table as UNLOGGED"
+ ActiveRecord::Base.connection.execute("ALTER TABLE #{table} SET UNLOGGED")
+ end
+ end
+
+ def set_tables_logged
+ TABLES_WITH_TRIGGERS.each do |table|
+ Rails.logger.info " Setting #{table} table as LOGGED"
+ ActiveRecord::Base.connection.execute("ALTER TABLE #{table} SET LOGGED")
+ end
+ end
+ end
+end
diff --git a/lib/test_data/display_id_tracker.rb b/lib/test_data/display_id_tracker.rb
new file mode 100644
index 000000000..04ea406b0
--- /dev/null
+++ b/lib/test_data/display_id_tracker.rb
@@ -0,0 +1,12 @@
+class TestData::DisplayIdTracker
+ attr_reader :current
+
+ def initialize(account:)
+ max_display_id = Conversation.where(account_id: account.id).maximum(:display_id) || 0
+ @current = max_display_id
+ end
+
+ def next_id
+ @current += 1
+ end
+end
diff --git a/lib/test_data/inbox_creator.rb b/lib/test_data/inbox_creator.rb
new file mode 100644
index 000000000..4ece7624e
--- /dev/null
+++ b/lib/test_data/inbox_creator.rb
@@ -0,0 +1,12 @@
+class TestData::InboxCreator
+ def self.create_for(account)
+ Array.new(TestData::Constants::INBOXES_PER_ACCOUNT) do
+ channel = Channel::Api.create!(account: account)
+ Inbox.create!(
+ account_id: account.id,
+ name: "API Inbox #{SecureRandom.hex(4)}",
+ channel: channel
+ )
+ end
+ end
+end
diff --git a/lib/test_data/orchestrator.rb b/lib/test_data/orchestrator.rb
new file mode 100644
index 000000000..996713d5b
--- /dev/null
+++ b/lib/test_data/orchestrator.rb
@@ -0,0 +1,109 @@
+class TestData::Orchestrator
+ class << self
+ def call
+ Rails.logger.info { '========== STARTING TEST DATA GENERATION ==========' }
+
+ cleanup_existing_data
+ set_start_id
+
+ Rails.logger.info { "Starting to generate distributed test data across #{TestData::Constants::NUM_ACCOUNTS} accounts..." }
+ Rails.logger.info do
+ "Each account have between #{TestData::Constants::MIN_MESSAGES / 1_000_000}M and #{TestData::Constants::MAX_MESSAGES / 1_000_000}M messages"
+ end
+
+ TestData::Constants::NUM_ACCOUNTS.times do |account_index|
+ Rails.logger.info { "Processing account #{account_index + 1} of #{TestData::Constants::NUM_ACCOUNTS}" }
+ process_account(account_index)
+ end
+
+ Rails.logger.info { "========== ALL DONE! Created #{TestData::Constants::NUM_ACCOUNTS} accounts with distributed test data ==========" }
+ end
+
+ private
+
+ # Simple value object to group generation parameters
+ class DataGenerationParams
+ attr_reader :account, :inboxes, :total_contacts_needed, :target_message_count, :display_id_tracker
+
+ def initialize(account:, inboxes:, total_contacts_needed:, target_message_count:, display_id_tracker:)
+ @account = account
+ @inboxes = inboxes
+ @total_contacts_needed = total_contacts_needed
+ @target_message_count = target_message_count
+ @display_id_tracker = display_id_tracker
+ end
+ end
+
+ # 1. Remove existing data for old test accounts
+ def cleanup_existing_data
+ Rails.logger.info { 'Cleaning up existing test data...' }
+ TestData::CleanupService.call
+ Rails.logger.info { 'Cleanup complete' }
+ end
+
+ # 2. Find the max Account ID to avoid conflicts
+ def set_start_id
+ max_id = Account.maximum(:id) || 0
+ @start_id = max_id + 1
+ Rails.logger.info { "Setting start ID to #{@start_id}" }
+ end
+
+ # 3. Create an account, its inboxes, and some data
+ def process_account(account_index)
+ account_id = @start_id + account_index
+ Rails.logger.info { "Creating account with ID #{account_id}" }
+ account = TestData::AccountCreator.create!(account_id)
+
+ inboxes = TestData::InboxCreator.create_for(account)
+ target_messages = rand(TestData::Constants::MIN_MESSAGES..TestData::Constants::MAX_MESSAGES)
+ avg_per_convo = rand(15..50)
+ total_convos = (target_messages / avg_per_convo.to_f).ceil
+ total_contacts = (total_convos / TestData::Constants::MAX_CONVERSATIONS_PER_CONTACT.to_f).ceil
+
+ log_account_details(account, target_messages, total_contacts, total_convos)
+ display_id_tracker = TestData::DisplayIdTracker.new(account: account)
+
+ params = DataGenerationParams.new(
+ account: account,
+ inboxes: inboxes,
+ total_contacts_needed: total_contacts,
+ target_message_count: target_messages,
+ display_id_tracker: display_id_tracker
+ )
+
+ Rails.logger.info { "Starting data generation for account ##{account.id}" }
+ generate_data_for_account(params)
+ end
+
+ def generate_data_for_account(params)
+ contact_count = 0
+ message_count = 0
+ batch_number = 0
+
+ while contact_count < params.total_contacts_needed
+ batch_number += 1
+ batch_size = [TestData::Constants::BATCH_SIZE, params.total_contacts_needed - contact_count].min
+ Rails.logger.info { "Processing batch ##{batch_number} (#{batch_size} contacts) for account ##{params.account.id}" }
+
+ batch_service = TestData::ContactBatchService.new(
+ account: params.account,
+ inboxes: params.inboxes,
+ batch_size: batch_size,
+ display_id_tracker: params.display_id_tracker
+ )
+ batch_created_messages = batch_service.generate!
+
+ contact_count += batch_size
+ message_count += batch_created_messages
+
+ end
+
+ Rails.logger.info { "==> Completed Account ##{params.account.id} with #{message_count} messages" }
+ end
+
+ def log_account_details(account, target_messages, total_contacts, total_convos)
+ Rails.logger.info { "==> Account ##{account.id} plan: target of #{target_messages / 1_000_000.0}M messages" }
+ Rails.logger.info { " Planning for #{total_contacts} contacts and #{total_convos} conversations" }
+ end
+ end
+end
diff --git a/spec/controllers/api/v1/widget/campaigns_controller_spec.rb b/spec/controllers/api/v1/widget/campaigns_controller_spec.rb
index 602fa96b7..91e5e40ba 100644
--- a/spec/controllers/api/v1/widget/campaigns_controller_spec.rb
+++ b/spec/controllers/api/v1/widget/campaigns_controller_spec.rb
@@ -9,7 +9,11 @@ RSpec.describe '/api/v1/widget/campaigns', type: :request do
describe 'GET /api/v1/widget/campaigns' do
let(:params) { { website_token: web_widget.website_token } }
- context 'with correct website token' do
+ context 'when campaigns feature is enabled' do
+ before do
+ account.enable_features!('campaigns')
+ end
+
it 'returns the list of enabled campaigns' do
get '/api/v1/widget/campaigns', params: params
@@ -21,8 +25,22 @@ RSpec.describe '/api/v1/widget/campaigns', type: :request do
end
end
+ context 'when campaigns feature is disabled' do
+ before do
+ account.disable_features!('campaigns')
+ end
+
+ it 'returns empty array' do
+ get '/api/v1/widget/campaigns', params: params
+
+ expect(response).to have_http_status(:success)
+ json_response = response.parsed_body
+ expect(json_response).to eq []
+ end
+ end
+
context 'with invalid website token' do
- it 'returns the list of agents' do
+ it 'returns not found status' do
get '/api/v1/widget/campaigns', params: { website_token: '' }
expect(response).to have_http_status(:not_found)
end
diff --git a/spec/jobs/internal/process_stale_contacts_job_spec.rb b/spec/jobs/internal/process_stale_contacts_job_spec.rb
index 30648ce9a..412ee06cc 100644
--- a/spec/jobs/internal/process_stale_contacts_job_spec.rb
+++ b/spec/jobs/internal/process_stale_contacts_job_spec.rb
@@ -4,11 +4,13 @@ RSpec.describe Internal::ProcessStaleContactsJob do
subject(:job) { described_class.perform_later }
it 'enqueues the job' do
+ allow(ChatwootApp).to receive(:chatwoot_cloud?).and_return(true)
expect { job }.to have_enqueued_job(described_class)
.on_queue('scheduled_jobs')
end
it 'enqueues RemoveStaleContactsJob for each account' do
+ allow(ChatwootApp).to receive(:chatwoot_cloud?).and_return(true)
account1 = create(:account)
account2 = create(:account)
account3 = create(:account)
@@ -25,10 +27,20 @@ RSpec.describe Internal::ProcessStaleContactsJob do
end
it 'processes accounts in batches' do
+ allow(ChatwootApp).to receive(:chatwoot_cloud?).and_return(true)
account = create(:account)
allow(Account).to receive(:find_in_batches).with(batch_size: 100).and_yield([account])
expect(Internal::RemoveStaleContactsJob).to receive(:perform_later).with(account)
described_class.perform_now
end
+
+ it 'does not process accounts when not in cloud environment' do
+ allow(ChatwootApp).to receive(:chatwoot_cloud?).and_return(false)
+ create(:account)
+
+ expect(Account).not_to receive(:find_in_batches)
+ expect(Internal::RemoveStaleContactsJob).not_to receive(:perform_later)
+ described_class.perform_now
+ end
end