pc.json

File: /tmp/pc.json
Language: JSON
Size: 5123 characters, 119 lines

  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
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
{
  "version": "1.0.0",
  "sections": {
    "main": [
      {
        "answer": {}
      },
      {
        "ai": {
          "prompt": {
            "text": "# AI Role\nYou are a virtual assistant for PC Builder Pro, greeting customers and directing them to the right specialist.\n\n# Your Tasks\n1. Greet the customer warmly\n2. Ask for their name\n3. Determine if they need sales (buying/building) or support (technical issues)\n4. Save their context and transfer them to the appropriate specialist\n\n# Important\n- Always get the customer's name first\n- Ask clarifying questions to determine sales vs support\n- Use save_customer_context before transferring\n- Use transfer_to_specialist to complete the transfer"
          },
          "SWAIG": {
            "defaults": {
              "web_hook_url": "https://dev:w00t@abc123.lambda-url.us-east-1.on.aws/swaig/"
            },
            "functions": [
              {
                "function": "save_customer_context",
                "description": "Save customer information before transfer",
                "parameters": {
                  "type": "object",
                  "properties": {}
                },
                "web_hook_url": "https://dev:w00t@abc123.lambda-url.us-east-1.on.aws/swaig/?token=N2NjY2I4NzYtYzU4Ni00MWQwLWE1MWQtMWYwMGNkNzQyMzg4LnNhdmVfY3VzdG9tZXJfY29udGV4dC4xNzQ5NzUyMzc0Ljk1NzdjMWY2LmVlMGJhMTlmZDNkMTQxMGQ="
              },
              {
                "function": "transfer_to_specialist",
                "description": "Transfer to sales or support specialist",
                "parameters": {
                  "type": "object",
                  "properties": {
                    "specialist_type": {
                      "type": "string",
                      "description": "The type of specialist to transfer to (sales or support)"
                    }
                  },
                  "required": [
                    "specialist_type"
                  ]
                },
                "data_map": {
                  "expressions": [
                    {
                      "string": "${args.specialist_type}",
                      "pattern": "/sales/i",
                      "output": {
                        "response": "Perfect! Let me transfer you to our sales specialist right away.",
                        "action": [
                          {
                            "SWML": {
                              "version": "1.0.0",
                              "sections": {
                                "main": [
                                  {
                                    "set": {
                                      "ai_response": "The call with the sales specialist is complete. How else can I help you?"
                                    }
                                  },
                                  {
                                    "transfer": {
                                      "dest": "https://dev:w00t@abc123.lambda-url.us-east-1.on.aws/sales"
                                    }
                                  }
                                ]
                              }
                            }
                          }
                        ],
                        "post_process": true
                      }
                    },
                    {
                      "string": "${args.specialist_type}",
                      "pattern": "/support/i",
                      "output": {
                        "response": "I'll connect you with our technical support specialist right away.",
                        "action": [
                          {
                            "SWML": {
                              "version": "1.0.0",
                              "sections": {
                                "main": [
                                  {
                                    "set": {
                                      "ai_response": "The call with the support specialist is complete. How else can I help you?"
                                    }
                                  },
                                  {
                                    "transfer": {
                                      "dest": "https://dev:w00t@abc123.lambda-url.us-east-1.on.aws/support"
                                    }
                                  }
                                ]
                              }
                            }
                          }
                        ],
                        "post_process": true
                      }
                    },
                    {
                      "string": "${args.specialist_type}",
                      "pattern": "/.*/",
                      "output": {
                        "response": "I can transfer you to either our sales or support specialist. Which would you prefer?"
                      }
                    }
                  ]
                }
              }
            ]
          },
          "params": {}
        }
      }
    ]
  }
}