workflow: post_meeting_crm_update
version: 1.0.0
description: Complete the opportunity record after a customer meeting.

trigger:
  event: meeting.completed

inputs:
  - meeting_transcript
  - opportunity_record

steps:
  - extract:
      fields:
        - customer_goal
        - objections
        - next_step
        - decision_date
  - validate:
      next_step: required
      follow_up_date: future_date
  - write:
      object: opportunity
      fields:
        next_step: "{{next_step}}"
        summary: "{{summary}}"
        follow_up_date: "{{follow_up_date}}"
  - audit:
      include:
        - source_episode_id
        - model_version
        - policy_version

eval:
  dataset: post_meeting_crm_update_v1
  minimum_score: 0.94
  hard_failures:
    - missing_next_step
    - past_follow_up_date
