Module: DailyFocus::TimezoneHints
- Defined in:
- app/services/daily_focus/timezone_hints.rb
Overview
Resolves timezone hints for Daily Focus prompts from rep-facing CRM fields.
Customer/contact time zones are not preloaded here — the model is instructed to read them from CRM via tools.
Class Method Summary collapse
Class Method Details
.prompt_section(primary_employee:, covered_employees: []) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'app/services/daily_focus/timezone_hints.rb', line 7 def self.prompt_section(primary_employee:, covered_employees: []) lines = [] lines << line_for_employee(primary_employee, role: 'Primary rep') Array(covered_employees).compact.uniq.each do |e| next if e.id == primary_employee.id lines << line_for_employee(e, role: 'Covered rep') end lines.compact! guidance = <<~TEXT.squish For each customer or contact you recommend today, infer their local time zone from CRM addresses, state/region, or the customer record's timezone field when present. Sequence calls and live outreach so the rep reaches people during appropriate local business hours. When planning across US regions in one morning, a common pattern is to start with Eastern-time contacts, then Central, Mountain, and Pacific — use that ordering when it fits the schedule and priorities you find, and briefly say why you ordered them that way. TEXT return guidance if lines.empty? <<~TEXT.squish Known rep time-zone hints from CRM (use tools to confirm or enrich): #{lines.join(' ')} #{guidance} TEXT end |