From 859ab6777ca011c19cf0c3703a833b8b139d33be Mon Sep 17 00:00:00 2001 From: Pranav Date: Sun, 8 Feb 2026 13:49:24 -0800 Subject: [PATCH] rich seed data --- app/jobs/internal/seed_account_job.rb | 13 + db/seeds.rb | 743 ++++++++++- lib/seeders/account_seeder.rb | 194 ++- lib/seeders/message_seeder.rb | 56 +- lib/seeders/seed_data.yml | 1629 +++++++++++++++++++------ 5 files changed, 2166 insertions(+), 469 deletions(-) diff --git a/app/jobs/internal/seed_account_job.rb b/app/jobs/internal/seed_account_job.rb index d10a84f3f..6f43584f1 100644 --- a/app/jobs/internal/seed_account_job.rb +++ b/app/jobs/internal/seed_account_job.rb @@ -2,6 +2,19 @@ class Internal::SeedAccountJob < ApplicationJob queue_as :low def perform(account) + # Reload account to ensure we have fresh data + account.reload + + # Perform seeding Seeders::AccountSeeder.new(account: account).perform! + + # Reload again after seeding to ensure cache is fresh + account.reload + + Rails.logger.info("Account seeding completed successfully for account_id: #{account.id}") + rescue StandardError => e + Rails.logger.error("Account seeding failed for account_id: #{account.id} - #{e.message}") + Rails.logger.error(e.backtrace.join("\n")) + raise end end diff --git a/db/seeds.rb b/db/seeds.rb index f260f32a7..dc9329371 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -18,80 +18,733 @@ unless Rails.env.production? GlobalConfig.clear_cache account = Account.create!( - name: 'Acme Inc' + name: 'Paperlayer' ) secondary_account = Account.create!( name: 'Acme Org' ) - user = User.new(name: 'John', email: 'john@acme.inc', password: 'Password1!', type: 'SuperAdmin') + # Create Admin + user = User.new(name: 'Sarah Johnson', email: 'sarah@paperlayer.com', password: 'Password1!', type: 'SuperAdmin') user.skip_confirmation! user.save! - AccountUser.create!( - account_id: account.id, - user_id: user.id, - role: :administrator + # Create Sales Team + sales_lead = User.new(name: 'Marcus Chen', email: 'marcus@paperlayer.com', password: 'Password1!') + sales_lead.skip_confirmation! + sales_lead.save! + + sales_agent_1 = User.new(name: 'Emily Rodriguez', email: 'emily@paperlayer.com', password: 'Password1!') + sales_agent_1.skip_confirmation! + sales_agent_1.save! + + sales_agent_2 = User.new(name: 'David Kim', email: 'david@paperlayer.com', password: 'Password1!') + sales_agent_2.skip_confirmation! + sales_agent_2.save! + + # Create Support Team + support_lead = User.new(name: 'Jennifer Williams', email: 'jennifer@paperlayer.com', password: 'Password1!') + support_lead.skip_confirmation! + support_lead.save! + + support_agent_1 = User.new(name: 'Alex Thompson', email: 'alex@paperlayer.com', password: 'Password1!') + support_agent_1.skip_confirmation! + support_agent_1.save! + + support_agent_2 = User.new(name: 'Rachel Green', email: 'rachel@paperlayer.com', password: 'Password1!') + support_agent_2.skip_confirmation! + support_agent_2.save! + + # Create Operations Team + operations_lead = User.new(name: 'Tom Anderson', email: 'tom@paperlayer.com', password: 'Password1!') + operations_lead.skip_confirmation! + operations_lead.save! + + operations_agent = User.new(name: 'Lisa Martinez', email: 'lisa@paperlayer.com', password: 'Password1!') + operations_agent.skip_confirmation! + operations_agent.save! + + # Create Account Users + AccountUser.create!(account_id: account.id, user_id: user.id, role: :administrator) + AccountUser.create!(account_id: account.id, user_id: sales_lead.id, role: :administrator) + AccountUser.create!(account_id: account.id, user_id: sales_agent_1.id, role: :agent) + AccountUser.create!(account_id: account.id, user_id: sales_agent_2.id, role: :agent) + AccountUser.create!(account_id: account.id, user_id: support_lead.id, role: :administrator) + AccountUser.create!(account_id: account.id, user_id: support_agent_1.id, role: :agent) + AccountUser.create!(account_id: account.id, user_id: support_agent_2.id, role: :agent) + AccountUser.create!(account_id: account.id, user_id: operations_lead.id, role: :administrator) + AccountUser.create!(account_id: account.id, user_id: operations_agent.id, role: :agent) + AccountUser.create!(account_id: secondary_account.id, user_id: user.id, role: :administrator) + + # Create Teams + sales_team = Team.create!( + account: account, + name: 'Sales Team', + description: 'Handles all sales inquiries, quotes, and bulk orders', + allow_auto_assign: true ) - AccountUser.create!( - account_id: secondary_account.id, - user_id: user.id, - role: :administrator + support_team = Team.create!( + account: account, + name: 'Customer Support', + description: 'Handles customer service, product questions, and order issues', + allow_auto_assign: true ) - web_widget = Channel::WebWidget.create!(account: account, website_url: 'https://acme.inc') + operations_team = Team.create!( + account: account, + name: 'Operations', + description: 'Handles shipping, logistics, and order fulfillment', + allow_auto_assign: true + ) - inbox = Inbox.create!(channel: web_widget, account: account, name: 'Acme Support') + # Add members to Sales Team + TeamMember.create!(team: sales_team, user: sales_lead) + TeamMember.create!(team: sales_team, user: sales_agent_1) + TeamMember.create!(team: sales_team, user: sales_agent_2) + + # Add members to Support Team + TeamMember.create!(team: support_team, user: support_lead) + TeamMember.create!(team: support_team, user: support_agent_1) + TeamMember.create!(team: support_team, user: support_agent_2) + + # Add members to Operations Team + TeamMember.create!(team: operations_team, user: operations_lead) + TeamMember.create!(team: operations_team, user: operations_agent) + + # Create Inboxes + web_widget = Channel::WebWidget.create!(account: account, website_url: 'https://paperlayer.com') + inbox = Inbox.create!(channel: web_widget, account: account, name: 'Website Chat') InboxMember.create!(user: user, inbox: inbox) + InboxMember.create!(user: sales_lead, inbox: inbox) + InboxMember.create!(user: sales_agent_1, inbox: inbox) + InboxMember.create!(user: sales_agent_2, inbox: inbox) + InboxMember.create!(user: support_lead, inbox: inbox) + InboxMember.create!(user: support_agent_1, inbox: inbox) + InboxMember.create!(user: support_agent_2, inbox: inbox) + InboxMember.create!(user: operations_lead, inbox: inbox) + InboxMember.create!(user: operations_agent, inbox: inbox) - contact_inbox = ContactInboxWithContactBuilder.new( - source_id: user.id, + sales_inbox = Inbox.create!(channel: Channel::WebWidget.create!(account: account, website_url: 'https://paperlayer.com/sales'), account: account, + name: 'Sales Inquiries') + InboxMember.create!(user: user, inbox: sales_inbox) + InboxMember.create!(user: sales_lead, inbox: sales_inbox) + InboxMember.create!(user: sales_agent_1, inbox: sales_inbox) + InboxMember.create!(user: sales_agent_2, inbox: sales_inbox) + + email_channel = Channel::Email.create!( + account: account, + email: 'support@paperlayer.com', + forward_to_email: 'support@paperlayer.com' + ) + support_inbox = Inbox.create!(channel: email_channel, account: account, name: 'Email Support') + InboxMember.create!(user: support_lead, inbox: support_inbox) + InboxMember.create!(user: support_agent_1, inbox: support_inbox) + InboxMember.create!(user: support_agent_2, inbox: support_inbox) + + # Create Labels + bulk_order_label = Label.create!(account: account, title: 'bulk-order', description: 'Large volume paper orders', color: '#00C875', + show_on_sidebar: true) + custom_print_label = Label.create!(account: account, title: 'custom-printing', description: 'Custom letterhead and printing requests', + color: '#784BD1', show_on_sidebar: true) + urgent_label = Label.create!(account: account, title: 'urgent', description: 'Rush delivery needed', color: '#E2445C', show_on_sidebar: true) + pricing_label = Label.create!(account: account, title: 'pricing-inquiry', description: 'Quote requests and pricing questions', color: '#FDAB3D', + show_on_sidebar: true) + delivery_label = Label.create!(account: account, title: 'delivery-issue', description: 'Shipping and delivery concerns', color: '#9CD326', + show_on_sidebar: true) + product_label = Label.create!(account: account, title: 'product-question', description: 'Questions about paper types and products', + color: '#579BFC', show_on_sidebar: true) + + # Create Canned Responses + CannedResponse.create!(account: account, short_code: 'welcome', + content: 'Thank you for contacting Paperlayer! We\'re committed to providing the highest quality paper products for your business. How can I help you today?') + CannedResponse.create!(account: account, short_code: 'bulk', + content: 'For bulk orders over 100 reams, we offer competitive wholesale pricing. Let me get you a custom quote. Could you share your estimated monthly paper needs?') + CannedResponse.create!(account: account, short_code: 'pricing', + content: 'Our standard pricing for premium white copy paper (20lb, 8.5x11) is $45 per case (10 reams). We offer volume discounts starting at 50 cases.') + CannedResponse.create!(account: account, short_code: 'delivery', + content: 'We offer same-day delivery for local orders (within 50 miles) placed before noon, and 2-3 business days for standard shipping. Rush delivery is available for an additional fee.') + CannedResponse.create!(account: account, short_code: 'custom', + content: 'We provide custom letterhead printing services with a minimum order of 5 reams. Typical turnaround is 5-7 business days. Would you like to discuss your design requirements?') + CannedResponse.create!(account: account, short_code: 'stock', + content: 'We carry a full range of paper products: copy paper (20lb-32lb), cardstock, colored paper, glossy photo paper, and specialty papers. What type are you interested in?') + CannedResponse.create!(account: account, short_code: 'closing', + content: 'Thank you for choosing Paperlayer! Is there anything else I can help you with today?') + CannedResponse.create!(account: account, short_code: 'followup', + content: 'I wanted to follow up on your recent inquiry. Have you had a chance to review our quote?') + CannedResponse.create!(account: account, short_code: 'tracking', + content: 'I can help you track your order. Could you please provide your order number?') + CannedResponse.create!(account: account, short_code: 'samples', + content: 'We\'d be happy to send you paper samples! What types of paper are you interested in testing?') + + # Create Macros + Macro.create!( + account: account, + name: 'Handle Bulk Order Inquiry', + visibility: :global, + created_by: user, + actions: [ + { 'action_name' => 'add_label', 'action_params' => [bulk_order_label.title] }, + { 'action_name' => 'assign_team', 'action_params' => [sales_team.id] }, + { 'action_name' => 'send_message', + 'action_params' => ['For bulk orders over 100 reams, we offer competitive wholesale pricing. Let me get you a custom quote. Could you share your estimated monthly paper needs?'] } + ] + ) + + Macro.create!( + account: account, + name: 'Handle Urgent Order', + visibility: :global, + created_by: user, + actions: [ + { 'action_name' => 'add_label', 'action_params' => [urgent_label.title] }, + { 'action_name' => 'change_priority', 'action_params' => ['urgent'] }, + { 'action_name' => 'assign_team', 'action_params' => [operations_team.id] }, + { 'action_name' => 'send_message', + 'action_params' => ['I see you need this urgently. We offer same-day delivery for orders placed before noon. Let me check our inventory and get this expedited for you.'] } + ] + ) + + Macro.create!( + account: account, + name: 'Handle Custom Printing Request', + visibility: :global, + created_by: user, + actions: [ + { 'action_name' => 'add_label', 'action_params' => [custom_print_label.title] }, + { 'action_name' => 'assign_team', 'action_params' => [support_team.id] }, + { 'action_name' => 'send_message', + 'action_params' => ['We provide custom letterhead printing services with a minimum order of 5 reams. Typical turnaround is 5-7 business days. Would you like to discuss your design requirements?'] } + ] + ) + + Macro.create!( + account: account, + name: 'Route to Sales Team', + visibility: :global, + created_by: user, + actions: [ + { 'action_name' => 'add_label', 'action_params' => [pricing_label.title] }, + { 'action_name' => 'assign_team', 'action_params' => [sales_team.id] }, + { 'action_name' => 'send_message', + 'action_params' => ['I\'d be happy to provide pricing information. To give you the most accurate quote, could you let me know: 1) Paper type/weight you need, 2) Quantity required, 3) Delivery location?'] } + ] + ) + + Macro.create!( + account: account, + name: 'Close with Satisfaction Check', + visibility: :global, + created_by: user, + actions: [ + { 'action_name' => 'send_message', + 'action_params' => ['Thank you for choosing Paperlayer! Is there anything else I can help you with today?'] }, + { 'action_name' => 'resolve_conversation' } + ] + ) + + Macro.create!( + account: account, + name: 'Escalate to Operations', + visibility: :global, + created_by: user, + actions: [ + { 'action_name' => 'add_label', 'action_params' => [delivery_label.title] }, + { 'action_name' => 'assign_team', 'action_params' => [operations_team.id] }, + { 'action_name' => 'change_priority', 'action_params' => ['high'] } + ] + ) + + # =============================================== + # Create 50 Sample Conversations + # =============================================== + + agents = [sales_lead, sales_agent_1, sales_agent_2, support_lead, support_agent_1, support_agent_2, operations_lead, operations_agent] + + # Customer names for variety + customer_names = [ + 'Michael Stevens', 'Sarah Parker', 'John Martinez', 'Emily White', 'David Brown', + 'Jennifer Taylor', 'Robert Wilson', 'Lisa Anderson', 'James Thomas', 'Mary Jackson', + 'Christopher Lee', 'Patricia Harris', 'Daniel Clark', 'Linda Lewis', 'Matthew Walker', + 'Barbara Hall', 'Joseph Allen', 'Nancy Young', 'Ryan King', 'Karen Wright', + 'Kevin Lopez', 'Betty Hill', 'Brian Scott', 'Sandra Green', 'George Adams', + 'Jessica Baker', 'Edward Nelson', 'Margaret Carter', 'Steven Mitchell', 'Helen Roberts', + 'Andrew Turner', 'Dorothy Phillips', 'Mark Campbell', 'Carol Parker', 'Paul Evans', + 'Michelle Edwards', 'Donald Collins', 'Ashley Stewart', 'Kenneth Morris', 'Kimberly Rogers', + 'Joshua Reed', 'Amanda Cook', 'Jason Morgan', 'Melissa Bell', 'Justin Murphy', + 'Stephanie Bailey', 'Brandon Rivera', 'Rebecca Cooper', 'Eric Richardson', 'Laura Cox' + ] + + companies = [ + 'Tech Innovations Inc', 'Global Enterprises', 'Summit Corporation', 'Bright Future LLC', + 'Metro Solutions', 'Pacific Group', 'Alliance Partners', 'Premier Services', + 'Apex Industries', 'Horizon Technologies', 'Fusion Consulting', 'Vista Corp', + 'Pinnacle Systems', 'Catalyst Ventures', 'Quantum Labs', 'Nexus Holdings', + 'Zenith Partners', 'Atlas Group', 'Infinity Solutions', 'Eclipse Enterprises' + ] + + conversation_templates = [ + { + labels: [bulk_order_label.title, pricing_label.title], + team: sales_team, + priority: nil, + status: :open, + messages: [ + { role: :incoming, content: 'Hi, I need a quote for 200 cases of copy paper for our office. What kind of pricing can you offer?' }, + { role: :outgoing, + content: 'Great! For 200 cases, you qualify for our 15% volume discount. That brings the price down to $38.25 per case. Would you like me to prepare a formal quote?' }, + { role: :incoming, content: 'Yes please. How soon can you deliver?' } + ] + }, + { + labels: [custom_print_label.title], + team: support_team, + priority: nil, + status: :pending, + messages: [ + { role: :incoming, content: 'Do you offer custom letterhead printing? We need about 10 reams with our logo.' }, + { role: :outgoing, + content: 'Absolutely! We can do custom letterhead with a minimum order of 5 reams. For 10 reams on 28lb premium paper, the cost would be around $200. Turnaround is 5-7 business days. Do you have your design file ready?' } + ] + }, + { + labels: [urgent_label.title, delivery_label.title], + team: operations_team, + priority: :urgent, + status: :open, + messages: [ + { role: :incoming, content: 'Emergency! We need 50 reams delivered today. Is that possible?' }, + { role: :outgoing, content: 'Yes, we can do same-day delivery within 50 miles if you order before noon. What\'s your location?' }, + { role: :incoming, content: 'We\'re in downtown. How much for rush delivery?' } + ] + }, + { + labels: [product_label.title], + team: support_team, + priority: nil, + status: :resolved, + messages: [ + { role: :incoming, content: 'What\'s the difference between 20lb and 24lb paper?' }, + { role: :outgoing, + content: '20lb is our standard weight, great for everyday printing. 24lb is heavier, more professional feel, and less see-through. Perfect for presentations and client-facing documents.' }, + { role: :incoming, content: 'Perfect, I\'ll go with 24lb. Thanks!' } + ] + }, + { + labels: [pricing_label.title], + team: sales_team, + priority: nil, + status: :open, + messages: [ + { role: :incoming, content: 'Can you send me your current price list for all paper weights?' }, + { role: :outgoing, + content: 'Of course! I\'ll email you our comprehensive price list. Are you interested in standard sizes or do you need custom dimensions as well?' } + ] + }, + { + labels: [delivery_label.title], + team: operations_team, + priority: :high, + status: :pending, + messages: [ + { role: :incoming, content: 'My order #12345 hasn\'t arrived yet. It was supposed to be here yesterday.' }, + { role: :outgoing, content: 'I apologize for the delay. Let me track that order for you right away.' } + ] + }, + { + labels: [bulk_order_label.title], + team: sales_team, + priority: nil, + status: :resolved, + messages: [ + { role: :incoming, content: 'We\'re opening 5 new offices and need to set up a recurring order. Can you help?' }, + { role: :outgoing, + content: 'Excellent! We have a bulk program perfect for multi-location businesses. With recurring orders over 250 cases, you get 20% off plus a dedicated account manager. When would you like to discuss the details?' }, + { role: :incoming, content: 'That sounds great! Tomorrow at 2 PM works for me.' }, + { role: :outgoing, content: 'Perfect, I\'ve scheduled a call for tomorrow at 2 PM. I\'ll send you a calendar invite shortly.' } + ] + }, + { + labels: [product_label.title, pricing_label.title], + team: sales_team, + priority: nil, + status: :open, + messages: [ + { role: :incoming, content: 'Do you have recycled paper options? We\'re trying to go green.' }, + { role: :outgoing, + content: 'Yes! Our Eco-Friendly line is 30% post-consumer recycled content and FSC certified. It\'s $48 per case, just $3 more than standard paper.' } + ] + }, + { + labels: [custom_print_label.title, urgent_label.title], + team: support_team, + priority: :urgent, + status: :open, + messages: [ + { role: :incoming, content: 'We have a trade show next week and need 1000 business cards ASAP. Can you rush this?' }, + { role: :outgoing, + content: 'For rush orders, we can turn it around in 2-3 business days for an additional $50 rush fee. Would that work for your timeline?' } + ] + }, + { + labels: [delivery_label.title], + team: operations_team, + priority: nil, + status: :resolved, + messages: [ + { role: :incoming, content: 'What are your delivery hours? We have limited receiving times.' }, + { role: :outgoing, + content: 'Our standard delivery window is 9 AM - 5 PM. We can accommodate specific time windows with advance notice. What times work best for you?' }, + { role: :incoming, content: '10 AM - 2 PM would be ideal.' }, + { role: :outgoing, content: 'Noted! I\'ve added that to your account preferences.' } + ] + } + ] + + puts ' Creating 50 diverse conversations...' + + 50.times do |i| + # Create contact + customer_name = customer_names[i % customer_names.length] + company = companies[i % companies.length] + + contact_inbox = ContactInboxWithContactBuilder.new( + source_id: agents.sample.id, + inbox: [inbox, sales_inbox, support_inbox].sample, + hmac_verified: true, + contact_attributes: { + name: customer_name, + email: "#{customer_name.downcase.tr(' ', '.')}@#{company.downcase.delete(' ')}.com", + phone_number: "+1555#{rand(1_000_000..9_999_999)}", + additional_attributes: { + company_name: company, + city: ['New York', 'Los Angeles', 'Chicago', 'Houston', 'Phoenix', 'Philadelphia'].sample + } + } + ).perform + + # Pick a template or create variation + template = conversation_templates[i % conversation_templates.length] + + # Assign to agent from appropriate team + team_members = TeamMember.where(team: template[:team]).pluck(:user_id) + assigned_agent = User.find(team_members.sample) + + # Create conversation + conv = Conversation.create!( + account: account, + inbox: contact_inbox.inbox, + status: template[:status], + assignee: assigned_agent, + contact: contact_inbox.contact, + contact_inbox: contact_inbox, + priority: template[:priority], + additional_attributes: { + initiated_at: { + timestamp: rand(30).days.ago.to_i + } + } + ) + + # Add labels + conv.label_list.add(*template[:labels]) + conv.save! + + # Create messages + template[:messages].each do |msg_template| + sender = msg_template[:role] == :incoming ? contact_inbox.contact : assigned_agent + Message.create!( + content: msg_template[:content], + account: account, + inbox: contact_inbox.inbox, + conversation: conv, + sender: sender, + message_type: msg_template[:role] + ) + end + end + + # Create one special conversation with interactive messages + special_contact = ContactInboxWithContactBuilder.new( + source_id: sales_lead.id, inbox: inbox, hmac_verified: true, - contact_attributes: { name: 'jane', email: 'jane@example.com', phone_number: '+2320000' } + contact_attributes: { + name: 'Demo Customer', + email: 'demo@example.com', + phone_number: '+15551234567' + } ).perform - conversation = Conversation.create!( + demo_conversation = Conversation.create!( account: account, inbox: inbox, status: :open, - assignee: user, - contact: contact_inbox.contact, - contact_inbox: contact_inbox, + assignee: sales_lead, + contact: special_contact.contact, + contact_inbox: special_contact, additional_attributes: {} ) + demo_conversation.label_list.add(bulk_order_label.title) + demo_conversation.save! - # sample email collect - Seeders::MessageSeeder.create_sample_email_collect_message conversation + Message.create!(content: 'Hi! I\'m interested in learning more about your products.', account: account, inbox: inbox, + conversation: demo_conversation, sender: special_contact.contact, message_type: :incoming) - Message.create!(content: 'Hello', account: account, inbox: inbox, conversation: conversation, sender: contact_inbox.contact, - message_type: :incoming) + # Add interactive message samples + Seeders::MessageSeeder.create_sample_cards_message demo_conversation + Seeders::MessageSeeder.create_sample_input_select_message demo_conversation + Seeders::MessageSeeder.create_sample_form_message demo_conversation + Seeders::MessageSeeder.create_sample_articles_message demo_conversation + Seeders::MessageSeeder.create_sample_email_collect_message demo_conversation + Seeders::MessageSeeder.create_sample_csat_collect_message demo_conversation - # sample location message - # - location_message = Message.new(content: 'location', account: account, inbox: inbox, sender: contact_inbox.contact, conversation: conversation, - message_type: :incoming) - location_message.attachments.new( - account_id: account.id, - file_type: 'location', - coordinates_lat: 37.7893768, - coordinates_long: -122.3895553, - fallback_title: 'Bay Bridge, San Francisco, CA, USA' + puts ' ✓ Created 50+ conversations with diverse scenarios' + + # =============================================== + # Help Center Portal Setup + # =============================================== + portal = Portal.create!( + account: account, + name: 'Paperlayer Help Center', + slug: 'dunder-mifflin-help', + page_title: 'Paperlayer Paper Company - Help & Support', + header_text: 'How can we help you with your paper needs?', + homepage_link: 'https://paperlayer.com', + color: '#0066CC', + config: { + 'allowed_locales' => ['en'], + 'default_locale' => 'en' + } ) - location_message.save! - # sample card - Seeders::MessageSeeder.create_sample_cards_message conversation - # input select - Seeders::MessageSeeder.create_sample_input_select_message conversation - # form - Seeders::MessageSeeder.create_sample_form_message conversation - # articles - Seeders::MessageSeeder.create_sample_articles_message conversation - # csat - Seeders::MessageSeeder.create_sample_csat_collect_message conversation + # Category: Getting Started + getting_started_category = Category.create!( + account: account, + portal: portal, + name: 'Getting Started', + slug: 'getting-started', + description: 'Learn the basics of ordering from Paperlayer', + locale: 'en', + position: 1, + icon: 'book-open' + ) - CannedResponse.create!(account: account, short_code: 'start', content: 'Hello welcome to chatwoot.') + Article.create!( + account: account, + portal: portal, + category: getting_started_category, + author: user, + title: 'How to Place Your First Order', + description: 'Step-by-step guide to placing your first paper order with Paperlayer', + content: "# How to Place Your First Order\n\nWelcome to Paperlayer! We're excited to help you with your paper needs.\n\n## Step 1: Browse Our Products\nVisit our product catalog to explore our wide range of paper products:\n- Copy Paper (20lb, 24lb, 28lb, 32lb)\n- Cardstock (65lb, 80lb, 110lb)\n- Specialty Papers (colored, glossy, recycled)\n\n## Step 2: Request a Quote\nContact our sales team via:\n- Live chat on our website\n- Email: sales@paperlayer.com\n- Phone: 1-800-PAPER-01\n\n## Step 3: Review and Approve\nOur team will send you a detailed quote within 24 hours.\n\n## Step 4: Place Your Order\nOnce approved, we'll process your order and provide tracking information.\n\n## Step 5: Delivery\nStandard delivery: 2-3 business days\nSame-day delivery: Available for local orders placed before noon", + status: :published, + locale: 'en' + ) + + Article.create!( + account: account, + portal: portal, + category: getting_started_category, + author: user, + title: 'Understanding Paper Weights', + description: 'Learn about different paper weights and their best uses', + content: "# Understanding Paper Weights\n\nPaper weight can be confusing. Let us help you choose the right weight for your needs.\n\n## Copy Paper Weights\n\n### 20lb (75 gsm) - Standard\n- Most common weight for everyday printing\n- Great for internal documents, drafts\n- Economical choice for high-volume printing\n\n### 24lb (90 gsm) - Premium\n- Heavier feel, more professional\n- Ideal for presentations, resumes\n- Less see-through than 20lb\n\n### 28lb (105 gsm) - Super Premium\n- Excellent for important documents\n- Professional brochures\n- High-quality letterhead\n\n### 32lb (120 gsm) - Ultra Premium\n- Luxury feel and appearance\n- Executive communications\n- Certificates and awards\n\n## Cardstock Weights\n\n### 65lb (176 gsm) - Light Cardstock\n- Greeting cards, postcards\n- Thin presentations\n\n### 80lb (216 gsm) - Medium Cardstock\n- Business cards\n- Invitations\n\n### 110lb (298 gsm) - Heavy Cardstock\n- Premium business cards\n- High-end invitations\n- Display materials\n\n## Need Help?\nContact our team at sales@paperlayer.com or call 1-800-PAPER-01", + status: :published, + locale: 'en' + ) + + # Category: Products & Pricing + products_category = Category.create!( + account: account, + portal: portal, + name: 'Products & Pricing', + slug: 'products-pricing', + description: 'Information about our paper products and pricing', + locale: 'en', + position: 2, + icon: 'tag' + ) + + Article.create!( + account: account, + portal: portal, + category: products_category, + author: user, + title: 'Copy Paper Product Line', + description: 'Complete guide to our copy paper offerings', + content: "# Copy Paper Product Line\n\nPaperlayer offers the finest copy paper in the Northeast.\n\n## Standard Copy Paper\n**Premium White - 20lb**\n- Price: $45 per case (10 reams)\n- Brightness: 92\n- Size: 8.5\" x 11\"\n- Sheets per ream: 500\n\n**Premium White - 24lb**\n- Price: $52 per case (10 reams)\n- Brightness: 94\n- Size: 8.5\" x 11\"\n- Sheets per ream: 500\n\n## Premium Copy Paper\n**Ultra White - 28lb**\n- Price: $65 per case (10 reams)\n- Brightness: 96\n- Perfect for presentations\n\n**Executive White - 32lb**\n- Price: $78 per case (10 reams)\n- Brightness: 98\n- Luxury feel and appearance\n\n## Recycled Paper\n**Eco-Friendly - 20lb**\n- Price: $48 per case (10 reams)\n- 30% post-consumer content\n- FSC certified\n\n## Volume Discounts\n- 50-99 cases: 10% off\n- 100-249 cases: 15% off\n- 250+ cases: 20% off\n\nContact us for custom quotes!", + status: :published, + locale: 'en' + ) + + Article.create!( + account: account, + portal: portal, + category: products_category, + author: user, + title: 'Bulk Order Discounts', + description: 'Learn about our volume pricing tiers and save on large orders', + content: "# Bulk Order Discounts\n\nThe more you order, the more you save with Paperlayer!\n\n## Discount Tiers\n\n### Tier 1: 50-99 Cases\n- **10% discount**\n- Minimum order: 50 cases\n- Perfect for medium-sized offices\n\n### Tier 2: 100-249 Cases\n- **15% discount**\n- Quarterly supply option\n- Dedicated account manager\n\n### Tier 3: 250+ Cases\n- **20% discount**\n- Annual contract pricing\n- Priority customer service\n- Free delivery\n- Flexible payment terms\n\n## Example Savings\n\n**Standard scenario: 100 cases of Premium White 20lb**\n- Regular price: $4,500\n- With 15% discount: $3,825\n- **You save: $675!**\n\n## Additional Benefits\n- No order minimums after initial bulk purchase\n- Locked-in pricing for contract duration\n- Scheduled deliveries\n- Custom invoicing options\n\n## Get Started\nContact our bulk sales team:\n- Email: bulk@paperlayer.com\n- Phone: 1-800-BULK-PAPER\n- Live chat: Available 9 AM - 6 PM EST", + status: :published, + locale: 'en' + ) + + # Category: Shipping & Delivery + shipping_category = Category.create!( + account: account, + portal: portal, + name: 'Shipping & Delivery', + slug: 'shipping-delivery', + description: 'Delivery options, shipping costs, and tracking information', + locale: 'en', + position: 3, + icon: 'truck' + ) + + Article.create!( + account: account, + portal: portal, + category: shipping_category, + author: user, + title: 'Delivery Options & Times', + description: 'Choose the delivery option that works best for you', + content: "# Delivery Options & Times\n\n## Standard Delivery (FREE)\n- **Timeframe:** 2-3 business days\n- **Available:** All orders over $100\n- **Coverage:** Within 200 miles of Scranton, PA\n\n## Express Delivery\n- **Timeframe:** Next business day\n- **Cost:** $25 flat fee\n- **Coverage:** Within 100 miles\n- **Cutoff:** Order by 3 PM\n\n## Same-Day Delivery\n- **Timeframe:** Within 6 hours\n- **Cost:** $50 flat fee\n- **Coverage:** Within 50 miles\n- **Cutoff:** Order by 12 PM noon\n\n## Freight Shipping (Bulk Orders)\n- **Timeframe:** 3-5 business days\n- **Cost:** Varies by distance and volume\n- **Available:** Orders over 100 cases\n- **Includes:** Forklift delivery available\n\n## Tracking Your Order\nAll orders include:\n- Real-time tracking number\n- Email notifications\n- Estimated delivery window\n- Delivery signature confirmation\n\n## Delivery Notes\n- Residential deliveries available\n- Loading dock delivery preferred for bulk\n- Inside delivery available (additional fee)\n- Weather delays may occur\n\nQuestions? Contact: logistics@paperlayer.com", + status: :published, + locale: 'en' + ) + + # Category: Custom Services + custom_category = Category.create!( + account: account, + portal: portal, + name: 'Custom Services', + slug: 'custom-services', + description: 'Custom printing, letterhead, and specialty services', + locale: 'en', + position: 4, + icon: 'printer' + ) + + Article.create!( + account: account, + portal: portal, + category: custom_category, + author: user, + title: 'Custom Letterhead & Business Stationery', + description: 'Professional custom printing services for your business', + content: "# Custom Letterhead & Business Stationery\n\nMake a lasting impression with custom-printed materials from Paperlayer.\n\n## Letterhead Services\n\n### Standard Letterhead\n- **Minimum order:** 5 reams (2,500 sheets)\n- **Turnaround:** 5-7 business days\n- **Paper weight:** 24lb or 28lb\n- **Colors:** Up to 4-color process\n- **Starting at:** $15 per ream\n\n### Premium Letterhead\n- **Minimum order:** 5 reams\n- **Turnaround:** 7-10 business days\n- **Paper weight:** 32lb premium stock\n- **Options:** Embossing, foil stamping\n- **Starting at:** $25 per ream\n\n## Business Cards\n- Standard: 14pt cardstock\n- Premium: 16pt with UV coating\n- Minimum: 500 cards\n- Turnaround: 3-5 business days\n\n## Envelopes\n- Custom printed envelopes\n- Standard #10 size\n- Match your letterhead design\n- Minimum: 500 envelopes\n\n## Design Services\n- Professional design assistance: $150\n- Logo digitization: $75\n- Proof revisions: Included (up to 3)\n\n## The Process\n\n1. **Submit your design** - Email to custom@paperlayer.com\n2. **Review proof** - We'll send a digital proof within 2 business days\n3. **Approve** - Make any needed revisions\n4. **Production** - We print your order\n5. **Delivery** - Ships via your chosen method\n\n## File Requirements\n- Format: PDF, AI, or EPS\n- Resolution: 300 DPI minimum\n- Color mode: CMYK\n- Bleed: 0.125\" on all sides\n\nNeed help with design? We can assist!\nEmail: custom@paperlayer.com\nPhone: 1-800-CUSTOM-PAPER", + status: :published, + locale: 'en' + ) + + # =============================================== + # Captain Assistant Setup (Enterprise Feature) + # =============================================== + if defined?(Captain::Assistant) + captain_assistant = Captain::Assistant.create!( + account: account, + name: 'Paper Expert', + description: 'AI assistant specialized in helping customers with all their paper product needs, from product selection to bulk orders.', + config: { + temperature: 0.7, + feature_faq: true, + feature_memory: true, + product_name: 'Paperlayer Paper Products' + }, + response_guidelines: [ + 'Always be friendly and professional', + 'Use paper industry terminology when appropriate', + 'Provide specific product recommendations based on customer needs', + 'Mention bulk discounts when discussing large orders', + 'Offer to connect customers with sales team for custom quotes' + ], + guardrails: [ + 'Do not discuss competitor products', + 'Do not make promises about delivery times without confirming inventory', + 'Always verify bulk pricing with sales team for orders over 250 cases' + ] + ) + + # Connect assistant to inbox + CaptainInbox.create!( + captain_assistant: captain_assistant, + inbox: inbox + ) + + # Scenario 1: Product Recommendations + Captain::Scenario.create!( + account: account, + assistant: captain_assistant, + title: 'Product Recommendations', + description: 'Help customers choose the right paper products for their needs', + instruction: "When a customer asks about which paper to use, ask clarifying questions:\n1. What will they use it for? (everyday printing, presentations, letterhead, etc.)\n2. What's their volume? (help them understand bulk discounts)\n3. Do they have any special requirements? (recycled, brightness, specific sizes)\n\nThen recommend appropriate products from our catalog:\n- 20lb for everyday use\n- 24lb for professional documents\n- 28lb for presentations\n- 32lb for executive communications\n- Cardstock for business cards\n\nAlways mention relevant discounts and offer to connect them with sales for quotes.", + enabled: true + ) + + # Scenario 2: Bulk Orders + Captain::Scenario.create!( + account: account, + assistant: captain_assistant, + title: 'Bulk Order Processing', + description: 'Guide customers through bulk order process and pricing', + instruction: "For bulk order inquiries:\n1. Determine their quantity needs\n2. Explain applicable discount tiers:\n - 50-99 cases: 10% off\n - 100-249 cases: 15% off\n - 250+ cases: 20% off\n3. Calculate estimated savings\n4. Explain additional benefits (account manager, flexible terms)\n5. Offer to connect with bulk sales team for formal quote\n6. Add the 'bulk-order' label to the conversation", + enabled: true + ) + + # Scenario 3: Shipping Questions + Captain::Scenario.create!( + account: account, + assistant: captain_assistant, + title: 'Shipping & Delivery', + description: 'Answer questions about delivery options and times', + instruction: "When customers ask about shipping:\n1. Standard delivery: 2-3 business days (FREE over $100)\n2. Express: Next day ($25)\n3. Same-day: Within 6 hours, order by noon ($50)\n4. Bulk freight: 3-5 days for 100+ cases\n\nMention tracking is included with all orders.\nFor urgent needs, emphasize same-day delivery within 50 miles.", + enabled: true + ) + + # Document 1: FAQ - General Questions + Captain::Document.create!( + account: account, + assistant: captain_assistant, + name: 'General FAQs', + external_link: 'https://paperlayer.com/faq/general', + content: "# Frequently Asked Questions\n\n## What are your business hours?\nMonday-Friday: 8 AM - 6 PM EST\nSaturday: 9 AM - 2 PM EST\nSunday: Closed\n\n## Do you offer free shipping?\nYes! Free standard shipping on all orders over $100 within 200 miles of Scranton, PA.\n\n## What payment methods do you accept?\n- Credit cards (Visa, Mastercard, AmEx, Discover)\n- Purchase orders (for established accounts)\n- ACH/Wire transfer\n- Net 30 terms (for qualified businesses)\n\n## Can I return paper products?\nYes, unopened reams can be returned within 30 days for a full refund.\n\n## Do you have a showroom?\nYes! Visit our Scranton office at:\n1725 Slough Avenue\nScranton, PA 18505\n\nAppointments recommended.\n\n## What makes Paperlayer different?\n- Family-owned since 1949\n- Personal service from dedicated account managers\n- Local delivery and same-day service\n- Competitive pricing with volume discounts\n- Expert advice on paper selection", + status: :available + ) + + # Document 2: FAQ - Product Specifications + Captain::Document.create!( + account: account, + assistant: captain_assistant, + name: 'Product Specifications', + external_link: 'https://paperlayer.com/faq/products', + content: "# Product Specifications FAQs\n\n## What does paper brightness mean?\nBrightness is measured on a scale of 0-100. Higher numbers mean whiter, brighter paper.\n- 92: Standard brightness\n- 94-96: Premium brightness\n- 98+: Ultra-premium brightness\n\n## What's the difference between 20lb and 24lb paper?\nThe number refers to the weight of 500 sheets (a ream).\n- 20lb: Standard weight, economical\n- 24lb: Heavier, more professional feel\n- 28lb: Premium weight for presentations\n- 32lb: Luxury weight for executive use\n\n## Is your paper acid-free?\nYes, all our copy paper is acid-free for long-term archival quality.\n\n## Do you carry recycled paper?\nYes! Our Eco-Friendly line contains 30% post-consumer recycled content and is FSC certified.\n\n## What sizes do you offer?\n- Letter: 8.5\" x 11\" (most common)\n- Legal: 8.5\" x 14\"\n- Tabloid: 11\" x 17\"\n- Custom sizes available for bulk orders\n\n## Can I get paper in colors?\nYes! We stock:\n- Pastels: Ivory, Pink, Blue, Green, Yellow\n- Brights: Red, Orange, Purple\n- Custom colors available for bulk orders\n\n## What's the shelf life of paper?\nPaper properly stored in a cool, dry place will last indefinitely.", + status: :available + ) + + # Document 3: Bulk Ordering Guide + Captain::Document.create!( + account: account, + assistant: captain_assistant, + name: 'Bulk Ordering Guide', + external_link: 'https://paperlayer.com/guides/bulk-orders', + content: "# Bulk Ordering Guide\n\n## Benefits of Bulk Orders\n\n### Cost Savings\n- 50-99 cases: Save 10%\n- 100-249 cases: Save 15%\n- 250+ cases: Save 20%\n\n### Additional Perks\n- Dedicated account manager\n- Priority customer service\n- Flexible payment terms (Net 30/60/90)\n- Free delivery on orders over 100 cases\n- Scheduled recurring deliveries\n- Custom reporting and invoicing\n\n## How to Place a Bulk Order\n\n1. **Contact our bulk sales team**\n - Email: bulk@paperlayer.com\n - Phone: 1-800-BULK-PAPER\n - Chat with us online\n\n2. **Discuss your needs**\n - Types of paper needed\n - Estimated monthly/annual volume\n - Delivery schedule preferences\n\n3. **Receive your custom quote**\n - Within 24 hours for standard requests\n - Same day for urgent needs\n\n4. **Review and sign agreement**\n - No long-term contracts required\n - Flexible terms available\n\n5. **Start saving!**\n - Automated ordering available\n - Just-in-time delivery options\n\n## Storage Tips for Bulk Orders\n- Store in cool, dry place (60-70°F)\n- Keep away from direct sunlight\n- Maintain 40-60% humidity\n- Store flat, not on edge\n- Keep in original packaging until use\n\n## Popular Bulk Order Scenarios\n\n### Small Office (50-100 cases/year)\n- Mix of 20lb and 24lb paper\n- Quarterly deliveries\n- 10% savings tier\n\n### Medium Business (100-250 cases/year)\n- Multiple paper types\n- Monthly deliveries\n- 15% savings tier\n- Account manager included\n\n### Large Corporation (250+ cases/year)\n- Enterprise agreement\n- Custom delivery schedule\n- 20% savings tier\n- Premium support\n\n## Questions?\nContact our bulk sales specialists:\nbulk@paperlayer.com", + status: :available + ) + + # Document 4: Custom Printing Guide + Captain::Document.create!( + account: account, + assistant: captain_assistant, + name: 'Custom Printing Services', + external_link: 'https://paperlayer.com/services/custom-printing', + content: "# Custom Printing Services\n\n## What We Offer\n\n### Letterhead\n- Professional custom letterhead\n- Minimum: 5 reams (2,500 sheets)\n- Paper options: 24lb, 28lb, or 32lb\n- Full color printing\n- Turnaround: 5-10 business days\n\n### Business Cards\n- Premium cardstock\n- Standard or custom sizes\n- Options: matte, gloss, UV coating\n- Minimum: 500 cards\n- Turnaround: 3-5 business days\n\n### Envelopes\n- Custom printed envelopes\n- Match your letterhead\n- Multiple sizes available\n- Minimum: 500 envelopes\n\n## Design Services\n\nNeed help with design?\n- Professional design: $150\n- Logo digitization: $75\n- Free setup for repeat orders\n- Up to 3 proof revisions included\n\n## File Requirements\n- Preferred format: PDF, AI, EPS\n- Resolution: 300 DPI minimum\n- Color mode: CMYK (not RGB)\n- Include 0.125\" bleed\n- Embed all fonts\n\n## Approval Process\n\n1. Submit your design or request assistance\n2. Receive digital proof within 2 business days\n3. Review and approve (or request changes)\n4. Production begins upon approval\n5. Delivery within specified timeframe\n\n## Pricing Examples\n\n**Standard Letterhead (24lb)**\n- 5 reams: $75\n- 10 reams: $140\n- 25 reams: $325\n\n**Premium Letterhead (32lb)**\n- 5 reams: $125\n- 10 reams: $230\n- 25 reams: $525\n\n**Business Cards**\n- 500 cards: $75\n- 1,000 cards: $125\n- 2,500 cards: $275\n\n## Get Started\n\nEmail your project details to:\ncustom@paperlayer.com\n\nOr call: 1-800-CUSTOM-PAPER", + status: :available + ) + + puts ' ✓ Captain Assistant created with documents and scenarios' + else + puts ' ⚠ Captain Assistant is an Enterprise feature - skipping' + end end diff --git a/lib/seeders/account_seeder.rb b/lib/seeders/account_seeder.rb index ba46638c5..66ac73ffd 100644 --- a/lib/seeders/account_seeder.rb +++ b/lib/seeders/account_seeder.rb @@ -23,22 +23,45 @@ class Seeders::AccountSeeder set_up_users seed_labels seed_canned_responses + seed_macros seed_inboxes seed_contacts + seed_portals + seed_captain_assistants + finalize_seeding end def set_up_account + # Delete all existing data before seeding + @account.macros.destroy_all + @account.canned_responses.destroy_all @account.teams.destroy_all @account.conversations.destroy_all @account.labels.destroy_all + @account.portals.destroy_all @account.inboxes.destroy_all @account.contacts.destroy_all @account.custom_roles.destroy_all if @account.respond_to?(:custom_roles) + + # Delete Captain Assistants if Enterprise feature is available + return unless defined?(Captain::Assistant) + + Captain::Assistant.where(account_id: @account.id).destroy_all end def seed_teams - @account_data['teams'].each do |team_name| - @account.teams.create!(name: team_name) + @account_data['teams'].each do |team_data| + if team_data.is_a?(String) + # Support legacy format (just team name) + @account.teams.create!(name: team_data) + else + # New format with name and description + @account.teams.create!( + name: team_data['name'], + description: team_data['description'], + allow_auto_assign: team_data['allow_auto_assign'] != false + ) + end end end @@ -103,9 +126,68 @@ class Seeders::AccountSeeder @account.custom_roles.find_by(name: role_name) end - def seed_canned_responses(count: 50) - count.times do - @account.canned_responses.create(content: Faker::Quote.fortune_cookie, short_code: Faker::Alphanumeric.alpha(number: 10)) + def seed_canned_responses + return unless @account_data['canned_responses'].present? + + @account_data['canned_responses'].each do |response| + @account.canned_responses.create!(response) + end + end + + def seed_macros + return unless @account_data['macros'].present? + + @account_data['macros'].each do |macro_data| + created_by = User.from_email(macro_data['created_by']) if macro_data['created_by'].present? + actions = macro_data['actions'].map do |action| + process_macro_action(action) + end.compact # Remove nil actions (when team/agent not found) + + # Only create macro if there are valid actions + if actions.any? + @account.macros.create!( + name: macro_data['name'], + visibility: macro_data['visibility'] || 'global', + created_by: created_by, + actions: actions + ) + else + Rails.logger.warn("Macro '#{macro_data['name']}' has no valid actions, skipping") + end + end + end + + def seed_portals + return unless @account_data['portals'].present? + + @account_data['portals'].each do |portal_data| + portal = @account.portals.create!( + name: portal_data['name'], + slug: portal_data['slug'], + page_title: portal_data['page_title'], + header_text: portal_data['header_text'], + color: portal_data['color'], + config: portal_data['config'] + ) + + seed_portal_categories(portal, portal_data['categories']) if portal_data['categories'].present? + end + end + + def seed_captain_assistants + return unless @account_data['captain_assistants'].present? + return unless defined?(Captain::Assistant) + + @account_data['captain_assistants'].each do |assistant_data| + assistant = Captain::Assistant.create!( + account: @account, + name: assistant_data['name'], + description: assistant_data['description'], + config: assistant_data['config'] || {} + ) + + seed_captain_documents(assistant, assistant_data['documents']) if assistant_data['documents'].present? + seed_captain_scenarios(assistant, assistant_data['scenarios']) if assistant_data['scenarios'].present? end end @@ -155,4 +237,106 @@ class Seeders::AccountSeeder def seed_inboxes Seeders::InboxSeeder.new(account: @account, company_data: @account_data[:company]).perform! end + + def process_macro_action(action) + processed_action = { 'action_name' => action['action_name'] } + + case action['action_name'] + when 'assign_team' + team = @account.teams.find_by('name LIKE ?', "%#{action['action_params'][0]}%") + if team + processed_action['action_params'] = [team.id] + else + Rails.logger.warn("Macro: Team not found matching '#{action['action_params'][0]}', skipping assign_team action") + return nil # Skip this action + end + when 'assign_agent' + user = User.from_email(action['action_params'][0]) + if user + processed_action['action_params'] = [user.id] + else + Rails.logger.warn("Macro: User not found '#{action['action_params'][0]}', skipping assign_agent action") + return nil # Skip this action + end + else + processed_action['action_params'] = action['action_params'] + end + + processed_action + end + + def seed_portal_categories(portal, categories_data) + categories_data.each do |category_data| + category = portal.categories.create!( + account: @account, + name: category_data['name'], + slug: category_data['slug'], + description: category_data['description'], + locale: category_data['locale'] || 'en', + position: category_data['position'] + ) + + seed_category_articles(portal, category, category_data['articles']) if category_data['articles'].present? + end + end + + def seed_category_articles(portal, category, articles_data) + articles_data.each do |article_data| + author = User.from_email(article_data['author']) if article_data['author'].present? + author ||= @account.users.administrators.first + + portal.articles.create!( + account: @account, + category: category, + author: author, + title: article_data['title'], + description: article_data['description'], + content: article_data['content'], + status: article_data['status'] || 'published', + locale: article_data['locale'] || 'en' + ) + end + end + + def seed_captain_documents(assistant, documents_data) + documents_data.each do |doc_data| + Captain::Document.create!( + account: @account, + assistant: assistant, + name: doc_data['name'], + external_link: doc_data['external_link'], + content: doc_data['content'], + status: doc_data['status'] || 'available' + ) + end + end + + def seed_captain_scenarios(assistant, scenarios_data) + scenarios_data.each do |scenario_data| + Captain::Scenario.create!( + account: @account, + assistant: assistant, + title: scenario_data['title'], + description: scenario_data['description'], + instruction: scenario_data['instruction'], + enabled: scenario_data['enabled'] != false + ) + end + end + + def finalize_seeding + # Reload account to ensure all associations are fresh + @account.reload + + # Reset cache keys for labels, inboxes, teams + @account.reset_cache_keys if @account.respond_to?(:reset_cache_keys) + + # Clear any Rails cache related to this account + Rails.cache.delete("account/#{@account.id}") + + # Force reload of all account users to refresh their associations + @account.account_users.each(&:reload) + + Rails.logger.info("Seed completed for account #{@account.id} - #{@account.name}") + end end diff --git a/lib/seeders/message_seeder.rb b/lib/seeders/message_seeder.rb index 5159225bd..46bffda41 100644 --- a/lib/seeders/message_seeder.rb +++ b/lib/seeders/message_seeder.rb @@ -6,7 +6,7 @@ module Seeders::MessageSeeder conversation: conversation, message_type: :template, content_type: :input_email, - content: 'Get notified by email' + content: 'Want us to email you a copy of your quote?' ) end @@ -17,7 +17,7 @@ module Seeders::MessageSeeder conversation: conversation, message_type: :template, content_type: :input_csat, - content: 'Please rate the support' + content: 'How would you rate your experience with Paperlayer today?' ) end @@ -41,18 +41,18 @@ module Seeders::MessageSeeder def self.sample_card_item { media_url: 'https://i.imgur.com/d8Djr4k.jpg', - title: 'Acme Shoes 2.0', - description: 'Move with Acme Shoe 2.0', + title: 'Premium Copy Paper - 20lb', + description: 'Bright white, 500 sheets per ream. Perfect for everyday printing.', actions: [ { type: 'link', - text: 'View More', - uri: 'http://acme-shoes.inc' + text: 'View Details', + uri: 'http://paperlayer.com/products/copy-paper' }, { type: 'postback', - text: 'Add to cart', - payload: 'ITEM_SELECTED' + text: 'Request Quote', + payload: 'QUOTE_REQUESTED' } ] } @@ -64,14 +64,14 @@ module Seeders::MessageSeeder inbox: conversation.inbox, conversation: conversation, message_type: :template, - content: 'Your favorite food', + content: 'What type of paper are you interested in?', content_type: 'input_select', content_attributes: { items: [ - { title: '🌯 Burito', value: 'Burito' }, - { title: '🍝 Pasta', value: 'Pasta' }, - { title: ' 🍱 Sushi', value: 'Sushi' }, - { title: ' 🥗 Salad', value: 'Salad' } + { title: '📄 Copy Paper (20lb)', value: 'copy-paper-20' }, + { title: '📋 Cardstock (110lb)', value: 'cardstock-110' }, + { title: '🎨 Colored Paper', value: 'colored-paper' }, + { title: '✨ Premium (32lb)', value: 'premium-32' } ] } ) @@ -92,14 +92,20 @@ module Seeders::MessageSeeder def self.sample_form { items: [ - { name: 'email', placeholder: 'Please enter your email', type: 'email', label: 'Email', required: 'required', - pattern_error: 'Please fill this field', pattern: '^[^\s@]+@[^\s@]+\.[^\s@]+$' }, - { name: 'text_area', placeholder: 'Please enter text', type: 'text_area', label: 'Large Text', required: 'required', - pattern_error: 'Please fill this field' }, - { name: 'text', placeholder: 'Please enter text', type: 'text', label: 'text', default: 'defaut value', required: 'required', - pattern: '^[a-zA-Z ]*$', pattern_error: 'Only alphabets are allowed' }, - { name: 'select', label: 'Select Option', type: 'select', options: [{ label: '🌯 Burito', value: 'Burito' }, - { label: '🍝 Pasta', value: 'Pasta' }] } + { name: 'company', placeholder: 'Your company name', type: 'text', label: 'Company Name', required: 'required', + pattern_error: 'Please enter your company name' }, + { name: 'email', placeholder: 'your.email@company.com', type: 'email', label: 'Email Address', required: 'required', + pattern_error: 'Please enter a valid email', pattern: '^[^\s@]+@[^\s@]+\.[^\s@]+$' }, + { name: 'quantity', placeholder: 'e.g., 50 cases', type: 'text', label: 'Quantity Needed', required: 'required', + pattern_error: 'Please specify quantity' }, + { name: 'paper_type', label: 'Paper Type', type: 'select', options: [ + { label: '📄 Copy Paper (20lb)', value: 'copy-20' }, + { label: '📋 Cardstock (110lb)', value: 'cardstock-110' }, + { label: '🎨 Colored Paper', value: 'colored' }, + { label: '✨ Premium (32lb)', value: 'premium-32' } + ] }, + { name: 'requirements', placeholder: 'Any special requirements or delivery instructions', type: 'text_area', + label: 'Additional Notes', pattern_error: 'Please fill this field' } ] } end @@ -110,12 +116,14 @@ module Seeders::MessageSeeder inbox: conversation.inbox, conversation: conversation, message_type: :template, - content: 'Tech Companies', + content: 'Helpful Resources', content_type: 'article', content_attributes: { items: [ - { title: 'Acme Hardware', description: 'Hardware reimagined', link: 'http://acme-hardware.inc' }, - { title: 'Acme Search', description: 'The best Search Engine', link: 'http://acme-search.inc' } + { title: 'Paper Weight Guide', description: 'Understanding paper weights and their best uses', + link: 'http://paperlayer.com/help/paper-weights' }, + { title: 'Bulk Order Discounts', description: 'Learn about our volume pricing tiers', link: 'http://paperlayer.com/help/bulk-pricing' }, + { title: 'Custom Printing Options', description: 'Letterhead, envelopes, and branded materials', link: 'http://paperlayer.com/help/custom-printing' } ] } ) diff --git a/lib/seeders/seed_data.yml b/lib/seeders/seed_data.yml index 08cb5549b..ac1f73390 100644 --- a/lib/seeders/seed_data.yml +++ b/lib/seeders/seed_data.yml @@ -1,188 +1,107 @@ company: - name: 'PaperLayer' - domain: 'paperlayer.test' + name: 'Paperlayer' + domain: 'paperlayer.com' + users: - - name: 'Michael Scott' + # Sales Team + - name: 'Marcus Chen' gender: male - email: 'michael_scott@paperlayer.test' + email: 'marcus@paperlayer.com' team: - - 'sales' - - 'management' - - 'administration' - - 'warehouse' + - 'Sales' role: 'administrator' - - name: 'David Wallace' - gender: male - email: 'david@paperlayer.test' - team: - - 'Management' - - name: 'Deangelo Vickers' - gender: male - email: 'deangelo@paperlayer.test' - team: - - 'Management' - - name: 'Jo Bennett' + - name: 'Emily Rodriguez' gender: female - email: 'jo@paperlayer.test' - team: - - 'Management' - - name: 'Josh Porter' - gender: male - email: 'josh@paperlayer.test' - team: - - 'Management' - - name: 'Charles Miner' - gender: male - email: 'charles@paperlayer.test' - team: - - 'Management' - - name: 'Ed Truck' - gender: male - email: 'ed@paperlayer.test' - team: - - 'Management' - - name: 'Dan Gore' - gender: male - email: 'dan@paperlayer.test' - team: - - 'Management' - - name: 'Craig D' - gender: male - email: 'craig@paperlayer.test' - team: - - 'Management' - - name: 'Troy Underbridge' - gender: male - email: 'troy@paperlayer.test' - team: - - 'Management' - - name: 'Karen Filippelli' - gender: female - email: 'karn@paperlayer.test' + email: 'emily@paperlayer.com' team: - 'Sales' custom_role: 'Sales Representative' - - name: 'Danny Cordray' - gender: female - email: 'danny@paperlayer.test' + - name: 'David Kim' + gender: male + email: 'david@paperlayer.com' team: - 'Sales' + custom_role: 'Sales Representative' + + # Customer Support Team + - name: 'Jennifer Williams' + gender: female + email: 'jennifer@paperlayer.com' + team: + - 'Customer Support' + role: 'administrator' + - name: 'Alex Thompson' + gender: male + email: 'alex@paperlayer.com' + team: + - 'Customer Support' custom_role: 'Customer Support Lead' - - name: 'Ben Nugent' - gender: male - email: 'ben@paperlayer.test' + - name: 'Rachel Green' + gender: female + email: 'rachel@paperlayer.com' team: - - 'Sales' + - 'Customer Support' custom_role: 'Junior Agent' - - name: 'Todd Packer' + + # Operations Team + - name: 'Tom Anderson' gender: male - email: 'todd@paperlayer.test' + email: 'tom@paperlayer.com' + team: + - 'Operations' + role: 'administrator' + - name: 'Lisa Martinez' + gender: female + email: 'lisa@paperlayer.com' + team: + - 'Operations' + custom_role: 'Escalation Handler' + + # Additional Team Members + - name: 'Sarah Johnson' + gender: female + email: 'sarah@paperlayer.com' + role: 'administrator' + - name: 'James Wilson' + gender: male + email: 'james@paperlayer.com' team: - 'Sales' custom_role: 'Sales Representative' - - name: 'Cathy Simms' + - name: 'Maria Garcia' gender: female - email: 'cathy@paperlayer.test' + email: 'maria@paperlayer.com' team: - - 'Administration' + - 'Customer Support' + - name: 'Robert Taylor' + gender: male + email: 'robert@paperlayer.com' + team: + - 'Operations' + - name: 'Linda Brown' + gender: female + email: 'linda@paperlayer.com' + team: + - 'Customer Support' custom_role: 'Knowledge Manager' - - name: 'Hunter Jo' + - name: 'Kevin Zhang' gender: male - email: 'hunter@paperlayer.test' + email: 'kevin@paperlayer.com' team: - - 'Administration' + - 'Sales' custom_role: 'Analytics Specialist' - - name: 'Rolando Silva' - gender: male - email: 'rolando@paperlayer.test' - team: - - 'Administration' - custom_role: 'Junior Agent' - - name: 'Stephanie Wilson' - gender: female - email: 'stephanie@paperlayer.test' - team: - - 'Administration' - custom_role: 'Escalation Handler' - - name: 'Jordan Garfield' - gender: male - email: 'jorodan@paperlayer.test' - team: - - 'Administration' - - name: 'Ronni Carlo' - gender: male - email: 'ronni@paperlayer.test' - team: - - 'Administration' - - name: 'Lonny Collins' - gender: female - email: 'lonny@paperlayer.test' - team: - - 'Warehouse' - custom_role: 'Customer Support Lead' - - name: 'Madge Madsen' - gender: female - email: 'madge@paperlayer.test' - team: - - 'Warehouse' - - name: 'Glenn Max' - gender: female - email: 'glenn@paperlayer.test' - team: - - 'Warehouse' - - name: 'Jerry DiCanio' - gender: male - email: 'jerry@paperlayer.test' - team: - - 'Warehouse' - - name: 'Phillip Martin' - gender: male - email: 'phillip@paperlayer.test' - team: - - 'Warehouse' - - name: 'Michael Josh' - gender: male - email: 'michale_josh@paperlayer.test' - team: - - 'Warehouse' - - name: 'Matt Hudson' - gender: male - email: 'matt@paperlayer.test' - team: - - 'Warehouse' - - name: 'Gideon' - gender: male - email: 'gideon@paperlayer.test' - team: - - 'Warehouse' - - name: 'Bruce' - gender: male - email: 'bruce@paperlayer.test' - team: - - 'Warehouse' - - name: 'Frank' - gender: male - email: 'frank@paperlayer.test' - team: - - 'Warehouse' - - name: 'Louanne Kelley' - gender: female - email: 'louanne@paperlayer.test' - - name: 'Devon White' - gender: male - email: 'devon@paperlayer.test' - custom_role: 'Escalation Handler' - - name: 'Kendall' - gender: male - email: 'kendall@paperlayer.test' - - email: 'sadiq@paperlayer.test' - name: 'Sadiq' - gender: male + teams: - - '💰 Sales' - - '💼 Management' - - '👩‍💼 Administration' - - '🚛 Warehouse' + - name: '💰 Sales' + description: 'Handles all sales inquiries, quotes, and bulk order requests' + allow_auto_assign: true + - name: '💬 Customer Support' + description: 'Provides customer service, product assistance, and order support' + allow_auto_assign: true + - name: '🚛 Operations' + description: 'Manages shipping, logistics, delivery issues, and order fulfillment' + allow_auto_assign: true + custom_roles: - name: 'Customer Support Lead' description: 'Lead support agent with full conversation and contact management' @@ -216,265 +135,1185 @@ custom_roles: - 'conversation_unassigned_manage' - 'conversation_participating_manage' - 'contact_manage' + labels: - - title: 'billing' - color: '#28AD21' - show_on_sidebar: true - - title: 'software' - color: '#8F6EF2' - show_on_sidebar: true - - title: 'delivery' - color: '#A2FDD5' - show_on_sidebar: true - - title: 'ops-handover' - color: '#A53326' - show_on_sidebar: true - - title: 'premium-customer' - color: '#6FD4EF' - show_on_sidebar: true - - title: 'lead' - color: '#F161C8' - show_on_sidebar: true + - title: 'bulk-order' + color: '#00C875' + description: 'Large volume paper orders' + show_on_sidebar: true + - title: 'custom-printing' + color: '#784BD1' + description: 'Custom letterhead and printing requests' + show_on_sidebar: true + - title: 'urgent' + color: '#E2445C' + description: 'Rush delivery needed' + show_on_sidebar: true + - title: 'pricing-inquiry' + color: '#FDAB3D' + description: 'Quote requests and pricing questions' + show_on_sidebar: true + - title: 'delivery-issue' + color: '#9CD326' + description: 'Shipping and delivery concerns' + show_on_sidebar: true + - title: 'product-question' + color: '#579BFC' + description: 'Questions about paper types and products' + show_on_sidebar: true + +canned_responses: + - short_code: 'welcome' + content: 'Thank you for contacting Paperlayer! We''re committed to providing the highest quality paper products for your business. How can I help you today?' + - short_code: 'bulk' + content: 'For bulk orders over 100 reams, we offer competitive wholesale pricing. Let me get you a custom quote. Could you share your estimated monthly paper needs?' + - short_code: 'pricing' + content: 'Our standard pricing for premium white copy paper (20lb, 8.5x11) is $45 per case (10 reams). We offer volume discounts: 10% off for 50-99 cases, 15% off for 100-249 cases, and 20% off for 250+ cases.' + - short_code: 'delivery' + content: 'We offer same-day delivery for local orders (within 50 miles) placed before noon, and 2-3 business days for standard shipping. Rush delivery is available for an additional fee.' + - short_code: 'custom' + content: 'We provide custom letterhead printing services with a minimum order of 5 reams. Typical turnaround is 5-7 business days. Would you like to discuss your design requirements?' + - short_code: 'stock' + content: 'We carry a full range of paper products: copy paper (20lb-32lb), cardstock (65lb-110lb), colored paper, glossy photo paper, and specialty papers. What type are you interested in?' + - short_code: 'closing' + content: 'Thank you for choosing Paperlayer! Is there anything else I can help you with today?' + - short_code: 'followup' + content: 'I wanted to follow up on your recent inquiry. Have you had a chance to review our quote?' + - short_code: 'tracking' + content: 'I can help you track your order. Could you please provide your order number?' + - short_code: 'samples' + content: 'We''d be happy to send you paper samples! What types of paper are you interested in testing?' + - short_code: 'weights' + content: '20lb is our standard weight for everyday printing. 24lb is heavier and more professional. 28lb is perfect for presentations. 32lb is our premium weight for executive communications.' + - short_code: 'discounts' + content: 'We offer tiered volume discounts: 50-99 cases (10% off), 100-249 cases (15% off), 250+ cases (20% off). Plus, you get a dedicated account manager with orders over 100 cases!' + - short_code: 'rush' + content: 'We can expedite your order! Same-day delivery is available for orders placed before noon within 50 miles. Express next-day delivery is also available. Additional fees apply.' + - short_code: 'recycled' + content: 'Yes! Our Eco-Friendly line features 30% post-consumer recycled content and is FSC certified. It''s only $3 more per case than standard paper - great for sustainability!' + - short_code: 'colors' + content: 'We stock pastels (Ivory, Pink, Blue, Green, Yellow) and brights (Red, Orange, Purple). Custom colors are available for bulk orders. What are you looking for?' + +macros: + - name: 'Handle Bulk Order Inquiry' + visibility: 'global' + created_by: 'marcus@paperlayer.com' + actions: + - action_name: 'add_label' + action_params: ['bulk-order'] + - action_name: 'assign_team' + action_params: ['Sales'] + - action_name: 'send_message' + action_params: ['For bulk orders over 100 reams, we offer competitive wholesale pricing. Let me get you a custom quote. Could you share your estimated monthly paper needs?'] + - name: 'Handle Urgent Order' + visibility: 'global' + created_by: 'tom@paperlayer.com' + actions: + - action_name: 'add_label' + action_params: ['urgent'] + - action_name: 'change_priority' + action_params: ['urgent'] + - action_name: 'assign_team' + action_params: ['Operations'] + - action_name: 'send_message' + action_params: ['I see you need this urgently. We offer same-day delivery for orders placed before noon. Let me check our inventory and get this expedited for you.'] + - name: 'Handle Custom Printing Request' + visibility: 'global' + created_by: 'jennifer@paperlayer.com' + actions: + - action_name: 'add_label' + action_params: ['custom-printing'] + - action_name: 'assign_team' + action_params: ['Customer Support'] + - action_name: 'send_message' + action_params: ['We provide custom letterhead printing services with a minimum order of 5 reams. Typical turnaround is 5-7 business days. Would you like to discuss your design requirements?'] + - name: 'Route to Sales Team' + visibility: 'global' + created_by: 'marcus@paperlayer.com' + actions: + - action_name: 'add_label' + action_params: ['pricing-inquiry'] + - action_name: 'assign_team' + action_params: ['Sales'] + - action_name: 'send_message' + action_params: ['I''d be happy to provide pricing information. To give you the most accurate quote, could you let me know: 1) Paper type/weight you need, 2) Quantity required, 3) Delivery location?'] + - name: 'Escalate to Operations' + visibility: 'global' + created_by: 'tom@paperlayer.com' + actions: + - action_name: 'add_label' + action_params: ['delivery-issue'] + - action_name: 'assign_team' + action_params: ['Operations'] + - action_name: 'change_priority' + action_params: ['high'] + - name: 'Close with Satisfaction Check' + visibility: 'global' + created_by: 'sarah@paperlayer.com' + actions: + - action_name: 'send_message' + action_params: ['Thank you for choosing Paperlayer! Is there anything else I can help you with today?'] + - action_name: 'resolve_conversation' + +portals: + - name: 'Paperlayer Help Center' + slug: 'paperlayer-help' + page_title: 'Paperlayer - Help & Support' + header_text: 'How can we help you with your paper needs?' + color: '#0066CC' + config: + allowed_locales: ['en'] + default_locale: 'en' + categories: + - name: 'Getting Started' + slug: 'getting-started' + description: 'Learn the basics of ordering from Paperlayer' + locale: 'en' + position: 1 + articles: + - title: 'How to Place Your First Order' + author: 'sarah@paperlayer.com' + description: 'Step-by-step guide to placing your first paper order' + status: 'published' + locale: 'en' + content: | + # How to Place Your First Order + + Welcome to Paperlayer! We're excited to help you with your paper needs. + + ## Step 1: Browse Our Products + Visit our product catalog to explore our wide range: + - Copy Paper (20lb, 24lb, 28lb, 32lb) + - Cardstock (65lb, 80lb, 110lb) + - Specialty Papers (colored, glossy, recycled) + + ## Step 2: Request a Quote + Contact our sales team via: + - Live chat on our website + - Email: sales@paperlayer.com + - Phone: 1-800-PAPER-01 + + ## Step 3: Review and Approve + Our team will send you a detailed quote within 24 hours. + + ## Step 4: Place Your Order + Once approved, we'll process your order and provide tracking. + + ## Step 5: Delivery + - Standard: 2-3 business days (FREE over $100) + - Same-day: Available for local orders before noon + + - title: 'Understanding Paper Weights' + author: 'sarah@paperlayer.com' + description: 'Learn about different paper weights and their best uses' + status: 'published' + locale: 'en' + content: | + # Understanding Paper Weights + + Paper weight can be confusing. Let us help you choose the right weight. + + ## Copy Paper Weights + + ### 20lb (75 gsm) - Standard + - Most common for everyday printing + - Great for internal documents + - Economical for high-volume + + ### 24lb (90 gsm) - Premium + - Heavier feel, more professional + - Ideal for presentations, resumes + - Less see-through than 20lb + + ### 28lb (105 gsm) - Super Premium + - Excellent for important documents + - Professional brochures + - High-quality letterhead + + ### 32lb (120 gsm) - Ultra Premium + - Luxury feel and appearance + - Executive communications + - Certificates and awards + + ## Cardstock Weights + + ### 65lb (176 gsm) - Light + - Greeting cards, postcards + + ### 80lb (216 gsm) - Medium + - Business cards, invitations + + ### 110lb (298 gsm) - Heavy + - Premium business cards + - High-end invitations + + - name: 'Products & Pricing' + slug: 'products-pricing' + description: 'Information about our paper products and pricing' + locale: 'en' + position: 2 + articles: + - title: 'Copy Paper Product Line' + author: 'marcus@paperlayer.com' + description: 'Complete guide to our copy paper offerings' + status: 'published' + locale: 'en' + content: | + # Copy Paper Product Line + + Paperlayer offers premium paper products for your business. + + ## Standard Copy Paper + **Premium White - 20lb** + - Price: $45 per case (10 reams) + - Brightness: 92 + - Size: 8.5" x 11" + - Sheets: 500 per ream + + **Premium White - 24lb** + - Price: $52 per case + - Brightness: 94 + - More professional feel + + ## Premium Copy Paper + **Ultra White - 28lb** + - Price: $65 per case + - Brightness: 96 + - Perfect for presentations + + **Executive White - 32lb** + - Price: $78 per case + - Brightness: 98 + - Luxury weight + + ## Recycled Paper + **Eco-Friendly - 20lb** + - Price: $48 per case + - 30% post-consumer content + - FSC certified + + ## Volume Discounts + - 50-99 cases: 10% off + - 100-249 cases: 15% off + - 250+ cases: 20% off + + - title: 'Bulk Order Discounts' + author: 'emily@paperlayer.com' + description: 'Learn about our volume pricing tiers' + status: 'published' + locale: 'en' + content: | + # Bulk Order Discounts + + The more you order, the more you save! + + ## Discount Tiers + + ### Tier 1: 50-99 Cases + - **10% discount** + - Perfect for medium offices + + ### Tier 2: 100-249 Cases + - **15% discount** + - Dedicated account manager + - Quarterly supply option + + ### Tier 3: 250+ Cases + - **20% discount** + - Priority customer service + - Free delivery + - Flexible payment terms + + ## Example Savings + **100 cases of Premium White 20lb** + - Regular: $4,500 + - With 15% discount: $3,825 + - **You save: $675!** + + - name: 'Shipping & Delivery' + slug: 'shipping-delivery' + description: 'Delivery options and tracking information' + locale: 'en' + position: 3 + articles: + - title: 'Delivery Options & Times' + author: 'tom@paperlayer.com' + description: 'Choose the delivery option that works for you' + status: 'published' + locale: 'en' + content: | + # Delivery Options & Times + + ## Standard Delivery (FREE) + - **Timeframe:** 2-3 business days + - **Cost:** FREE over $100 + - **Coverage:** Within 200 miles + + ## Express Delivery + - **Timeframe:** Next business day + - **Cost:** $25 flat fee + - **Cutoff:** Order by 3 PM + + ## Same-Day Delivery + - **Timeframe:** Within 6 hours + - **Cost:** $50 flat fee + - **Coverage:** Within 50 miles + - **Cutoff:** Order by 12 PM noon + + ## Tracking + All orders include: + - Real-time tracking number + - Email notifications + - Delivery confirmation + +captain_assistants: + - name: 'Paper Expert' + description: 'AI assistant specialized in helping customers with all their paper product needs' + config: + temperature: 0.7 + feature_faq: true + feature_memory: true + product_name: 'Paperlayer Paper Products' + scenarios: + - title: 'Product Recommendations' + description: 'Help customers choose the right paper products' + enabled: true + instruction: | + When a customer asks about which paper to use, ask clarifying questions: + 1. What will they use it for? (everyday printing, presentations, letterhead, etc.) + 2. What's their volume? + 3. Any special requirements? (recycled, brightness, specific sizes) + + Then recommend appropriate products: + - 20lb for everyday use + - 24lb for professional documents + - 28lb for presentations + - 32lb for executive communications + - Cardstock for business cards + + Always mention relevant discounts and offer to connect with sales for quotes. + + - title: 'Bulk Order Processing' + description: 'Guide customers through bulk order process' + enabled: true + instruction: | + For bulk order inquiries: + 1. Determine their quantity needs + 2. Explain discount tiers: 10% (50-99), 15% (100-249), 20% (250+) + 3. Calculate estimated savings + 4. Explain benefits (account manager, flexible terms) + 5. Offer to connect with bulk sales team + 6. Add the 'bulk-order' label + + - title: 'Shipping Questions' + description: 'Answer delivery and shipping questions' + enabled: true + instruction: | + When customers ask about shipping: + 1. Standard: 2-3 days (FREE over $100) + 2. Express: Next day ($25) + 3. Same-day: 6 hours, order by noon ($50) + 4. Bulk freight: 3-5 days for 100+ cases + + Mention tracking is included. + For urgent needs, emphasize same-day delivery within 50 miles. + + documents: + - name: 'General FAQs' + external_link: 'https://paperlayer.com/faq/general' + status: 'available' + content: | + # Frequently Asked Questions + + ## What are your business hours? + Monday-Friday: 8 AM - 6 PM EST + Saturday: 9 AM - 2 PM EST + Sunday: Closed + + ## Do you offer free shipping? + Yes! Free standard shipping on orders over $100 within 200 miles. + + ## What payment methods do you accept? + - Credit cards (Visa, MC, AmEx, Discover) + - Purchase orders (established accounts) + - ACH/Wire transfer + - Net 30 terms (qualified businesses) + + ## Can I return paper products? + Yes, unopened reams can be returned within 30 days. + + ## What makes Paperlayer different? + - Expert advice on paper selection + - Personal service from dedicated account managers + - Local delivery and same-day service + - Competitive pricing with volume discounts + + - name: 'Product Specifications' + external_link: 'https://paperlayer.com/faq/products' + status: 'available' + content: | + # Product Specifications FAQs + + ## What does paper brightness mean? + Brightness is measured 0-100. Higher = whiter, brighter. + - 92: Standard brightness + - 94-96: Premium brightness + - 98+: Ultra-premium brightness + + ## What's the difference between 20lb and 24lb? + The number refers to the weight of 500 sheets. + - 20lb: Standard, economical + - 24lb: Heavier, more professional + - 28lb: Premium for presentations + - 32lb: Luxury for executive use + + ## Is your paper acid-free? + Yes, all our copy paper is acid-free for archival quality. + + ## Do you carry recycled paper? + Yes! Our Eco-Friendly line: 30% post-consumer recycled, FSC certified. + + ## What sizes do you offer? + - Letter: 8.5" x 11" (most common) + - Legal: 8.5" x 14" + - Tabloid: 11" x 17" + - Custom sizes for bulk orders + + ## Can I get colored paper? + Yes! Pastels: Ivory, Pink, Blue, Green, Yellow + Brights: Red, Orange, Purple + Custom colors for bulk orders + + - name: 'Bulk Ordering Guide' + external_link: 'https://paperlayer.com/guides/bulk-orders' + status: 'available' + content: | + # Bulk Ordering Guide + + ## Benefits of Bulk Orders + + ### Cost Savings + - 50-99 cases: Save 10% + - 100-249 cases: Save 15% + - 250+ cases: Save 20% + + ### Additional Perks + - Dedicated account manager + - Priority customer service + - Flexible payment terms (Net 30/60/90) + - Free delivery on orders over 100 cases + - Scheduled recurring deliveries + + ## How to Place a Bulk Order + + 1. Contact our bulk sales team + - Email: bulk@paperlayer.com + - Phone: 1-800-BULK-PAPER + + 2. Discuss your needs + - Types of paper needed + - Estimated volume + - Delivery schedule + + 3. Receive custom quote within 24 hours + + 4. Review and sign agreement + - No long-term contracts required + - Flexible terms available + + ## Storage Tips + - Store in cool, dry place (60-70°F) + - Keep away from direct sunlight + - Maintain 40-60% humidity + - Store flat, not on edge + contacts: - - name: "Lorrie Trosdall" - email: "ltrosdall0@bravesites.test" - gender: 'female' - conversations: - - channel: Channel::WebWidget - messages: + # Bulk Order Customers + - name: "David Wallace" + email: "david@techcorp.com" + gender: 'male' + conversations: + - channel: Channel::WebWidget + priority: high + assignee: marcus@paperlayer.com + labels: + - bulk-order + - pricing-inquiry + messages: - message_type: incoming - content: Hi, I'm having trouble logging in to my account. + content: "Hi, I need a quote for 200 cases of copy paper for our corporate offices. What kind of pricing can you offer?" - message_type: outgoing - sender: michael_scott@paperlayer.test - content: Hi! Sorry to hear that. Can you please provide me with your username and email address so I can look into it for you? - - name: "Tiffanie Cloughton" - email: "tcloughton1@newyorker.test" - gender: 'female' - conversations: - - channel: Channel::FacebookPage - messages: + sender: marcus@paperlayer.com + content: "Great! For 200 cases, you qualify for our 15% volume discount. That brings the price down to $38.25 per case. Would you like me to prepare a formal quote?" - message_type: incoming - content: Hi, I need some help with my billing statement. - - message_type: outgoing - sender: michael_scott@paperlayer.test - content: Hello! I'd be happy to assist you with that. Can you please tell me which billing statement you're referring to? - - name: "Melonie Keatch" - email: "mkeatch2@reuters.test" - gender: 'female' - conversations: - - channel: Channel::TwitterProfile - messages: + content: "Yes please. How soon can you deliver to multiple locations?" + + - name: "Sarah Mitchell" + email: "sarah.mitchell@globalent.com" + gender: 'female' + conversations: + - channel: Channel::Email + source_id: "sarah.mitchell@globalent.com" + priority: medium + assignee: emily@paperlayer.com + labels: + - bulk-order + messages: - message_type: incoming - content: Hi, I think I accidentally deleted some important files. Can you help me recover them? + content: "We're opening 5 new offices and need to set up recurring paper orders. Can you help with bulk pricing?" - message_type: outgoing - sender: michael_scott@paperlayer.test - content: Of course! Can you please tell me what type of files they were and where they were located on your device? - - name: "Olin Canniffe" - email: "ocanniffe3@feedburner.test" - gender: 'male' - conversations: - - channel: Channel::Whatsapp - source_id: "123456723" - messages: + sender: emily@paperlayer.com + content: "Absolutely! For recurring orders over 250 cases, you get 20% off plus a dedicated account manager. When would be a good time to discuss the details?" + + # Custom Printing Requests + - name: "Jessica Turner" + email: "j.turner@summit.com" + gender: 'female' + conversations: + - channel: Channel::WebWidget + assignee: alex@paperlayer.com + labels: + - custom-printing + messages: - message_type: incoming - content: Hi, I'm having trouble connecting to the internet. + content: "Do you offer custom letterhead printing? We need about 10 reams with our company logo." - message_type: outgoing - sender: michael_scott@paperlayer.test - content: I'm sorry to hear that. Have you tried restarting your modem/router? If that doesn't work, please let me know and I can provide further assistance. - - name: "Viviene Corp" - email: "vcorp4@instagram.test" - gender: 'female' - conversations: - - channel: Channel::Sms - source_id: "+1234567" - messages: + sender: alex@paperlayer.com + content: "Yes! We can do custom letterhead with a minimum order of 5 reams. For 10 reams on 28lb premium paper, it would be around $200. Turnaround is 5-7 business days. Do you have your design file ready?" + + - name: "Michael Stevens" + email: "mstevens@brightfuture.com" + gender: 'male' + conversations: + - channel: Channel::WebWidget + priority: urgent + assignee: jennifer@paperlayer.com + labels: + - custom-printing + - urgent + messages: - message_type: incoming - content: Hi, I'm having trouble with the mobile app. It keeps crashing. + content: "We have a trade show next week and need 1000 business cards ASAP. Can you rush this?" - message_type: outgoing - sender: michael_scott@paperlayer.test - content: I'm sorry to hear that. Can you please try uninstalling and reinstalling the app and see if that helps? If not, please let me know and I can look into it further. - - name: "Drake Pittway" - email: "dpittway5@chron.test" - gender: 'male' - conversations: - - channel: Channel::Line - messages: + sender: jennifer@paperlayer.com + content: "For rush orders, we can turn it around in 2-3 business days for an additional $50 rush fee. Would that work for your timeline?" + + # Urgent Delivery + - name: "Ryan Howard" + email: "ryan@metrosolutions.com" + gender: 'male' + conversations: + - channel: Channel::WebWidget + priority: urgent + assignee: tom@paperlayer.com + labels: + - urgent + - delivery-issue + messages: - message_type: incoming - content: Hi, I'm trying to update my account information but it won't save. + content: "EMERGENCY! We ran out of paper and have a big presentation tomorrow morning. Can you deliver today?" - message_type: outgoing - sender: michael_scott@paperlayer.test - content: Sorry for the inconvenience. Can you please provide me with the specific information you're trying to update and the error message you're receiving? - - name: "Klaus Crawley" - email: "kcrawley6@narod.ru" - gender: 'male' - conversations: - - channel: Channel::WebWidget - messages: + sender: tom@paperlayer.com + content: "Yes, we can do same-day delivery within 50 miles if you order before noon. What's your location and how many reams do you need?" - message_type: incoming - content: Hi, I need some help setting up my new device. - - message_type: outgoing - sender: michael_scott@paperlayer.test - content: No problem! Can you please tell me the make and model of your device and what specifically you need help with? - - name: "Bing Cusworth" - email: "bcusworth7@arstechnica.test" - gender: 'male' - conversations: - - channel: Channel::TwitterProfile - messages: + content: "We're downtown and need 50 reams of premium white paper. How much for rush delivery?" + + - name: "Amanda Foster" + email: "afoster@pacificgroup.com" + gender: 'female' + conversations: + - channel: Channel::WebWidget + priority: urgent + assignee: lisa@paperlayer.com + labels: + - urgent + messages: - message_type: incoming - content: Hi, I accidentally placed an order for the wrong item. Can I cancel it? + content: "Can you deliver 30 reams by end of day? We have an urgent project." - message_type: outgoing - sender: michael_scott@paperlayer.test - content: I'm sorry to hear that. Can you please provide me with your order number and I'll see if I can cancel it for you? - - name: "Claus Jira" - email: "cjira8@comcast.net" - gender: 'male' - conversations: - - channel: Channel::Whatsapp - source_id: "12323432" - messages: + sender: lisa@paperlayer.com + content: "Yes! For same-day delivery, there's a $50 rush fee. I'll get this processed immediately. What's your delivery address?" + + # Product Questions + - name: "Laura Chen" + email: "laura@alliancepartners.com" + gender: 'female' + conversations: + - channel: Channel::WebWidget + assignee: rachel@paperlayer.com + labels: + - product-question + messages: - message_type: incoming - content: Hi, I'm having trouble with my email. I can't seem to send or receive any messages. + content: "What's the difference between 20lb and 24lb paper? Which one is better for presentations?" - message_type: outgoing - sender: michael_scott@paperlayer.test - content: I'm sorry to hear that. Can you please tell me what email client you're using and if you're receiving any error messages? - - name: "Quent Dalliston" - email: "qdalliston9@zimbio.test" - gender: 'male' - conversations: - - channel: Channel::Whatsapp - source_id: "12342234324" - messages: + sender: rachel@paperlayer.com + content: "20lb is our standard weight for everyday printing. 24lb is heavier with a more professional feel and less see-through. For presentations, I'd definitely recommend 24lb or even 28lb for the best impression!" + + - name: "Daniel Park" + email: "dpark@premierservices.com" + gender: 'male' + conversations: + - channel: Channel::Email + source_id: "dpark@premierservices.com" + assignee: alex@paperlayer.com + labels: + - product-question + - pricing-inquiry + messages: - message_type: incoming - content: Hi, I need some help resetting my password. + content: "Do you have recycled paper options? We're trying to go green and need eco-friendly supplies." - message_type: outgoing - sender: michael_scott@paperlayer.test - content: Sure! Can you please provide me with your username or email address and I'll send you a password reset link? - - name: "Coreen Mewett" - email: "cmewetta@home.pl" - gender: 'female' - conversations: - - channel: Channel::FacebookPage - messages: + sender: alex@paperlayer.com + content: "Yes! Our Eco-Friendly line is 30% post-consumer recycled content and FSC certified. It's $48 per case, just $3 more than standard paper. Great choice for sustainability!" + + # Delivery Issues + - name: "Karen Williams" + email: "kwilliams@apexindustries.com" + gender: 'female' + conversations: + - channel: Channel::Email + source_id: "kwilliams@apexindustries.com" + priority: high + assignee: tom@paperlayer.com + labels: + - delivery-issue + messages: - message_type: incoming - content: Hi, I think someone may have hacked into my account. What should I do? + content: "My order #12345 hasn't arrived yet. It was supposed to be here yesterday. Can you check the status?" - message_type: outgoing - sender: michael_scott@paperlayer.test - content: I'm sorry to hear that. Please change your password immediately and enable two-factor authentication if you haven't already done so. I can also assist you in reviewing your account activity if needed. - - name: "Benyamin Janeway" - email: "bjanewayb@ustream.tv" - gender: 'male' - conversations: - - channel: Channel::Line - messages: + sender: tom@paperlayer.com + content: "I apologize for the delay. Let me track that order for you right away and find out what happened." + + - name: "Christopher Lee" + email: "clee@horizontech.com" + gender: 'male' + conversations: + - channel: Channel::WebWidget + assignee: lisa@paperlayer.com + labels: + - delivery-issue + messages: - message_type: incoming - content: Hi, I have a question about your product features. + content: "What are your delivery hours? We have limited receiving times at our warehouse." - message_type: outgoing - sender: michael_scott@paperlayer.test - content: Sure thing! What specific feature are you interested in learning more about? - - name: "Cordell Dalinder" - email: "cdalinderc@msn.test" - gender: 'male' - conversations: - - channel: Channel::Email - source_id: "cdalinderc@msn.test" - messages: + sender: lisa@paperlayer.com + content: "Our standard delivery window is 9 AM - 5 PM. We can accommodate specific time windows with advance notice. What times work best for you?" - message_type: incoming - content: Hi, I need help setting up my new printer. - - message_type: outgoing - sender: michael_scott@paperlayer.test - content: No problem! Can you please provide me with the make and model of your printer and what type of device you'll be connecting it to? - - name: "Merrile Petruk" - email: "mpetrukd@wunderground.test" - gender: 'female' - conversations: - - channel: Channel::Email - source_id: "mpetrukd@wunderground.test" - priority: urgent - messages: + content: "10 AM - 2 PM would be ideal for us." + + # Pricing Inquiries + - name: "Patricia Harris" + email: "pharris@fusioncons.com" + gender: 'female' + conversations: + - channel: Channel::WebWidget + assignee: marcus@paperlayer.com + labels: + - pricing-inquiry + messages: - message_type: incoming - content: Hi, I'm having trouble accessing a file that I shared with someone. + content: "Can you send me your current price list for all paper weights and types?" - message_type: outgoing - sender: michael_scott@paperlayer.test - content: I'm sorry to hear that. Can you please tell me which file you're having trouble accessing and who you shared it with? I'll do my best to help you regain access. - - name: "Nathaniel Vannuchi" - email: "nvannuchie@photobucket.test" - gender: 'male' - conversations: - - channel: Channel::FacebookPage - priority: high - messages: - - message_type: incoming - content: "Hey there,I need some help with billing, my card is not working on the website." - - name: "Olia Olenchenko" - email: "oolenchenkof@bluehost.test" - gender: 'female' - conversations: - - channel: Channel::WebWidget - priority: high - assignee: michael_scott@paperlayer.test - messages: - - message_type: incoming - content: "Billing section is not working, it throws some error." - - name: "Elisabeth Derington" - email: "ederingtong@printfriendly.test" - gender: 'female' - conversations: - - channel: Channel::Whatsapp - priority: high - source_id: "1223423567" - labels: - - billing - - delivery - - ops-handover - - premium-customer - messages: - - message_type: incoming - content: "Hey \n I didn't get the product delivered, but it shows it is delivered to my address. Please check" - - name: "Willy Castelot" - email: "wcasteloth@exblog.jp" - gender: 'male' - conversations: - - channel: Channel::WebWidget - priority: medium - labels: - - software - - ops-handover - messages: - - message_type: incoming - content: "Hey there, \n I need some help with the product, my button is not working on the website." - - name: "Ophelia Folkard" - email: "ofolkardi@taobao.test" - gender: 'female' - conversations: - - channel: Channel::WebWidget - priority: low - assignee: michael_scott@paperlayer.test - labels: - - billing - - software - - lead - messages: - - message_type: incoming - content: "Hey, \n My card is not working on your website. Please help" - - name: "Candice Matherson" - email: "cmathersonj@va.test" - gender: 'female' - conversations: - - channel: Channel::Email - priority: urgent - source_id: "cmathersonj@va.test" - assignee: michael_scott@paperlayer.test - labels: - - billing - - lead - messages: - - message_type: incoming - content: "Hey, \n I'm looking for some help to figure out if it is the right product for me." - - message_type: outgoing - sender: michael_scott@paperlayer.test - content: Welcome to PaperLayer. Our Team will be getting back you shortly. - - message_type: outgoing - sender: michael_scott@paperlayer.test - content: How may i help you ? - sender: michael_scott@paperlayer.test + sender: marcus@paperlayer.com + content: "Of course! I'll email you our comprehensive price list. Are you interested in standard sizes or do you need custom dimensions as well?" + + - name: "Robert Johnson" + email: "rjohnson@nexushold.com" + gender: 'male' + conversations: + - channel: Channel::Email + source_id: "rjohnson@nexushold.com" + assignee: emily@paperlayer.com + labels: + - pricing-inquiry + - bulk-order + messages: + - message_type: incoming + content: "What kind of discount can you offer for an annual contract of 500+ cases?" + - message_type: outgoing + sender: emily@paperlayer.com + content: "For annual contracts of 500+ cases, you qualify for our top tier 20% discount, plus free delivery, dedicated account manager, and flexible payment terms. I'd love to discuss this further!" + + # Mixed Scenarios + - name: "Elizabeth Brown" + email: "ebrown@zenithpartners.com" + gender: 'female' + conversations: + - channel: Channel::WebWidget + priority: medium + assignee: david@paperlayer.com + labels: + - product-question + - custom-printing + messages: + - message_type: incoming + content: "I need colored paper for our marketing materials. What colors do you stock?" + - message_type: outgoing + sender: david@paperlayer.com + content: "We stock pastels (Ivory, Pink, Blue, Green, Yellow) and brights (Red, Orange, Purple). For bulk orders, we can also do custom colors. What quantities are you looking at?" + + - name: "James Martinez" + email: "jmartinez@atlasgroup.com" + gender: 'male' + conversations: + - channel: Channel::WebWidget + assignee: jennifer@paperlayer.com + messages: + - message_type: incoming + content: "Do you offer volume discounts? We typically order 50-100 cases per quarter." + - message_type: outgoing + sender: jennifer@paperlayer.com + content: "Yes! For 50-99 cases you get 10% off, and for 100-249 cases you get 15% off. With your quarterly volume, you'd qualify for our 10-15% tier. Would you like to discuss a recurring order setup?" + + - name: "Nancy Taylor" + email: "ntaylor@infinitysol.com" + gender: 'female' + conversations: + - channel: Channel::Email + source_id: "ntaylor@infinitysol.com" + priority: low + assignee: rachel@paperlayer.com + labels: + - product-question + messages: + - message_type: incoming + content: "What's the shelf life of paper? We're considering buying in bulk but worried about storage." + - message_type: outgoing + sender: rachel@paperlayer.com + content: "Paper stored properly in a cool, dry place will last indefinitely! Just keep it at 60-70°F with 40-60% humidity, away from direct sunlight. Many of our customers stock 6-12 months worth with no issues." + + - name: "Steven Clark" + email: "sclark@eclipseent.com" + gender: 'male' + conversations: + - channel: Channel::WebWidget + priority: high + assignee: marcus@paperlayer.com + labels: + - bulk-order + - urgent + messages: + - message_type: incoming + content: "We need 150 cases delivered next week. Can you handle that volume on short notice?" + - message_type: outgoing + sender: marcus@paperlayer.com + content: "Absolutely! We have that in stock. For 150 cases, you get our 15% volume discount. With express delivery, we can have it there within 2-3 business days. Shall I prepare the quote?" + + - name: "Michelle Adams" + email: "madams@quantumlabs.com" + gender: 'female' + conversations: + - channel: Channel::WebWidget + assignee: alex@paperlayer.com + labels: + - custom-printing + messages: + - message_type: incoming + content: "Can you help with envelope printing to match our custom letterhead?" + - message_type: outgoing + sender: alex@paperlayer.com + content: "Yes! We can print envelopes to match your letterhead design. Minimum order is 500 envelopes. Would you like me to send you pricing and design specifications?" + + # UNASSIGNED CONVERSATIONS + - name: "Brian Cooper" + email: "bcooper@techstart.com" + gender: 'male' + conversations: + - channel: Channel::WebWidget + priority: medium + labels: + - pricing-inquiry + messages: + - message_type: incoming + content: "Hi! I'm looking for a quote on 75 cases of 24lb paper. What's your best price?" + + - name: "Samantha Lee" + email: "slee@innovatecorp.com" + gender: 'female' + conversations: + - channel: Channel::WebWidget + labels: + - product-question + messages: + - message_type: incoming + content: "Do you have any paper options that are certified sustainable or eco-friendly?" + + - name: "Timothy Davis" + email: "tdavis@startupventures.com" + gender: 'male' + conversations: + - channel: Channel::Email + source_id: "tdavis@startupventures.com" + priority: high + labels: + - bulk-order + - pricing-inquiry + messages: + - message_type: incoming + content: "We're a fast-growing startup and need to set up a regular paper supply. What kind of programs do you have for recurring orders?" + + - name: "Angela White" + email: "awhite@designstudio.com" + gender: 'female' + conversations: + - channel: Channel::WebWidget + labels: + - custom-printing + messages: + - message_type: incoming + content: "I need 2000 business cards printed on thick cardstock. What's your turnaround time and pricing?" + + - name: "Victor Santos" + email: "vsantos@manufacturingco.com" + gender: 'male' + conversations: + - channel: Channel::WebWidget + priority: urgent + labels: + - urgent + - delivery-issue + messages: + - message_type: incoming + content: "URGENT: Our shipment was supposed to arrive yesterday but we haven't received it. Order #78934. Can someone check on this ASAP?" + + - name: "Rebecca Martinez" + email: "rmartinez@consultingfirm.com" + gender: 'female' + conversations: + - channel: Channel::Email + source_id: "rmartinez@consultingfirm.com" + messages: + - message_type: incoming + content: "What's the difference between your standard brightness and premium brightness paper? Is it worth the extra cost?" + + - name: "Gregory Moore" + email: "gmoore@lawfirm.com" + gender: 'male' + conversations: + - channel: Channel::WebWidget + priority: medium + labels: + - custom-printing + - pricing-inquiry + messages: + - message_type: incoming + content: "We need custom letterhead for our law firm - very professional looking. Can you provide samples of your premium paper stock?" + + - name: "Diana Foster" + email: "dfoster@realestate.com" + gender: 'female' + conversations: + - channel: Channel::WebWidget + messages: + - message_type: incoming + content: "I need colored paper for flyers - bright colors that will stand out. What do you have available?" + + # MORE ASSIGNED CONVERSATIONS + - name: "Andrew Phillips" + email: "aphillips@financecorp.com" + gender: 'male' + conversations: + - channel: Channel::WebWidget + assignee: marcus@paperlayer.com + priority: high + labels: + - bulk-order + - pricing-inquiry + messages: + - message_type: incoming + content: "We need 300 cases for Q2. Can you provide a detailed quote including delivery to 3 different office locations?" + - message_type: outgoing + sender: marcus@paperlayer.com + content: "Absolutely! For 300 cases you qualify for our top 20% discount. I'll prepare a detailed quote for multi-location delivery. Can you provide the three delivery addresses?" + + - name: "Monica Richardson" + email: "mrichardson@healthcare.com" + gender: 'female' + conversations: + - channel: Channel::Email + source_id: "mrichardson@healthcare.com" + assignee: jennifer@paperlayer.com + labels: + - product-question + messages: + - message_type: incoming + content: "We're a medical practice and print a lot of patient forms. What paper weight would you recommend for forms that need to go through a printer and be easy to write on?" + - message_type: outgoing + sender: jennifer@paperlayer.com + content: "For medical forms, I'd recommend our 24lb paper. It's heavy enough to feel professional and prevents bleed-through when writing, but still feeds smoothly through printers. Would you like to order some samples to test?" + + - name: "Kenneth Baker" + email: "kbaker@schooldistrict.edu" + gender: 'male' + conversations: + - channel: Channel::WebWidget + assignee: emily@paperlayer.com + priority: medium + labels: + - bulk-order + - pricing-inquiry + messages: + - message_type: incoming + content: "Our school district needs to order paper for the upcoming semester. We're looking at around 400 cases. Do you offer educational discounts?" + - message_type: outgoing + sender: emily@paperlayer.com + content: "Yes! For educational institutions, we offer our standard 20% bulk discount on 250+ cases, plus we can provide flexible payment terms. I'd love to discuss your specific needs - when does your semester start?" + + - name: "Brenda Hayes" + email: "bhayes@printshop.com" + gender: 'female' + conversations: + - channel: Channel::WebWidget + assignee: david@paperlayer.com + labels: + - bulk-order + messages: + - message_type: incoming + content: "We're a print shop and go through A LOT of paper. Need to set up weekly deliveries. Can you handle that?" + - message_type: outgoing + sender: david@paperlayer.com + content: "Absolutely! We have several print shops as clients with scheduled weekly deliveries. What's your typical weekly volume? We can set up automatic ordering and delivery to keep you stocked." + + - name: "Frank Wright" + email: "fwright@architectfirm.com" + gender: 'male' + conversations: + - channel: Channel::Email + source_id: "fwright@architectfirm.com" + assignee: alex@paperlayer.com + labels: + - product-question + - custom-printing + messages: + - message_type: incoming + content: "Do you carry 11x17 paper for architectural drawings? We need something heavier than standard copy paper." + - message_type: outgoing + sender: alex@paperlayer.com + content: "Yes! We carry 11x17 in both 28lb and 32lb weights, which are perfect for architectural prints. The 32lb gives an extra professional feel. Would you like pricing for both options?" + + - name: "Dorothy Collins" + email: "dcollins@nonprofitorg.org" + gender: 'female' + conversations: + - channel: Channel::WebWidget + assignee: rachel@paperlayer.com + priority: low + labels: + - pricing-inquiry + messages: + - message_type: incoming + content: "We're a nonprofit organization. Do you offer any special pricing for nonprofits?" + - message_type: outgoing + sender: rachel@paperlayer.com + content: "Yes! We support nonprofits with special pricing. Our bulk discounts apply, and for registered 501(c)(3) organizations, we can offer an additional 5% off. What's your typical monthly paper usage?" + + # MORE UNASSIGNED + - name: "Peter Nelson" + email: "pnelson@marketingagency.com" + gender: 'male' + conversations: + - channel: Channel::WebWidget + priority: medium + labels: + - custom-printing + messages: + - message_type: incoming + content: "We need to print glossy marketing materials. Do you offer photo paper or glossy cardstock?" + + - name: "Catherine Brooks" + email: "cbrooks@accounting.com" + gender: 'female' + conversations: + - channel: Channel::Email + source_id: "cbrooks@accounting.com" + labels: + - product-question + messages: + - message_type: incoming + content: "For tax documents and client files, what paper do you recommend? We need something that feels professional and will last." + + - name: "Raymond Scott" + email: "rscott@insurance.com" + gender: 'male' + conversations: + - channel: Channel::WebWidget + messages: + - message_type: incoming + content: "Just wanted to say we received our last order and the quality was excellent! Looking to reorder the same 100 cases." + + - name: "Helen Garcia" + email: "hgarcia@eventplanning.com" + gender: 'female' + conversations: + - channel: Channel::WebWidget + priority: urgent + labels: + - urgent + - custom-printing + messages: + - message_type: incoming + content: "We have an event in 4 days and need 500 programs printed on nice cardstock. Is this possible?" + + - name: "Albert Turner" + email: "aturner@construction.com" + gender: 'male' + conversations: + - channel: Channel::WebWidget + labels: + - delivery-issue + messages: + - message_type: incoming + content: "Can you deliver to a construction site? We need paper for our on-site office but the address might be tricky." + + - name: "Sandra Mitchell" + email: "smitchell@retailchain.com" + gender: 'female' + conversations: + - channel: Channel::Email + source_id: "smitchell@retailchain.com" + priority: high + labels: + - bulk-order + messages: + - message_type: incoming + content: "We have 12 retail locations and need coordinated delivery to all of them. Can you handle multi-location deliveries?" + + - name: "Walter Campbell" + email: "wcampbell@engineering.com" + gender: 'male' + conversations: + - channel: Channel::WebWidget + messages: + - message_type: incoming + content: "Looking for paper that works well with laser printers - we print thousands of engineering specs daily." + + - name: "Donna Kelly" + email: "dkelly@university.edu" + gender: 'female' + conversations: + - channel: Channel::WebWidget + priority: medium + labels: + - bulk-order + - pricing-inquiry + messages: + - message_type: incoming + content: "Our university bookstore wants to stock Paperlayer products. Do you have a wholesale program?" + + - name: "Carl Rodriguez" + email: "crodriguez@government.gov" + gender: 'male' + conversations: + - channel: Channel::Email + source_id: "crodriguez@government.gov" + labels: + - bulk-order + messages: + - message_type: incoming + content: "Government agency here - we need to submit purchase orders through our procurement system. Do you accept government POs?" + + - name: "Patricia Evans" + email: "pevans@photography.com" + gender: 'female' + conversations: + - channel: Channel::WebWidget + labels: + - product-question + messages: + - message_type: incoming + content: "I'm a photographer and need high-quality photo paper for client prints. What options do you have?" + + - name: "Joshua King" + email: "jking@techsupport.com" + gender: 'male' + conversations: + - channel: Channel::WebWidget + assignee: lisa@paperlayer.com + priority: medium + labels: + - delivery-issue + messages: + - message_type: incoming + content: "We ordered 2 days ago and need to change the delivery address. Order #89432. Is it too late?" + - message_type: outgoing + sender: lisa@paperlayer.com + content: "Let me check on that order for you right away. If it hasn't shipped yet, we can update the address. One moment please." + + - name: "Betty Lewis" + email: "blewis@bookpublisher.com" + gender: 'female' + conversations: + - channel: Channel::WebWidget + assignee: marcus@paperlayer.com + labels: + - bulk-order + - product-question + messages: + - message_type: incoming + content: "We're a book publisher looking for high-quality paper for limited edition prints. Need something special - recommendations?" + - message_type: outgoing + sender: marcus@paperlayer.com + content: "For limited edition book printing, I'd recommend our 32lb Ultra Premium paper with 98 brightness. It has a luxurious feel perfect for collectors' editions. We also offer cream-colored options if you prefer that classic book aesthetic." + + - name: "Donald Harris" + email: "dharris@franchise.com" + gender: 'male' + conversations: + - channel: Channel::Email + source_id: "dharris@franchise.com" + assignee: emily@paperlayer.com + priority: high + labels: + - bulk-order + messages: + - message_type: incoming + content: "We're opening 5 franchise locations next month. Need to coordinate bulk orders for all locations. Can we get one invoice?" + - message_type: outgoing + sender: emily@paperlayer.com + content: "Absolutely! We handle multi-location franchises regularly. We can coordinate all deliveries and provide one consolidated invoice. Plus you'll qualify for our 20% bulk discount. Let's discuss your specific needs for each location." + + - name: "Barbara Parker" + email: "bparker@dentaloffice.com" + gender: 'female' + conversations: + - channel: Channel::WebWidget + assignee: jennifer@paperlayer.com + messages: + - message_type: incoming + content: "Our dental office goes through about 10 cases per month. Can we set up automatic monthly delivery?" + - message_type: outgoing + sender: jennifer@paperlayer.com + content: "Perfect! We can absolutely set up recurring monthly deliveries. With 10 cases per month, you qualify for our 10% volume discount. I'll set this up for you - what date works best for delivery each month?" + + - name: "Ronald Adams" + email: "radams@cardealer.com" + gender: 'male' + conversations: + - channel: Channel::WebWidget + assignee: david@paperlayer.com + labels: + - custom-printing + messages: + - message_type: incoming + content: "We need custom printed paper for vehicle contracts - need company logo watermarked. Can you do this?" + - message_type: outgoing + sender: david@paperlayer.com + content: "Yes! We can do custom watermarked paper for your contracts. For legal documents, I'd recommend 28lb weight. Minimum order is 10 reams. Would you like to discuss your logo specifications?" + + - name: "Sharon Thomas" + email: "sthomas@advertising.com" + gender: 'female' + conversations: + - channel: Channel::WebWidget + assignee: alex@paperlayer.com + priority: high + labels: + - custom-printing + - urgent + messages: + - message_type: incoming + content: "Client presentation tomorrow! Need 200 color copies on premium paper. Too late?" + - message_type: outgoing + sender: alex@paperlayer.com + content: "We can help! If you can get your files to us by 2 PM today, we can have 200 color copies on 32lb premium paper ready for pickup tomorrow morning. Would that work?"