# Facebook Ads Template
channel: facebook_ads
priority: 2
language: [th, en]

# Field specifications (matches Meta Ads API structure)
fields:
  primary_text:
    max_chars: 5000
    recommended_chars: 125
    thai_note: "Thai text can be slightly longer. Focus on benefit in first 125 chars."
    
  headline:
    max_chars: 40
    recommended_chars: 25-30
    thai_note: "Thai characters may display differently. Test on mobile."
    
  description:
    max_chars: 90
    recommended_chars: 60-75
    optional: true
    thai_note: "Additional context below headline"
    
  cta:
    type: selection
    button_types:
      - "LEARN_MORE"  # เรียนรู้เพิ่มเติม
      - "SHOP_NOW"  # ซื้อเลย
      - "SIGN_UP"  # ลงทะเบียน
      - "CONTACT_US"  # ติดต่อเรา
      - "DOWNLOAD"  # ดาวน์โหลด
      - "GET_QUOTE"  # ขอใบเสนอราคา
      
  image:
    recommended_size: "1080x1080"  # 1:1 square (best for feed)
    alternative_sizes:
      - "1200x628"  # 1.91:1 link
      - "1080x1920" # 9:16 stories/reels
    aspect_ratios: ["1:1", "1.91:1", "9:16", "4:5"]
    formats: ["jpg", "png", "gif", "mp4", "mov"]
    max_file_size: "30MB"
    video_specs:
      max_duration: "240 minutes"
      recommended_duration: "15-60 seconds"
      
  carousel:
    enabled: true
    min_cards: 2
    max_cards: 10
    card_specs:
      image_size: "1080x1080"
      headline_max_chars: 40
      description_max_chars: 90
      
  audience_targeting:
    location: ["Thailand", "specific provinces"]
    age_range: "18-65+"
    interests: []
    behaviors: []
    custom_audiences: []
    lookalike_audiences: []
    
  placement:
    automatic: true
    manual_options:
      - "facebook_feed"
      - "facebook_stories"
      - "instagram_feed"
      - "instagram_stories"
      - "messenger"
      - "audience_network"
      
  budget:
    type: ["daily", "lifetime"]
    currency: "THB"
    min_daily: 50
    min_lifetime: 500

# Output configuration
output:
  variations: 5
  format: json
  include_api_metadata: true
  ready_for_import: true
  
# Quality requirements
quality:
  min_score: 75
  checks:
    - keyword_density
    - brand_voice_alignment
    - thai_formality_level
    - cta_clarity
    - compliance_check
    - landing_page_relevance

# API readiness (for future Meta Ads API integration)
api_ready:
  platform: meta
  api_version: v18.0
  endpoints:
    creative: "/act_{ad_account_id}/adcreatives"
    ad: "/act_{ad_account_id}/ads"
    adset: "/act_{ad_account_id}/adsets"
    campaign: "/act_{ad_account_id}/campaigns"
    
  field_mapping:
    primary_text: body
    headline: title
    description: description
    cta: call_to_action.type
    image: object_story_id or link_data
    audience: targeting
    placement: placements
    budget: daily_budget or lifetime_budget
    
  future_integration_notes:
    - "Add pixel_id for conversion tracking"
    - "Add conversion_event for optimization goal"
    - "Add bid_strategy for bid optimization"
    - "Add frequency_cap for reach campaigns"
