fix: use id instead of bot_id in SLA policy inserts
This commit is contained in:
parent
d6ebd0cf6e
commit
a985dfc168
1 changed files with 4 additions and 4 deletions
|
|
@ -37,19 +37,19 @@ CREATE TABLE IF NOT EXISTS attendance_sla_events (
|
||||||
|
|
||||||
-- 4. Insert default SLA policies
|
-- 4. Insert default SLA policies
|
||||||
INSERT INTO attendance_sla_policies (org_id, bot_id, name, channel, priority, first_response_minutes, resolution_minutes)
|
INSERT INTO attendance_sla_policies (org_id, bot_id, name, channel, priority, first_response_minutes, resolution_minutes)
|
||||||
SELECT DISTINCT org_id, bot_id, 'Default - Urgent', NULL, 'urgent', 5, 60
|
SELECT DISTINCT org_id, id as bot_id, 'Default - Urgent', NULL, 'urgent', 5, 60
|
||||||
FROM bots ON CONFLICT DO NOTHING;
|
FROM bots ON CONFLICT DO NOTHING;
|
||||||
|
|
||||||
INSERT INTO attendance_sla_policies (org_id, bot_id, name, channel, priority, first_response_minutes, resolution_minutes)
|
INSERT INTO attendance_sla_policies (org_id, bot_id, name, channel, priority, first_response_minutes, resolution_minutes)
|
||||||
SELECT DISTINCT org_id, bot_id, 'Default - High', NULL, 'high', 15, 240
|
SELECT DISTINCT org_id, id as bot_id, 'Default - High', NULL, 'high', 15, 240
|
||||||
FROM bots ON CONFLICT DO NOTHING;
|
FROM bots ON CONFLICT DO NOTHING;
|
||||||
|
|
||||||
INSERT INTO attendance_sla_policies (org_id, bot_id, name, channel, priority, first_response_minutes, resolution_minutes)
|
INSERT INTO attendance_sla_policies (org_id, bot_id, name, channel, priority, first_response_minutes, resolution_minutes)
|
||||||
SELECT DISTINCT org_id, bot_id, 'Default - Normal', NULL, 'normal', 30, 480
|
SELECT DISTINCT org_id, id as bot_id, 'Default - Normal', NULL, 'normal', 30, 480
|
||||||
FROM bots ON CONFLICT DO NOTHING;
|
FROM bots ON CONFLICT DO NOTHING;
|
||||||
|
|
||||||
INSERT INTO attendance_sla_policies (org_id, bot_id, name, channel, priority, first_response_minutes, resolution_minutes)
|
INSERT INTO attendance_sla_policies (org_id, bot_id, name, channel, priority, first_response_minutes, resolution_minutes)
|
||||||
SELECT DISTINCT org_id, bot_id, 'Default - Low', NULL, 'low', 60, 1440
|
SELECT DISTINCT org_id, id as bot_id, 'Default - Low', NULL, 'low', 60, 1440
|
||||||
FROM bots ON CONFLICT DO NOTHING;
|
FROM bots ON CONFLICT DO NOTHING;
|
||||||
|
|
||||||
-- 5. Create legacy compat views for leads/opportunities (from crm-sales.md)
|
-- 5. Create legacy compat views for leads/opportunities (from crm-sales.md)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue