File size: 1,490 Bytes
3f7a9b2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import type { DecideInput } from '../../src/index.js'

export const input = {
  state: {
    message: 'My card was charged twice for the same order. Please refund the duplicate charge.',
    order: { status: 'paid', paymentCount: 2 }
  },
  decisions: [
    {
      id: 'intent',
      type: 'choice',
      instruction: 'Identify the primary intent of the customer.',
      options: [
        { value: 'refund', description: 'The customer wants to recover money charged.' },
        { value: 'cancel', description: 'The customer wants to cancel an order.' },
        { value: 'other', description: 'The request does not match the other intents.' }
      ]
    },
    {
      id: 'duplicateCharge',
      type: 'noul',
      instruction: 'The customer was charged twice for the same order.',
      outcomes: {
        false: { description: 'There was one charge or the charges were for different orders.' },
        true: { description: 'The same order was charged more than once.' }
      }
    },
    {
      id: 'urgency',
      type: 'score',
      instruction: 'Rate the urgency of this support request using the ordered levels.',
      levels: [
        { value: 'low', description: 'An informational question without loss or blocked work.' },
        { value: 'medium', description: 'A limited loss or a problem with a workaround.' },
        { value: 'high', description: 'Major loss or blocked work requiring immediate action.' }
      ]
    }
  ]
} as const satisfies DecideInput