-- Seed WhatsApp Templates for Igcrm (Updated with user preference)

-- 1. Onboarding Template
INSERT INTO whatsapp_template (id, type, templateName, language, body)
VALUES (UUID(), 'ONBOARDING', 'igcrm_membership_activation', 'en', 'Membership activation has been completed for {{1}}. Your Member ID {{2}} is registered with {{3}}. Powered By Ignosi')
ON DUPLICATE KEY UPDATE templateName = 'igcrm_membership_activation', body = 'Membership activation has been completed for {{1}}. Your Member ID {{2}} is registered with {{3}}. Powered By Ignosi';

-- 2. Followup Template
INSERT INTO whatsapp_template (id, type, templateName, language, body)
VALUES (UUID(), 'FOLLOWUP', 'igcrm_followup_reminder', 'en', 'Hi {{1}}, this is a reminder for your scheduled follow-up on {{2}}.')
ON DUPLICATE KEY UPDATE templateName = 'igcrm_followup_reminder';

-- 3. Pipeline Update Template
INSERT INTO whatsapp_template (id, type, templateName, language, body)
VALUES (UUID(), 'PIPELINE_UPDATE', 'igcrm_stage_update', 'en', 'Hi {{1}}, your inquiry has moved from {{2}} to {{3}}.')
ON DUPLICATE KEY UPDATE templateName = 'igcrm_stage_update';

-- 4. Quote Template
INSERT INTO whatsapp_template (id, type, templateName, language, body)
VALUES (UUID(), 'QUOTE', 'igcrm_quote_created', 'en', 'Hi {{1}}, your quote for amount {{2}} has been generated.')
ON DUPLICATE KEY UPDATE templateName = 'igcrm_quote_created';
