From 0af656263840209a0b6de7aecaca1488ac7e83a0 Mon Sep 17 00:00:00 2001 From: fortunesmith Date: Thu, 2 Apr 2026 13:50:22 -0400 Subject: [PATCH] add wxcc-dialogflow-fulfillment playbook Imports the dialogflow-sample from WebexSamples/webex-contact-center-api-samples as a new Webex Playbook covering both Dialogflow CX and ES fulfillment webhook patterns for Webex Contact Center Virtual Agent Voice. - Dialogflow CX: standalone Cloud Function (no deps, built-in https) + Functions Framework package.json for local testing + DF_CX_Flow.json + Virtual_agent.zip - Dialogflow ES: Firebase Cloud Functions fulfillment (updated to firebase-admin 11 + firebase-functions 4) + CCAI_Flow_DialogFlowES.json - CX vs ES comparison table in README Use Case Overview and docs/upstream-overview.md - Two Mermaid sequence diagrams (one per generation) in architecture-diagram.md - src/.gitignore guarding node_modules and .env - Validated: all 12 CI checks pass Made-with: Cursor --- .../wxcc-dialogflow-fulfillment/APPHUB.yaml | 131 +++++++++++++ .../wxcc-dialogflow-fulfillment/README.md | 149 +++++++++++++++ .../diagrams/architecture-diagram.md | 95 +++++++++ .../docs/upstream-overview.md | 123 ++++++++++++ .../src/.gitignore | 8 + .../src/dialogflow-cx-sample/DF_CX_Flow.json | 1 + .../dialogflow-cx-sample/Virtual_agent.zip | Bin 0 -> 11642 bytes .../src/dialogflow-cx-sample/inline-editor.js | 96 ++++++++++ .../src/dialogflow-cx-sample/package.json | 17 ++ .../CCAI_Flow_DialogFlowES.json | 1 + .../src/dialogflow-es-sample/inline-editor.js | 180 ++++++++++++++++++ .../src/dialogflow-es-sample/package.json | 21 ++ .../src/env.template | 38 ++++ 13 files changed, 860 insertions(+) create mode 100644 playbooks/wxcc-dialogflow-fulfillment/APPHUB.yaml create mode 100644 playbooks/wxcc-dialogflow-fulfillment/README.md create mode 100644 playbooks/wxcc-dialogflow-fulfillment/diagrams/architecture-diagram.md create mode 100644 playbooks/wxcc-dialogflow-fulfillment/docs/upstream-overview.md create mode 100644 playbooks/wxcc-dialogflow-fulfillment/src/.gitignore create mode 100644 playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-cx-sample/DF_CX_Flow.json create mode 100644 playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-cx-sample/Virtual_agent.zip create mode 100644 playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-cx-sample/inline-editor.js create mode 100644 playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-cx-sample/package.json create mode 100644 playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-es-sample/CCAI_Flow_DialogFlowES.json create mode 100644 playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-es-sample/inline-editor.js create mode 100644 playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-es-sample/package.json create mode 100644 playbooks/wxcc-dialogflow-fulfillment/src/env.template diff --git a/playbooks/wxcc-dialogflow-fulfillment/APPHUB.yaml b/playbooks/wxcc-dialogflow-fulfillment/APPHUB.yaml new file mode 100644 index 0000000..fbeb3d8 --- /dev/null +++ b/playbooks/wxcc-dialogflow-fulfillment/APPHUB.yaml @@ -0,0 +1,131 @@ +# APPHUB.yaml — Playbook metadata for Webex App Hub +# Copy this file into your Playbook folder under playbooks// +# Fill in all required fields. See CONTRIBUTING.md for field rules. + +# ----------------------------------------------------------------------------- +# friendly_id — Unique identifier. Must end with -playbook (e.g. epic-ehr-playbook) +# ----------------------------------------------------------------------------- +friendly_id: "wxcc-dialogflow-fulfillment-playbook" + +# ----------------------------------------------------------------------------- +# title — Display name for the Playbook (matches ContentStack field) +# ----------------------------------------------------------------------------- +title: "Google Dialogflow Virtual Agent Fulfillment for Webex Contact Center" + +# ----------------------------------------------------------------------------- +# tag_line — Short tagline for App Hub detail page (required, max 128 chars) +# ----------------------------------------------------------------------------- +tag_line: "Add AI voice self-service to Webex Contact Center using Google Dialogflow CX or ES fulfillment webhooks" + +# ----------------------------------------------------------------------------- +# description — App Hub supports Markdown. Use a block scalar (description: |) with +# blank lines between sections: opening paragraph (bold key terms), **Why use this +# playbook** (3–5 outcome bullets), **What it does** (concrete behaviors/endpoints). +# Do not put upstream repo URLs or install-only instructions here—use README and +# src/README.md for reference playbooks. See docs/commands/import_playbook.md. +# ----------------------------------------------------------------------------- +description: | + A **Node.js** sample that wires **Google Dialogflow** into **Webex Contact Center** + for AI-powered voice self-service: caller context flows from **WxCC** into a + Dialogflow virtual agent, a **Cloud Functions** webhook fetches account or CRM data, + and the result is spoken back to the caller — all without a separate middleware server. + Covers both **Dialogflow CX** (recommended for new projects) and **Dialogflow ES** + (for teams extending existing agents). + + **Why use this playbook** + + - **Pick the right generation fast:** A side-by-side comparison table in the README + maps Dialogflow CX vs ES across runtime, dependency footprint, WxCC integration path, + and "pick this if…" guidance so you decide before writing a single line. + - **Start from working code:** Both samples are adapted from official **WebexSamples** + and show the exact request/response shapes **WxCC** and **Dialogflow** expect. + - **Lighter where it counts:** The **CX** sample uses only the Node.js built-in + `https` module — no framework overhead — while the **ES** sample shows the full + **Firebase** + `dialogflow-fulfillment` pattern for teams already on that stack. + - **Secrets handled safely:** All backend API URLs load from **environment variables**; + no credentials are hardcoded. + - **Easy to verify locally:** Import the bundled **WxCC flow JSON** files and the + mock API URLs let you confirm end-to-end behavior before connecting a real backend. + + **What it does** + + - Receives a **Dialogflow CX** webhook request and returns a `fulfillment_response` + with an account balance fetched from a configurable backend API. + - Receives a **Dialogflow ES** fulfillment request, reads caller context + (`name`, `email`, `reason`, `pin`) from `originalDetectIntentRequest.payload`, + performs a CRM lookup, sets Dialogflow output context, and returns a personalized + spoken greeting via the `dialogflow-fulfillment` SDK. + - Includes importable **WxCC flow JSON** for both variants so you can wire the + demo end-to-end in **Flow Designer** without building flows from scratch. + +# ----------------------------------------------------------------------------- +# product_types — Where this Playbook appears. Pick one or more. +# Valid: teams | meetings | calling | rooms | contact_center +# ----------------------------------------------------------------------------- +product_types: + - "contact_center" + +# ----------------------------------------------------------------------------- +# categories — App Hub category slugs. Pick one or more. +# Verticals: healthcare | financial-services | retail-ecommerce +# App categories (use kebab-case slugs): +# ai-agent-testing-observability | agent-supervisor-tools | analytics | +# calendar-scheduling | collaboration-management | customer-relations | +# customer-support | developer-tools | doc-management | education | +# finance | government | healthcare | human-resources | internet-of-things | +# marketing-sales | orchestration | platform | productivity | +# project-management | recording-transcriptions | security-compliance | +# self-service-bots | social-and-fun | strategy-team-planning | +# workflow-automation | workforce-optimization | other +# ----------------------------------------------------------------------------- +categories: + - "developer-tools" + - "self-service-bots" + - "customer-support" + +# ----------------------------------------------------------------------------- +# company_name — Your company or team name +# ----------------------------------------------------------------------------- +company_name: "Webex for Developers" + +# ----------------------------------------------------------------------------- +# company_url — Your company or project URL +# ----------------------------------------------------------------------------- +company_url: "https://developer.webex.com" + +# ----------------------------------------------------------------------------- +# support_url — Issues or support link (e.g. GitHub issues) +# ----------------------------------------------------------------------------- +support_url: "https://github.com/webex/webexplaybooks/issues" + +# ----------------------------------------------------------------------------- +# product_url — Link to this Playbook in the repo (required) +# ----------------------------------------------------------------------------- +product_url: "https://github.com/webex/webexplaybooks/tree/main/playbooks/wxcc-dialogflow-fulfillment" + +# ----------------------------------------------------------------------------- +# logo — (Optional) URL to your logo image. If not provided, defaults to the +# standard Webex Playbook logo. +# ----------------------------------------------------------------------------- +logo: "https://images.contentstack.io/v3/assets/bltd14fd2a03236233f/blta2de9daa773c6604/60f71f81e2de935fc7e35dbe/download" + +# ----------------------------------------------------------------------------- +# estimated_implementation_time — e.g. "2-4 hours", "1 day" +# ----------------------------------------------------------------------------- +estimated_implementation_time: "2-4 hours" + +# ----------------------------------------------------------------------------- +# third_party_tool — (Optional) The tool being integrated (e.g. Salesforce, Epic) +# Omit for generic playbooks (e.g. "any CMS") +# ----------------------------------------------------------------------------- +third_party_tool: "Google Dialogflow" + +# ----------------------------------------------------------------------------- +# privacy_url — Privacy policy URL (required; use Cisco default for Webex-authored) +# ----------------------------------------------------------------------------- +privacy_url: "https://www.cisco.com/c/en/us/about/legal/privacy-full.html" + +# ----------------------------------------------------------------------------- +# submission_date — (Optional) ISO date (e.g. 2025-03-01) +# ----------------------------------------------------------------------------- +submission_date: "2026-04-02" diff --git a/playbooks/wxcc-dialogflow-fulfillment/README.md b/playbooks/wxcc-dialogflow-fulfillment/README.md new file mode 100644 index 0000000..86713d3 --- /dev/null +++ b/playbooks/wxcc-dialogflow-fulfillment/README.md @@ -0,0 +1,149 @@ +# Google Dialogflow Virtual Agent Fulfillment for Webex Contact Center + +> This Playbook is adapted from the [webex-contact-center-api-samples / dialogflow-sample](https://github.com/WebexSamples/webex-contact-center-api-samples/tree/main/dialogflow-sample) on GitHub. + +--- + +## Use Case Overview + +Contact center developers who need to add AI-powered self-service to Webex Contact Center (WxCC) voice flows often face the same question up front: **which Google Dialogflow generation should I use — CX or ES?** + +This Playbook answers that question and provides working fulfillment webhook samples for **both** variants. Each sample is a Google Cloud Functions webhook that a WxCC virtual agent node calls during a voice interaction. The webhook looks up caller context (name, email, reason, account balance) from a downstream system and returns a structured fulfillment response that the Dialogflow agent speaks back to the caller. + +**Target persona:** WxCC flow developer or integration engineer who is evaluating Dialogflow or adding a new self-service use case to an existing WxCC deployment. + +**Estimated implementation time:** 2–4 hours per sample (shorter if you already have a Google Cloud project and a Dialogflow agent). + +### Which sample should I use? + +| | **Dialogflow CX** (`src/dialogflow-cx-sample/`) | **Dialogflow ES** (`src/dialogflow-es-sample/`) | +|---|---|---| +| **Dialogflow generation** | CX (current, recommended for new projects) | ES (legacy, Essentials) | +| **WxCC integration path** | Virtual Agent Voice → Webhook fulfillment (Cloud Function) | Virtual Agent Voice → Inline Editor (Firebase Cloud Functions) | +| **Runtime / deploy target** | Google Cloud Functions (standalone HTTP function) | Dialogflow ES Inline Editor (Firebase Cloud Functions) | +| **Dependencies** | None — uses Node.js built-in `https` module only | `dialogflow-fulfillment`, `firebase-functions`, `node-fetch` | +| **Webex CC data access** | Via `req.body` from the CX webhook request | Via `originalDetectIntentRequest.payload` in the ES fulfillment protocol | +| **Complexity** | Lower — single webhook, no framework | Moderate — Firebase + Dialogflow fulfillment SDK | +| **Pick this if…** | Starting a new project, prefer a lighter dependency footprint, or your org standardizes on CX | You have an existing Dialogflow ES agent you are extending, or you need the ES fulfillment SDK's intent routing helpers | + +--- + +## Architecture + +Both samples follow the same high-level pattern: an inbound call hits a WxCC flow, a **Virtual Agent Voice** node hands off to a Dialogflow agent, and the agent calls a webhook (Cloud Function) to fetch real data before responding to the caller. The two paths differ in which Dialogflow generation is used and how the webhook is hosted. + +See the annotated diagrams in [/diagrams/architecture-diagram.md](diagrams/architecture-diagram.md) for a side-by-side view of the CX and ES data flows. + +**CX path:** The Dialogflow CX agent triggers a webhook page or route group. WxCC sends caller metadata as custom parameters. The Cloud Function (`acc_balance`) calls a backend API to retrieve an account balance and returns a `fulfillment_response` object. + +**ES path:** The Dialogflow ES agent calls the fulfillment webhook on the `Default Welcome Intent`. WxCC sends caller metadata in `originalDetectIntentRequest.payload`. The Firebase Cloud Function reads `name`, `email`, `reason`, and `pin` from that payload, performs a CRM lookup using the PIN, and returns a spoken confirmation via the `dialogflow-fulfillment` SDK. + +Authentication between WxCC and Dialogflow is handled by the Google Cloud project's service account that owns the Dialogflow agent. No Webex credentials are required in the fulfillment webhook itself. + +--- + +## Prerequisites + +### Webex Contact Center +- Active **Webex Contact Center** tenant with **Virtual Agent Voice** feature enabled +- Admin access to **Webex Control Hub** and the **Flow Designer** +- An entry point configured in WxCC for the demo flow + +### Google Cloud / Dialogflow +- **Dialogflow CX sample:** Google Cloud project with a Dialogflow CX agent; Cloud Functions API enabled; `gcloud` CLI configured with deploy permissions +- **Dialogflow ES sample:** Google Cloud project with a Dialogflow ES agent; Firebase project linked to the same Google Cloud project; Firebase CLI (`firebase-tools`) installed and authenticated; Node.js 18+ and npm installed locally + +### Developer environment +- Node.js 18+ (CX sample uses built-in `https`; ES sample requires Firebase toolchain) +- npm (ES sample only) +- A downstream backend API or mock that returns account/CRM data (the samples ship with a Postman mock URL; replace with your own before using in any real environment) + +--- + +## Code Scaffold + +The source code under `/src/` is organized into two sub-folders, one per Dialogflow generation. You only need to deploy the one that matches your environment. + +``` +src/ +├── dialogflow-cx-sample/ +│ ├── inline-editor.js # Cloud Function webhook for Dialogflow CX +│ ├── package.json # Functions Framework devDependency + start/deploy scripts +│ ├── DF_CX_Flow.json # Importable WxCC flow for the CX demo +│ └── Virtual_agent.zip # Exportable Dialogflow CX virtual agent (import via Manage → Restore) +├── dialogflow-es-sample/ +│ ├── inline-editor.js # Firebase Cloud Function for Dialogflow ES +│ ├── package.json # Firebase + Dialogflow fulfillment dependencies +│ └── CCAI_Flow_DialogFlowES.json # Importable WxCC flow for the ES demo +└── env.template # Required environment variables for both samples +``` + +**What the code demonstrates:** +- How to receive a Dialogflow webhook request from Webex Contact Center +- How to read caller context (CX: from request body fields; ES: from `originalDetectIntentRequest.payload`) +- How to call a downstream API and incorporate the result in the spoken fulfillment response +- How to return the correct fulfillment response shape for each Dialogflow generation + +**What the code does NOT do:** +- Production error handling, retry logic, or circuit breaking +- Authentication/signature validation on incoming webhook requests +- Multi-tenant token management +- Persistent logging or metrics + +For upstream notes, Vidcast walkthroughs, and Dialogflow console setup steps, see [docs/upstream-overview.md](docs/upstream-overview.md). + +--- + +## Deployment Guide + +### CX Sample + +1. **Import the WxCC flow.** In Webex Control Hub → Flow Designer, import `src/dialogflow-cx-sample/DF_CX_Flow.json`. Publish the flow and assign it to your entry point. + +2. **Create a Dialogflow CX agent.** In the Google Cloud console, create a new Dialogflow CX agent. Import the sample virtual agent (`src/dialogflow-cx-sample/Virtual_agent.zip`) via **Manage → Restore** in the CX console. + +3. **Set your environment variables.** Copy `src/env.template` to `src/.env` and fill in the `MOCK_API_URL_CX` value with the URL of your account balance API. + +4. **Deploy the Cloud Function.** From the Google Cloud console, create a new Cloud Function (HTTP trigger, Node.js 18+). Paste the contents of `src/dialogflow-cx-sample/inline-editor.js` into the inline editor. Set `MOCK_API_URL_CX` as an environment variable in the function's runtime configuration. Note the function's trigger URL. + +5. **Configure the Dialogflow CX webhook.** In the CX console, go to **Manage → Webhooks** and add a new webhook pointing to the Cloud Function trigger URL from step 4. + +6. **Attach the webhook to a route.** In the CX flow builder, select the page or route group where you want the account balance lookup to happen. Set the fulfillment to call the webhook created in step 5. + +7. **Test the flow.** Call the WxCC entry point. The caller should hear the account balance spoken back by the Dialogflow agent. + +--- + +### ES Sample + +1. **Import the WxCC flow.** In Webex Control Hub → Flow Designer, import `src/dialogflow-es-sample/CCAI_Flow_DialogFlowES.json`. Publish the flow and assign it to your entry point. + +2. **Create a Dialogflow ES agent.** In the Dialogflow ES console, create a new agent linked to your Google Cloud project and Firebase project. + +3. **Enable the Inline Editor.** In the ES console, go to **Fulfillment** and turn on the **Inline Editor**. This activates Firebase Cloud Functions for the agent. + +4. **Set your environment variables.** Copy `src/env.template` to `src/.env` and fill in `MOCK_API_URL_ES` with the URL of your CRM lookup API (query parameter: `pin`). + +5. **Paste fulfillment code.** In the Inline Editor, replace the default `index.js` content with the contents of `src/dialogflow-es-sample/inline-editor.js`. Replace the default `package.json` content with `src/dialogflow-es-sample/package.json`. Update the `MOCK_API_URL_ES` reference in the code to read from `process.env.MOCK_API_URL_ES`. + +6. **Set Firebase environment config.** Run `firebase functions:config:set crm.api_url=""` and update the fulfillment code to read from `functions.config().crm.api_url` if you prefer Firebase-style config over `process.env`. + +7. **Deploy via the Inline Editor.** Click **Deploy** in the Dialogflow ES Fulfillment page. Firebase deploys the function automatically. + +8. **Configure WxCC Virtual Agent.** In Webex Control Hub, configure the Virtual Agent Voice node in your flow to point to the Dialogflow ES agent created in step 2. + +9. **Test the flow.** Call the WxCC entry point. The caller should hear a personalized greeting using the name, email, reason, and account details passed from WxCC through Dialogflow. + + + +--- + +## Known Limitations + +- **Mock backend URLs:** Both samples ship with hardcoded Postman/MockAPI URLs that are not guaranteed to remain available. Replace `MOCK_API_URL_CX` and `MOCK_API_URL_ES` in your deployed functions with real backend endpoints before any real-world use. +- **Dialogflow ES deprecation:** Dialogflow ES (Essentials) is in maintenance mode. Google recommends migrating to Dialogflow CX for new projects. The ES sample is provided for developers maintaining existing ES agents. See [Google's migration guide](https://cloud.google.com/dialogflow/cx/docs/concept/migration). +- **ES dependency age:** The `dialogflow-fulfillment` SDK (`^0.6.1`) is deprecated and carries known vulnerabilities via its transitive dependencies. Run `npm audit` after install and review the output. For production deployments, evaluate migrating to a supported fulfillment approach or the Dialogflow CX sample instead. +- **No webhook authentication:** The fulfillment webhooks do not validate request signatures. In production, add Dialogflow webhook header validation or Google Cloud Function IAM controls to prevent unauthenticated calls. +- **Rate limits:** Dialogflow CX and ES are subject to [Google Cloud Dialogflow quotas](https://cloud.google.com/dialogflow/quotas). The WxCC Virtual Agent Voice feature also has per-tenant call limits; consult your Webex Contact Center license and capacity plan. +- **License:** This Playbook is adapted from a sample published under the [Cisco Sample Code License v1.1](https://github.com/WebexSamples/webex-contact-center-api-samples/blob/main/LICENSE). Review that license before use. This Playbook repo is covered by [LICENSE](../../LICENSE). +- **Webex disclaimer:** This Playbook is provided as a starting point. Webex does not guarantee the functional accuracy of the source code. Test thoroughly before use in a production environment. diff --git a/playbooks/wxcc-dialogflow-fulfillment/diagrams/architecture-diagram.md b/playbooks/wxcc-dialogflow-fulfillment/diagrams/architecture-diagram.md new file mode 100644 index 0000000..57c8df7 --- /dev/null +++ b/playbooks/wxcc-dialogflow-fulfillment/diagrams/architecture-diagram.md @@ -0,0 +1,95 @@ +# Architecture Diagrams — Webex Contact Center + Google Dialogflow + +Two separate data-flow diagrams are shown below — one for each Dialogflow generation. +The core WxCC → Dialogflow handoff is the same in both; the differences are in where +the fulfillment webhook runs and how caller context is structured. + +--- + +## Dialogflow CX — Cloud Function Webhook + +The CX sample uses Dialogflow CX's native webhook page/route integration. WxCC passes +caller parameters to CX directly, and the CX agent invokes a standalone Google Cloud +Function to fetch account data. + +```mermaid +sequenceDiagram + participant Caller + participant WxCC as Webex Contact Center
(Flow Designer) + participant VAV as Virtual Agent Voice
(WxCC node) + participant DFCX as Dialogflow CX Agent
(Google Cloud) + participant CF as Cloud Function
(acc_balance) + participant Backend as Backend API
(account balance) + + Caller->>WxCC: Inbound voice call + WxCC->>VAV: Route to Virtual Agent Voice node + VAV->>DFCX: Start session with caller metadata
(custom parameters) + DFCX->>DFCX: Match intent / page route + DFCX->>CF: POST webhook request
(session params + caller context) + CF->>Backend: GET /balance?customer=... + Note over CF: MOCK_API_URL_CX env var
points to your backend + Backend-->>CF: { "balance": "1234.56" } + CF-->>DFCX: fulfillment_response
{ messages: ["Balance is 1234.56"] } + DFCX-->>VAV: Spoken fulfillment text + VAV-->>Caller: "The balance amount in your account is 1234.56." +``` + +**Key points:** +- Authentication: Google Cloud IAM on the Cloud Function; no Webex credentials in the function +- Caller context: passed as Dialogflow CX session parameters from the WxCC Virtual Agent Voice node +- Response shape: `{ fulfillment_response: { messages: [{ text: { text: [...] } }] } }` + +--- + +## Dialogflow ES — Firebase Cloud Function (Inline Editor) + +The ES sample uses Dialogflow ES's built-in Fulfillment Inline Editor, which deploys to +Firebase Cloud Functions. WxCC passes caller context in the `originalDetectIntentRequest.payload` +field of the standard Dialogflow webhook envelope. + +```mermaid +sequenceDiagram + participant Caller + participant WxCC as Webex Contact Center
(Flow Designer) + participant VAV as Virtual Agent Voice
(WxCC node) + participant DFES as Dialogflow ES Agent
(Google Cloud) + participant Firebase as Firebase Cloud Function
(dialogflowFirebaseFulfillment) + participant CRM as CRM API
(customer lookup) + + Caller->>WxCC: Inbound voice call + WxCC->>VAV: Route to Virtual Agent Voice node + VAV->>DFES: Start session
originalDetectIntentRequest.payload
{ name, email, reason, pin } + DFES->>DFES: Match "Default Welcome Intent" + DFES->>Firebase: POST fulfillment request
(full Dialogflow webhook envelope) + Firebase->>Firebase: Extract payload:
name, email, reason, pin + Firebase->>CRM: GET /customers?pin= + Note over Firebase: MOCK_API_URL_ES env var
points to your CRM + CRM-->>Firebase: [{ account: "...", phone: "..." }] + Firebase->>Firebase: Set "confirm-details" output context
(account, phone) + Firebase-->>DFES: WebhookClient response
(spoken greeting + context) + DFES-->>VAV: "Hello [name], calling about [reason]..." + VAV-->>Caller: Personalized greeting spoken to caller + Caller->>VAV: Confirms account number + VAV->>DFES: "Confirm Details" intent triggered + DFES->>Firebase: POST fulfillment (Confirm Details) + Firebase-->>DFES: setFollowupEvent("escalated") + context + DFES-->>VAV: Escalate or continue self-service +``` + +**Key points:** +- Authentication: Firebase/Google Cloud service account linked to the Dialogflow ES agent +- Caller context: read from `request.body.originalDetectIntentRequest.payload` — this is the standard WxCC-to-Dialogflow ES data channel +- Response mechanism: `dialogflow-fulfillment` SDK (`WebhookClient`) — `agent.add()` for spoken text, `agent.context.set()` for multi-turn state, `agent.setFollowupEvent()` for intent chaining +- Multi-turn: the ES sample demonstrates a two-turn flow (Welcome → Confirm Details) using Dialogflow output contexts + +--- + +## Side-by-side summary + +| | CX Sample | ES Sample | +|---|---|---| +| **Webhook host** | Google Cloud Functions (standalone) | Firebase Cloud Functions (Inline Editor) | +| **Caller context channel** | CX session parameters | `originalDetectIntentRequest.payload` | +| **Response format** | Raw `fulfillment_response` JSON | `dialogflow-fulfillment` SDK | +| **Multi-turn support** | Via CX pages and route groups | Via Dialogflow ES output contexts | +| **Deploy method** | `gcloud functions deploy` or Cloud Console | Dialogflow ES Fulfillment → Deploy button | diff --git a/playbooks/wxcc-dialogflow-fulfillment/docs/upstream-overview.md b/playbooks/wxcc-dialogflow-fulfillment/docs/upstream-overview.md new file mode 100644 index 0000000..ccfeab0 --- /dev/null +++ b/playbooks/wxcc-dialogflow-fulfillment/docs/upstream-overview.md @@ -0,0 +1,123 @@ +# Upstream Overview — dialogflow-sample + +Adapted from: +[WebexSamples/webex-contact-center-api-samples / dialogflow-sample](https://github.com/WebexSamples/webex-contact-center-api-samples/tree/main/dialogflow-sample) +(Cisco Sample Code License v1.1) + +--- + +## CX vs ES — Which Sample Should I Use? + +| | **Dialogflow CX** | **Dialogflow ES** | +|---|---|---| +| **Generation** | Current (recommended for new projects) | Legacy / Essentials (maintenance mode) | +| **Deploy target** | Google Cloud Functions (standalone HTTP function) | Firebase Cloud Functions via Dialogflow ES Inline Editor | +| **Dependencies** | None — Node.js built-in `https` only | `dialogflow-fulfillment`, `firebase-functions`, `node-fetch` | +| **Caller context channel** | CX session parameters (passed by WxCC Virtual Agent Voice node) | `originalDetectIntentRequest.payload` in the Dialogflow webhook envelope | +| **Response format** | Raw `fulfillment_response` JSON | `dialogflow-fulfillment` SDK (`agent.add()`, `agent.context.set()`) | +| **Multi-turn flows** | CX pages and route groups | Dialogflow ES output contexts + followup events | +| **Pick this if…** | Starting a new project, want fewer dependencies, or your team standardizes on CX | You have an existing Dialogflow ES agent to extend, or you need the ES intent-routing SDK helpers | + +> **Note:** Google has placed Dialogflow ES in maintenance mode. For new deployments, +> Google recommends [migrating to Dialogflow CX](https://cloud.google.com/dialogflow/cx/docs/concept/migration). + +--- + +## Dialogflow CX Sample + +### Video walkthrough +[Watch: Integrating Webex Contact Center with Google Dialogflow CX](https://app.vidcast.io/share/91531cc2-1a3e-4733-83c0-4310742cab53) + +### Reference documentation +- [Dialogflow CX documentation](https://cloud.google.com/dialogflow/cx/docs) +- [Virtual Agent Voice in Webex Contact Center](https://help.webex.com/en-us/article/n6gaghu/Virtual-Agent-Voice-in-Webex-Contact-Center) + +### What is included in the upstream sample +- `inline-editor.js` — Cloud Function webhook; handles Dialogflow CX fulfillment requests and returns `fulfillment_response` JSON +- `DF_CX_Flow.json` — Importable WxCC flow for the demo +- `Virtual_agent.zip` — Exportable Dialogflow CX virtual agent to import into your CX console + +### Google Cloud Console setup (CX) +1. Create a Google Cloud project (or use an existing one). +2. Enable the **Dialogflow CX API** and **Cloud Functions API** in the project. +3. In the [Dialogflow CX console](https://dialogflow.cloud.google.com/cx), create a new agent in your project. +4. Restore the virtual agent: **Manage → Restore** → upload `src/dialogflow-cx-sample/Virtual_agent.zip`. +5. Create a Cloud Function (2nd gen, HTTP trigger, Node.js 18, region of your choice). +6. Paste `src/dialogflow-cx-sample/inline-editor.js` as the entry point (`acc_balance`). +7. Add runtime environment variable `MOCK_API_URL_CX` pointing to your balance API. +8. In the CX console, go to **Manage → Webhooks** and add a webhook pointing to the Cloud Function URL. +9. Attach the webhook to the relevant page or route group in your CX flow. + +### Importing the WxCC flow (CX) +1. In **Webex Control Hub → Contact Center → Flows**, click **Import**. +2. Upload `src/dialogflow-cx-sample/DF_CX_Flow.json`. +3. In the imported flow, update the **Virtual Agent Voice** node to point to your Dialogflow CX agent. +4. Publish the flow and assign it to your entry point. + +--- + +## Dialogflow ES Sample + +### Video walkthrough +[Watch: Working with data on Google Dialogflow ES with Webex Contact Center](https://app.vidcast.io/share/491d0e41-99ab-44cf-a48b-18949c406d73) + +### Reference documentation +- [Dialogflow ES reference](https://cloud.google.com/dialogflow/es/docs/reference) +- [Webex Contact Center developer documentation](https://developer.webex.com/webex-contact-center/docs/webex-contact-center) +- [Dialogflow Fulfillment Node.js library](https://github.com/dialogflow/dialogflow-fulfillment-nodejs) + +### What is included in the upstream sample +- `inline-editor.js` — Firebase Cloud Function fulfillment; reads WxCC caller context from `originalDetectIntentRequest.payload`, performs CRM lookup, drives multi-turn conversation +- `CCAI_Flow_DialogFlowES.json` — Importable WxCC flow for the demo +- `package.json` — Firebase + Dialogflow fulfillment dependencies (updated to Node 18 in this Playbook) + +### Google Cloud / Firebase setup (ES) +1. Create a Google Cloud project and link it to a Firebase project. +2. Enable the **Dialogflow ES API** and **Firebase** in the project. +3. In the [Dialogflow ES console](https://dialogflow.cloud.google.com/), create a new agent linked to your Firebase project. +4. In the ES console, go to **Fulfillment** and enable **Inline Editor**. +5. Replace the default `index.js` with the contents of `src/dialogflow-es-sample/inline-editor.js`. +6. Replace the default `package.json` with the contents of `src/dialogflow-es-sample/package.json`. +7. Update the `MOCK_API_URL_ES` reference in `inline-editor.js` to use your CRM endpoint, or set it as a Firebase environment variable: + ```bash + firebase functions:config:set crm.api_url="https://your-crm.example.com/api/customers" + ``` + Then read it in code as `functions.config().crm.api_url`. +8. Click **Deploy** in the Inline Editor. Firebase deploys the function automatically. + +### Importing the WxCC flow (ES) +1. In **Webex Control Hub → Contact Center → Flows**, click **Import**. +2. Upload `src/dialogflow-es-sample/CCAI_Flow_DialogFlowES.json`. +3. In the imported flow, update the **Virtual Agent Voice** node to point to your Dialogflow ES agent. +4. Publish the flow and assign it to your entry point. + +### How WxCC passes caller context to Dialogflow ES +Webex Contact Center injects caller metadata into the Dialogflow webhook request body under: + +```json +{ + "originalDetectIntentRequest": { + "payload": { + "name": "Caller Name", + "email": "caller@example.com", + "reason": "billing inquiry", + "pin": "12345" + } + } +} +``` + +The fulfillment code reads each field from `request.body.originalDetectIntentRequest.payload`. You can add additional fields to the WxCC Virtual Agent Voice node configuration and they will appear in the same `payload` object. + +--- + +## Upstream Disclaimer + +> These samples are meant to be used as demos and to understand how to integrate Webex Contact Center with Google Dialogflow. When building a production-grade solution, consider the overall architecture and design with a security-first approach. These samples only provide working starter code; many layers have been simplified to focus on the Webex Contact Center use cases. + +--- + +## Support + +- **Webex Contact Center Developer Support:** https://developer.webex.com/explore/support +- **Developer Community:** https://community.cisco.com/t5/contact-center/bd-p/j-disc-dev-contact-center diff --git a/playbooks/wxcc-dialogflow-fulfillment/src/.gitignore b/playbooks/wxcc-dialogflow-fulfillment/src/.gitignore new file mode 100644 index 0000000..9f91493 --- /dev/null +++ b/playbooks/wxcc-dialogflow-fulfillment/src/.gitignore @@ -0,0 +1,8 @@ +# Dependencies — never commit installed packages +node_modules/ + +# Lockfiles — generated on install, not needed in the playbook +package-lock.json + +# Local environment — contains secrets, never commit +.env diff --git a/playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-cx-sample/DF_CX_Flow.json b/playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-cx-sample/DF_CX_Flow.json new file mode 100644 index 0000000..d20c338 --- /dev/null +++ b/playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-cx-sample/DF_CX_Flow.json @@ -0,0 +1 @@ +{"orgId":"3f4ac69f-e86a-4d6a-b016-f0b0b7445c1d","version":26,"id":"64c936631a47bb7f61f9f9f7","name":"DF_CX_Flow","description":"This is a sample flow for passing data to and fro from DialogFlow CX virtual agent and IVR Flow in Webex Contact Center.","comment":"Final","variables":[{"name":"Call_Reason","description":"","type":"STRING","value":"NA","isCAD":true,"desktopLabel":"Call Reason","isAgentEditable":false,"source":"","isReportable":false,"overwrite":false,"isSecure":false,"id":""},{"name":"appointment_date","description":"","type":"STRING","value":"NA","isCAD":false,"desktopLabel":"","isAgentEditable":false,"source":"","isReportable":false,"overwrite":false,"isSecure":false,"id":""},{"name":"appointment_time","description":"","type":"STRING","value":"NA","isCAD":false,"desktopLabel":"","isAgentEditable":false,"source":"","isReportable":false,"overwrite":false,"isSecure":false,"id":""},{"name":"DF_CustomerName","description":"Customer Name for DialogFlow","type":"STRING","value":"","isCAD":true,"desktopLabel":"CustomerName","isAgentEditable":false,"source":"GLOBAL","isReportable":true,"overwrite":false,"isSecure":false,"id":"1d5ffc04-606d-45bb-ba01-05c340f4e2da"},{"name":"DF_Appointment","description":"","type":"STRING","value":"","isCAD":true,"desktopLabel":"Appointment","isAgentEditable":false,"source":"GLOBAL","isReportable":true,"overwrite":false,"isSecure":false,"id":"b022d277-e49a-4b96-9a7b-6d7be7c2a40b"}],"process":{"activities":{"b05091fe-24bf-487f-871b-dd62184cb1ff":{"id":"b05091fe-24bf-487f-871b-dd62184cb1ff","name":"QueueContact","group":"action","properties":{"fallbackQueue":null,"queueRadioGroup":"staticQueue","destination":"9e5c071a-bc83-4978-8526-0cb051b61fe2","activityName":"queue-contact","description":"Sending the call to a static Queue","destination:type":"LONGEST_AVAILABLE_AGENT","toggle":false,"priority":null,"agentAvailabilityRadioGroup":null,"priorityRadioGroup":null,"skills":null,"activityId":"5f114550ef5cfc454fbbf133","destination_type":"LONGEST_AVAILABLE_AGENT","priorityVariable":null,"destinationVariable":null,"name":"QueueContact","toggleAgentAvailability":false,"agentAvailabilityVariable":null,"_renderRequestTimestamp":1690908254409}},"4ff6b5cb-d823-4d90-9bdf-9ca6bd37c265":{"id":"4ff6b5cb-d823-4d90-9bdf-9ca6bd37c265","name":"PlayMusic","group":"action","properties":{"duration":null,"activityId":"5faa2ad13505f538acc86afc","prompt:type":null,"name":"PlayMusic","activityName":"play-music","description":"Hold Music","prompt_type":null,"skip":0,"_renderRequestTimestamp":1690908254409,"prompt":"defaultmusic_on_hold.wav","promptDynamic":null,"audioRadioGroup":"staticAudio"}},"2b2a1757-6c42-43c6-9570-8642f517a715":{"id":"2b2a1757-6c42-43c6-9570-8642f517a715","name":"GetCustomerName","group":"action","properties":{"httpRequestHeaders":{},"httpRequestMethod_type":null,"authenticated":false,"httpRequestPath":null,"httpRequestUrl":"https://aedb299d-87b3-4c1d-81cc-cc947f3ad605.mock.pstmn.io/{{NewPhoneContact.ANI}}","connectorId":null,"contentType_type":null,"activityName":"http-request-v2","description":"Getting the Customer Name from the Mock API and setting the response in a Global variable.","httpContentType_type":null,"httpRequestMethod:type":null,"httpRequestMethod":"GET","outputVariableArray":[{"outputVariable":"DF_CustomerName","jsonPathExp":"$.name"}],"activityId":"http-request-v2","httpContentType:type":null,"httpResponseTimeout":2000,"contentType:type":null,"name":"GetCustomerName","httpContentType":"Application/JSON","_renderRequestTimestamp":1690908254409,"contentType":"JSON","httpQueryParameters":{},"retryAttempts":"3"}},"8ae84b43-6922-4b65-8c7c-7d855bd6d87e":{"id":"8ae84b43-6922-4b65-8c7c-7d855bd6d87e","name":"VirtualAgent","group":"enum-gateway","properties":{"speakingRate":"1.0","activityName":"ivr-virtualassistantvoice","description":"Passing the Customer Name in Event Data to Google DialogFlow CX virtual agent. ","connector:type":null,"activityId":"62da6fe3a350ce0ccab93a04","transcript":true,"eventData":"{\"name\" : \"{{ DF_CustomerName }}\"}","connector":"b6c69998-dedf-4291-82c1-1d265849c6ed","volumeGain":"0.0","name":"VirtualAgent","connector_type":null,"eventName":"","pitch":"0.0","_renderRequestTimestamp":1690908254409,"terminationDelay":3}},"1e06ee1d-a6a3-4d48-9140-07e15c1737ce":{"id":"1e06ee1d-a6a3-4d48-9140-07e15c1737ce","name":"NewPhoneContact","group":"start","properties":{"name":"NewPhoneContact","activityName":"NewPhoneContact","activityId":"start","event":"NewPhoneContact","_renderRequestTimestamp":1690908254409,"flowType":{"eventSourceId":"5eff0e2eb10162499bc9f932","eventClassificationId":"5f10475cf021306e89e1692c","eventSpecificationId":"5f2d02144332507e39cc8a7f","eventSourceName":"WebexContactCenter","eventClassificationName":"VoiceInteractions","eventSpecificationName":"ContactStartWorkflow"}}},"d86c47dc-0d2b-4c32-a9ef-0f9d9241b996":{"id":"d86c47dc-0d2b-4c32-a9ef-0f9d9241b996","name":"SetVariable_Appointment","group":"set-variable","properties":{"activityId":"set-variable","srcVariable":"DF_Appointment","name":"SetVariable_Appointment","srcVariableType":"STRING","activityName":"set-variable","setTo":"set-to-literal","description":"Formatting & setting appointment_date & appointment_time in a single Global variable (Appointment) ","expr":"{{ appointment_date | date(\"MM-dd-yyyy\", existingFormat=\"yyyy-MM-dd\") }} {{ appointment_time | date(\"h:mm a\", existingFormat=\"hh:mm:ss\") }}","_renderRequestTimestamp":1690908254409,"literal_invalid_error":false}},"7a47714c-795e-4c38-8f5d-6861cc2d0a23":{"id":"7a47714c-795e-4c38-8f5d-6861cc2d0a23","name":"Parse_Response","group":"action","properties":{"outputVariableArray":[{"outputVariable":"Call_Reason","jsonPathExp":"$[\"dialogflow.ccai.live-agent-escalation\"].call_reason"},{"outputVariable":"appointment_date","jsonPathExp":"$[\"dialogflow.ccai.live-agent-escalation\"].appointment_date"},{"outputVariable":"appointment_time","jsonPathExp":"$[\"dialogflow.ccai.live-agent-escalation\"].appointment_time"}],"activityId":"parse-activity","inputVariable":"VirtualAgent.MetaData","contentType:type":null,"contentType_type":null,"name":"Parse_Response","activityName":"parse-activity","description":"Parsing the response received from DialogFlow virtual agent and setting those in respective Flow variables.","_renderRequestTimestamp":1690908254409,"contentType":"JSON"}},"54a43844-ce63-4efb-bbb2-1a57094fd472":{"id":"54a43844-ce63-4efb-bbb2-1a57094fd472","name":"DisconnectContact_hau","group":"terminating-action","properties":{"name":"DisconnectContact_hau","activityName":"disconnect-contact","activityId":"5faa898c8bf5b65b82f0706b","_renderRequestTimestamp":1690908254409}}},"links":[{"id":"bccdfe83-c7fd-40f2-9fb6-80d1de8a8f0a","sourceActivityId":"b05091fe-24bf-487f-871b-dd62184cb1ff","targetActivityId":"4ff6b5cb-d823-4d90-9bdf-9ca6bd37c265","conditionExpr":"default","properties":{"value":"default"}},{"id":"fc83d964-1b37-481d-815c-758b237b5ac6","sourceActivityId":"b05091fe-24bf-487f-871b-dd62184cb1ff","targetActivityId":"4ff6b5cb-d823-4d90-9bdf-9ca6bd37c265","conditionExpr":"failure","properties":{"value":"failure"}},{"id":"2ce94d54-2a8a-4f6a-bdf0-dc3c72e049f8","sourceActivityId":"4ff6b5cb-d823-4d90-9bdf-9ca6bd37c265","targetActivityId":"4ff6b5cb-d823-4d90-9bdf-9ca6bd37c265","conditionExpr":"default","properties":{"value":"default"}},{"id":"e0c4eb90-8b5c-404d-b3dc-3171a2e60f08","sourceActivityId":"2b2a1757-6c42-43c6-9570-8642f517a715","targetActivityId":"8ae84b43-6922-4b65-8c7c-7d855bd6d87e","conditionExpr":"default","properties":{"value":"default"}},{"id":"1b4a9155-6fb0-4135-aeb5-c3f2867b8112","sourceActivityId":"1e06ee1d-a6a3-4d48-9140-07e15c1737ce","targetActivityId":"2b2a1757-6c42-43c6-9570-8642f517a715","conditionExpr":"out","properties":{"value":"out"}},{"id":"247219d3-2622-42cc-a163-72bd62911c39","sourceActivityId":"d86c47dc-0d2b-4c32-a9ef-0f9d9241b996","targetActivityId":"b05091fe-24bf-487f-871b-dd62184cb1ff","conditionExpr":"out","properties":{"value":"out"}},{"id":"a370d534-f356-4dfc-9994-0fc015f923d2","sourceActivityId":"7a47714c-795e-4c38-8f5d-6861cc2d0a23","targetActivityId":"d86c47dc-0d2b-4c32-a9ef-0f9d9241b996","conditionExpr":"default","properties":{"value":"default"}},{"id":"8fa2818a-fb2e-4222-8b61-8b0672129064","sourceActivityId":"8ae84b43-6922-4b65-8c7c-7d855bd6d87e","targetActivityId":"b05091fe-24bf-487f-871b-dd62184cb1ff","conditionExpr":"error","properties":{"value":"error"}},{"id":"34015386-f65a-4513-8d67-8fdb36f4f6e7","sourceActivityId":"8ae84b43-6922-4b65-8c7c-7d855bd6d87e","targetActivityId":"54a43844-ce63-4efb-bbb2-1a57094fd472","conditionExpr":"ENDED","properties":{"value":"ENDED"}},{"id":"97cbfe2f-8982-4da0-bb93-feb1055af3bd","sourceActivityId":"8ae84b43-6922-4b65-8c7c-7d855bd6d87e","targetActivityId":"7a47714c-795e-4c38-8f5d-6861cc2d0a23","conditionExpr":"ESCALATE","properties":{"value":"ESCALATE"}}]},"diagram":{"widgets":{"b05091fe-24bf-487f-871b-dd62184cb1ff":{"id":"1bee8135-0235-4ca1-8125-50bb9f5d281d","type":"action","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":414,"y":594},"ports":[{"portId":"6ee7bdb9-8ce8-4791-b410-946958ffaa78","isSourcePort":true,"linkId":"9a94fdc6-7d53-4fc9-bcac-1783569966ec","type":"arrow","links":["9a94fdc6-7d53-4fc9-bcac-1783569966ec","d2001188-8945-428d-aa74-df44693c7a76"],"properties":{"x":406.19855583004494,"name":"in","y":612.8527344425186,"label":"in","alignment":"left"}},{"portId":"08fb22b2-f197-41f2-a844-eb73f50cf484","isSourcePort":false,"linkId":"ab79c73b-d755-4ca5-b169-66e27949bdd2","type":"arrow","links":["ab79c73b-d755-4ca5-b169-66e27949bdd2"],"properties":{"x":581.1986116154004,"name":"default","y":612.8527344425186,"label":"default","alignment":"right"}},{"portId":"a06af9ee-dba6-45b5-ab6e-e0f36f8cbcfc","isSourcePort":false,"linkId":"2270189b-8bf2-4bfd-90c9-5798adce5543","type":"arrow","links":["2270189b-8bf2-4bfd-90c9-5798adce5543"],"properties":{"x":581.6985280967534,"name":"failure","y":706.1183581674247,"label":"failure","alignment":"right"}}],"properties":{"fallbackQueue":null,"queueRadioGroup":"staticQueue","destination":"9e5c071a-bc83-4978-8526-0cb051b61fe2","activityName":"queue-contact","description":"Sending the call to a static Queue","destination:type":"LONGEST_AVAILABLE_AGENT","toggle":false,"priority":null,"agentAvailabilityRadioGroup":null,"priorityRadioGroup":null,"skills":null,"activityId":"5f114550ef5cfc454fbbf133","priorityVariable":null,"destinationVariable":null,"name":"QueueContact","toggleAgentAvailability":false,"agentAvailabilityVariable":null,"_renderRequestTimestamp":1690908254409}},"4ff6b5cb-d823-4d90-9bdf-9ca6bd37c265":{"id":"b5cbd07b-fad5-40d5-b1df-4ea114191990","type":"action","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":733,"y":624},"ports":[{"portId":"0e1000a8-7ad0-4270-9bda-2247cbfa3ec8","isSourcePort":true,"linkId":"ab79c73b-d755-4ca5-b169-66e27949bdd2","type":"arrow","links":["ab79c73b-d755-4ca5-b169-66e27949bdd2","2270189b-8bf2-4bfd-90c9-5798adce5543","6de4784d-01ef-4398-814e-39579f4bc7bf"],"properties":{"x":725.6149003892816,"name":"in","y":642.5252600624103,"label":"in","alignment":"left"}},{"portId":"4ceb93e4-0b3e-4639-96e5-73f22528bc91","isSourcePort":false,"linkId":"6de4784d-01ef-4398-814e-39579f4bc7bf","type":"arrow","links":["6de4784d-01ef-4398-814e-39579f4bc7bf"],"properties":{"x":900.6149003892821,"name":"default","y":642.5252600624103,"label":"default","alignment":"right"}},{"portId":"f06ff5d2-1047-46df-8469-8ca63009fea0","isSourcePort":false,"linkId":null,"type":"arrow","links":[],"properties":{"x":901.1149003892821,"name":"error","y":735.7908850624103,"label":"error","alignment":"right"}}],"properties":{"duration":null,"activityId":"5faa2ad13505f538acc86afc","prompt:type":null,"name":"PlayMusic","activityName":"play-music","description":"Hold Music","skip":0,"_renderRequestTimestamp":1690908254409,"prompt":"defaultmusic_on_hold.wav","promptDynamic":null,"audioRadioGroup":"staticAudio"}},"bccdfe83-c7fd-40f2-9fb6-80d1de8a8f0a":{"id":"ab79c73b-d755-4ca5-b169-66e27949bdd2","type":"arrow","widgetType":"link","label":"","properties":{"curvyness":50,"selected":false,"color":"#545454","points":[{"id":"1162b58f-c18a-4162-bed5-3ceb20d8932d","type":"point","x":589,"y":621.3527192210857},{"id":"c9203872-dac9-4094-a5fc-127307cfe11b","type":"point","x":610,"y":621.3527192210857},{"id":"9af78b03-776b-42b8-b60b-72851beb0557","type":"point","x":610,"y":651.0252600624103},{"id":"10c2320d-d402-4f03-86c2-1c87bb5adac1","type":"point","x":730,"y":651.0252600624103}],"width":1,"selectedColor":"#007aa3"},"points":[],"sourcePort":{"id":"08fb22b2-f197-41f2-a844-eb73f50cf484","activeWidgetId":"1bee8135-0235-4ca1-8125-50bb9f5d281d","point":{"x":589,"y":621}},"targetPort":{"id":"0e1000a8-7ad0-4270-9bda-2247cbfa3ec8","activeWidgetId":"b5cbd07b-fad5-40d5-b1df-4ea114191990","point":{"x":730,"y":651}}},"fc83d964-1b37-481d-815c-758b237b5ac6":{"id":"2270189b-8bf2-4bfd-90c9-5798adce5543","type":"arrow","widgetType":"link","label":"","properties":{"curvyness":50,"selected":false,"color":"#545454","points":[{"id":"8b04680e-90cb-4e1b-af84-033b6c8c0e63","type":"point","x":590,"y":714.618372831004},{"id":"3dd1f5b3-6611-4448-92bb-2186244aec70","type":"point","x":610,"y":714.618372831004},{"id":"2bcfcd3e-cb1e-44d9-aac1-48b4e957755d","type":"point","x":610,"y":651.0252600624103},{"id":"ec455502-4e62-4011-9c01-a14906732091","type":"point","x":734.0171990171987,"y":651.0252600624103}],"width":1,"selectedColor":"#007aa3"},"points":[],"sourcePort":{"id":"a06af9ee-dba6-45b5-ab6e-e0f36f8cbcfc","activeWidgetId":"1bee8135-0235-4ca1-8125-50bb9f5d281d","point":{"x":590,"y":714}},"targetPort":{"id":"0e1000a8-7ad0-4270-9bda-2247cbfa3ec8","activeWidgetId":"b5cbd07b-fad5-40d5-b1df-4ea114191990","point":{"x":734,"y":651}}},"2ce94d54-2a8a-4f6a-bdf0-dc3c72e049f8":{"id":"6de4784d-01ef-4398-814e-39579f4bc7bf","type":"arrow","widgetType":"link","label":"","properties":{"curvyness":50,"selected":false,"color":"#545454","points":[{"id":"d4223837-15e1-44ae-8404-ee111e954f5b","type":"point","x":909.0171990171987,"y":651.0252600624103},{"id":"00c4e43d-5836-4ce8-90c9-d5c4fb8b0d5b","type":"point","x":930,"y":651.0252600624103},{"id":"08bf0870-2afc-472e-8e18-4d3c7be0a550","type":"point","x":930,"y":604.5252701539862},{"id":"7c69501e-37ca-424a-b7e4-bfaed37f7a05","type":"point","x":715.0977013720828,"y":604.5252701539862},{"id":"68556a92-785b-4493-8721-64ef31a41a62","type":"point","x":715.0977013720828,"y":651.0252600624103},{"id":"28a1944c-66b7-4b1c-a67f-1ed0565572c8","type":"point","x":734.0171990171987,"y":651.0252600624103}],"width":1,"selectedColor":"#007aa3"},"points":[],"sourcePort":{"id":"4ceb93e4-0b3e-4639-96e5-73f22528bc91","activeWidgetId":"b5cbd07b-fad5-40d5-b1df-4ea114191990","point":{"x":909,"y":651}},"targetPort":{"id":"0e1000a8-7ad0-4270-9bda-2247cbfa3ec8","activeWidgetId":"b5cbd07b-fad5-40d5-b1df-4ea114191990","point":{"x":734,"y":651}}},"2b2a1757-6c42-43c6-9570-8642f517a715":{"id":"eaef2a7f-0de1-4551-98d2-96e466030cd2","type":"action","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":-48,"y":104},"ports":[{"portId":"da620d2b-562c-4d22-b196-828ffab06ab6","isSourcePort":true,"linkId":"4ac61881-f453-43b0-a53d-4b6bf9cc8a91","type":"arrow","links":["4ac61881-f453-43b0-a53d-4b6bf9cc8a91"],"properties":{"x":-56.125441517050554,"name":"in","y":122.94213866875563,"label":"in","alignment":"left"}},{"portId":"203f4689-1116-404c-b0d1-740b87b76bfd","isSourcePort":false,"linkId":"934e70c5-884b-4f73-908b-461327954b8f","type":"arrow","links":["934e70c5-884b-4f73-908b-461327954b8f"],"properties":{"x":118.8745584829494,"name":"default","y":122.94213866875563,"label":"default","alignment":"right"}}],"properties":{"httpRequestHeaders":{},"authenticated":false,"httpRequestPath":null,"httpRequestUrl":"https://aedb299d-87b3-4c1d-81cc-cc947f3ad605.mock.pstmn.io/{{NewPhoneContact.ANI}}","connectorId":null,"activityName":"http-request-v2","description":"Getting the Customer Name from the Mock API and setting the response in a Global variable.","httpRequestMethod:type":null,"httpRequestMethod":"GET","outputVariableArray":[{"outputVariable":"DF_CustomerName","jsonPathExp":"$.name"}],"activityId":"http-request-v2","httpContentType:type":null,"httpResponseTimeout":2000,"contentType:type":null,"name":"GetCustomerName","httpContentType":"Application/JSON","_renderRequestTimestamp":1690908254409,"contentType":"JSON","httpQueryParameters":{},"retryAttempts":"3"}},"8ae84b43-6922-4b65-8c7c-7d855bd6d87e":{"id":"3e2f8a1d-b424-4081-a9da-33e71b69eaed","type":"enum-gateway","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":21,"y":238},"ports":[{"portId":"4e0b611c-1976-4c29-bfa9-8595668a36be","isSourcePort":true,"linkId":"934e70c5-884b-4f73-908b-461327954b8f","type":"arrow","links":["934e70c5-884b-4f73-908b-461327954b8f"],"properties":{"x":13.234369432938449,"name":"in","y":252.18750698936427,"label":"in","alignment":"left"}},{"portId":"1a70a53e-049a-4bb8-996d-0dca6a041f7a","isSourcePort":false,"linkId":"d2001188-8945-428d-aa74-df44693c7a76","type":"arrow","links":["d2001188-8945-428d-aa74-df44693c7a76"],"properties":{"x":188.73440678429887,"name":"error","y":443.7187902703841,"label":"error","alignment":"right"}},{"portId":"87d479f8-2cb7-4360-ad04-ed6b7728a8c8","isSourcePort":false,"linkId":"fdf046c2-861d-4253-9c1e-95e3e1fa2728","type":"arrow","links":["fdf046c2-861d-4253-9c1e-95e3e1fa2728"],"properties":{"x":188.73440678429887,"name":"ENDED","y":358.4531758053834,"label":"ENDED","alignment":"right"}},{"portId":"26f4d4e2-a3eb-425c-aeae-5570cb5cbd51","isSourcePort":false,"linkId":"ae3b8474-2516-4a1e-a30f-9e7babaaacbd","type":"arrow","links":["ae3b8474-2516-4a1e-a30f-9e7babaaacbd"],"properties":{"x":188.73440678429887,"name":"ESCALATE","y":389.01562744015985,"label":"ESCALATE","alignment":"right"}}],"properties":{"speakingRate":"1.0","activityName":"ivr-virtualassistantvoice","description":"Passing the Customer Name in Event Data to Google DialogFlow CX virtual agent. ","connector:type":null,"activityId":"62da6fe3a350ce0ccab93a04","transcript":true,"eventData":"{\"name\" : \"{{ DF_CustomerName }}\"}","connector":"b6c69998-dedf-4291-82c1-1d265849c6ed","volumeGain":"0.0","name":"VirtualAgent","eventName":"","pitch":"0.0","_renderRequestTimestamp":1690908254409,"terminationDelay":3}},"e0c4eb90-8b5c-404d-b3dc-3171a2e60f08":{"id":"934e70c5-884b-4f73-908b-461327954b8f","type":"arrow","widgetType":"link","label":"","properties":{"curvyness":50,"selected":false,"color":"#545454","points":[{"id":"b9215ff7-5dd2-489d-8657-27dd555506f6","type":"point","x":127,"y":131.44213866875563},{"id":"4f1dc13e-ba8f-4113-8ec1-9744540a3545","type":"point","x":150,"y":131.44213866875563},{"id":"5d0abb02-07ff-41eb-a47b-fbb1cb5e40c8","type":"point","x":150,"y":218.198347107438},{"id":"0ca1b9ee-49ef-409b-adf2-09c35b58332b","type":"point","x":1.734377892862021,"y":218.198347107438},{"id":"a62473e0-51ac-4939-9995-efcfb88c68c6","type":"point","x":1.734377892862021,"y":260.68751544928784},{"id":"84d41c18-fe4d-49f9-bc3d-90b3ab0d4dc8","type":"point","x":20,"y":260.68751544928784}],"width":1,"selectedColor":"#007aa3"},"points":[],"sourcePort":{"id":"203f4689-1116-404c-b0d1-740b87b76bfd","activeWidgetId":"eaef2a7f-0de1-4551-98d2-96e466030cd2","point":{"x":127,"y":131}},"targetPort":{"id":"4e0b611c-1976-4c29-bfa9-8595668a36be","activeWidgetId":"3e2f8a1d-b424-4081-a9da-33e71b69eaed","point":{"x":20,"y":260}}},"1e06ee1d-a6a3-4d48-9140-07e15c1737ce":{"id":"c539277e-179f-42dd-9d13-ec0646aa74c4","type":"start","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":-167,"y":-15},"ports":[{"portId":"31bc5ae5-0f41-45ce-af39-d62bbf427f24","isSourcePort":false,"linkId":"4ac61881-f453-43b0-a53d-4b6bf9cc8a91","type":"arrow","links":["4ac61881-f453-43b0-a53d-4b6bf9cc8a91"],"properties":{"x":-0.6115673158277559,"name":"out","y":2.900831613495244,"label":"out","alignment":"right"}}],"properties":{"name":"NewPhoneContact","activityName":"NewPhoneContact","activityId":"start","event":"NewPhoneContact","_renderRequestTimestamp":1690908254409,"flowType":{"eventSourceId":"5eff0e2eb10162499bc9f932","eventClassificationId":"5f10475cf021306e89e1692c","eventSpecificationId":"5f2d02144332507e39cc8a7f","eventSourceName":"WebexContactCenter","eventClassificationName":"VoiceInteractions","eventSpecificationName":"ContactStartWorkflow"}}},"1b4a9155-6fb0-4135-aeb5-c3f2867b8112":{"id":"4ac61881-f453-43b0-a53d-4b6bf9cc8a91","type":"arrow","widgetType":"link","label":"","properties":{"curvyness":50,"selected":false,"color":"#545454","points":[{"id":"6e01c20a-e73a-47b4-8a09-2b09253b7cbb","type":"point","x":7,"y":11.400827798797978},{"id":"5a8abb93-b493-4a77-b240-01ac5e2341ec","type":"point","x":30,"y":11.400827798797978},{"id":"a8ed1305-5467-4408-b11f-3a2778354579","type":"point","x":30,"y":84.94214876033058},{"id":"f26547d8-c6bd-45ad-902b-31299b01b07a","type":"point","x":-66.63370597986048,"y":84.94214876033058},{"id":"fa1eb962-70f9-4d1a-b523-4412530887b1","type":"point","x":-66.63370597986048,"y":131.44213866875563},{"id":"60bc23d7-9fcf-4ed1-80e5-89819b8a00d0","type":"point","x":-50.991735537190074,"y":131.44213866875563}],"width":1,"selectedColor":"#007aa3"},"points":[],"sourcePort":{"id":"31bc5ae5-0f41-45ce-af39-d62bbf427f24","activeWidgetId":"c539277e-179f-42dd-9d13-ec0646aa74c4","point":{"x":7,"y":11}},"targetPort":{"id":"da620d2b-562c-4d22-b196-828ffab06ab6","activeWidgetId":"eaef2a7f-0de1-4551-98d2-96e466030cd2","point":{"x":-50,"y":131}}},"d86c47dc-0d2b-4c32-a9ef-0f9d9241b996":{"id":"04e0b87a-d5ba-4a6e-9038-ef4372e035b1","type":"set-variable","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":648,"y":401},"ports":[{"portId":"bb8369e2-2d9d-49c8-a856-c7de52a61f9f","isSourcePort":true,"linkId":"4534da1c-8afd-4fd6-a492-c26835f8e839","type":"arrow","links":["4534da1c-8afd-4fd6-a492-c26835f8e839"],"properties":{"x":640.0312988627636,"name":"in","y":419.0000064955518,"label":"in","alignment":"left"}},{"portId":"48d505b1-8622-44c4-a173-2a7c8d12b0c7","isSourcePort":false,"linkId":"9a94fdc6-7d53-4fc9-bcac-1783569966ec","type":"arrow","links":["9a94fdc6-7d53-4fc9-bcac-1783569966ec"],"properties":{"x":815.03125883971,"name":"out","y":419.0000064955518,"label":"out","alignment":"right"}},{"portId":"775a792a-0922-4e42-a450-8d071a4efc3e","isSourcePort":false,"linkId":null,"type":"arrow","links":[],"properties":{"x":824.0314871465172,"name":"error","y":494.14415179646033,"label":"error","alignment":"right"}}],"properties":{"activityId":"set-variable","srcVariable":"DF_Appointment","name":"SetVariable_Appointment","srcVariableType":"STRING","activityName":"set-variable","setTo":"set-to-literal","description":"Formatting & setting appointment_date & appointment_time in a single Global variable (Appointment) ","expr":"{{ appointment_date | date(\"MM-dd-yyyy\", existingFormat=\"yyyy-MM-dd\") }} {{ appointment_time | date(\"h:mm a\", existingFormat=\"hh:mm:ss\") }}","_renderRequestTimestamp":1690908254409,"literal_invalid_error":false}},"247219d3-2622-42cc-a163-72bd62911c39":{"id":"9a94fdc6-7d53-4fc9-bcac-1783569966ec","type":"arrow","widgetType":"link","label":"","properties":{"curvyness":50,"selected":false,"color":"#545454","points":[{"id":"2285571c-0df7-4001-9c01-c4fb8620dd14","type":"point","x":823,"y":427.5000024932465},{"id":"fa3f249d-58a5-4d0c-af9d-3fe1d5ba5c13","type":"point","x":845,"y":427.5000024932465},{"id":"8624b9bb-156d-4e2c-8693-c5ff0dbb8919","type":"point","x":845,"y":574.8556858690147},{"id":"f5701f3f-1464-4d9d-9020-61d5e7ca6d51","type":"point","x":394.6985406086121,"y":574.8556858690147},{"id":"605ac905-9205-48b5-99ed-c235a212a6fb","type":"point","x":394.6985406086121,"y":621.3527192210857},{"id":"467f5a8b-a05e-4dd9-bc79-5492c9f531a7","type":"point","x":410,"y":621.3527192210857}],"width":1,"selectedColor":"#007aa3"},"points":[],"sourcePort":{"id":"48d505b1-8622-44c4-a173-2a7c8d12b0c7","activeWidgetId":"04e0b87a-d5ba-4a6e-9038-ef4372e035b1","point":{"x":823,"y":427}},"targetPort":{"id":"6ee7bdb9-8ce8-4791-b410-946958ffaa78","activeWidgetId":"1bee8135-0235-4ca1-8125-50bb9f5d281d","point":{"x":410,"y":621}}},"7a47714c-795e-4c38-8f5d-6861cc2d0a23":{"id":"a4eee53c-3a4e-44aa-8591-ff2afa20bbdc","type":"action","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":347,"y":382},"ports":[{"portId":"6608c412-5749-49eb-8772-307eedb1da0d","isSourcePort":true,"linkId":"ae3b8474-2516-4a1e-a30f-9e7babaaacbd","type":"arrow","links":["ae3b8474-2516-4a1e-a30f-9e7babaaacbd"],"properties":{"x":339.9537544388274,"name":"in","y":400.6623559579272,"label":"in","alignment":"left"}},{"portId":"702174c3-404a-4a8b-b7da-9627a31e407d","isSourcePort":false,"linkId":"4534da1c-8afd-4fd6-a492-c26835f8e839","type":"arrow","links":["4534da1c-8afd-4fd6-a492-c26835f8e839"],"properties":{"x":514.9630617119496,"name":"default","y":400.6737260214713,"label":"default","alignment":"right"}}],"properties":{"outputVariableArray":[{"outputVariable":"Call_Reason","jsonPathExp":"$[\"dialogflow.ccai.live-agent-escalation\"].call_reason"},{"outputVariable":"appointment_date","jsonPathExp":"$[\"dialogflow.ccai.live-agent-escalation\"].appointment_date"},{"outputVariable":"appointment_time","jsonPathExp":"$[\"dialogflow.ccai.live-agent-escalation\"].appointment_time"}],"activityId":"parse-activity","inputVariable":"VirtualAgent.MetaData","contentType:type":null,"name":"Parse_Response","activityName":"parse-activity","description":"Parsing the response received from DialogFlow virtual agent and setting those in respective Flow variables.","_renderRequestTimestamp":1690908254409,"contentType":"JSON"}},"a370d534-f356-4dfc-9994-0fc015f923d2":{"id":"4534da1c-8afd-4fd6-a492-c26835f8e839","type":"arrow","widgetType":"link","label":"","properties":{"curvyness":50,"selected":false,"color":"#545454","points":[{"id":"e51addfd-8e36-4f7d-8ef8-3a68ac2a698f","type":"point","x":523,"y":409.1737260214713},{"id":"b5ba3939-26e8-4f7c-8e6e-b4a912623536","type":"point","x":545,"y":409.1737260214713},{"id":"c1ebaeb8-463a-49fb-8835-c6a69c2b8c28","type":"point","x":545,"y":427.5000024932465},{"id":"20b0b457-ed0a-4c5b-9110-6a8c137a9de3","type":"point","x":645,"y":427.5000024932465}],"width":1,"selectedColor":"#007aa3"},"points":[],"sourcePort":{"id":"702174c3-404a-4a8b-b7da-9627a31e407d","activeWidgetId":"a4eee53c-3a4e-44aa-8591-ff2afa20bbdc","point":{"x":523,"y":409}},"targetPort":{"id":"bb8369e2-2d9d-49c8-a856-c7de52a61f9f","activeWidgetId":"04e0b87a-d5ba-4a6e-9038-ef4372e035b1","point":{"x":645,"y":427}}},"8fa2818a-fb2e-4222-8b61-8b0672129064":{"id":"d2001188-8945-428d-aa74-df44693c7a76","type":"arrow","widgetType":"link","label":"","properties":{"curvyness":50,"selected":false,"color":"#545454","points":[{"id":"ac813b65-ff90-49a6-ba31-2867b036771b","type":"point","x":197,"y":452.2187688013327},{"id":"c9e0e5c7-8c12-44e9-872d-47c15b0e2473","type":"point","x":220,"y":452.2187688013327},{"id":"a167abd3-01fd-4a19-ad24-96a66c44ae8e","type":"point","x":220,"y":621.3527192210857},{"id":"ace459dc-dd75-4469-a60e-643dc6681cd2","type":"point","x":410,"y":621.3527192210857}],"width":1,"selectedColor":"#007aa3"},"points":[],"sourcePort":{"id":"1a70a53e-049a-4bb8-996d-0dca6a041f7a","activeWidgetId":"3e2f8a1d-b424-4081-a9da-33e71b69eaed","point":{"x":197,"y":452}},"targetPort":{"id":"6ee7bdb9-8ce8-4791-b410-946958ffaa78","activeWidgetId":"1bee8135-0235-4ca1-8125-50bb9f5d281d","point":{"x":410,"y":621}}},"54a43844-ce63-4efb-bbb2-1a57094fd472":{"id":"90f4e834-db8c-4ec3-a6c8-f8f2fd49103e","type":"terminating-action","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":354,"y":225},"ports":[{"portId":"15623905-c76f-4a64-a2c0-afac5e7042c2","isSourcePort":true,"linkId":"fdf046c2-861d-4253-9c1e-95e3e1fa2728","type":"arrow","links":["fdf046c2-861d-4253-9c1e-95e3e1fa2728"],"properties":{"x":346.5830445245451,"name":"in","y":243.2747365631795,"label":"in","alignment":"left"}}],"properties":{"name":"DisconnectContact_hau","activityName":"disconnect-contact","activityId":"5faa898c8bf5b65b82f0706b","_renderRequestTimestamp":1690908254409}},"34015386-f65a-4513-8d67-8fdb36f4f6e7":{"id":"fdf046c2-861d-4253-9c1e-95e3e1fa2728","type":"arrow","widgetType":"link","label":"","properties":{"curvyness":50,"selected":false,"color":"#545454","points":[{"id":"0edc5c37-778c-41cd-a4c1-7f7f5fe3af31","type":"point","x":197,"y":366.95315433633203},{"id":"c56d199a-47d6-4662-807e-257b290e9ec9","type":"point","x":220,"y":366.95315433633203},{"id":"9369d00c-39fc-4106-9d10-bbf52d0a2286","type":"point","x":220,"y":251.77473143718004},{"id":"404fb523-90eb-4f49-a7a2-900f38792372","type":"point","x":355,"y":251.77473143718004}],"width":1,"selectedColor":"#007aa3"},"points":[],"sourcePort":{"id":"87d479f8-2cb7-4360-ad04-ed6b7728a8c8","activeWidgetId":"3e2f8a1d-b424-4081-a9da-33e71b69eaed","point":{"x":197,"y":366}},"targetPort":{"id":"15623905-c76f-4a64-a2c0-afac5e7042c2","activeWidgetId":"90f4e834-db8c-4ec3-a6c8-f8f2fd49103e","point":{"x":355,"y":251}}},"97cbfe2f-8982-4da0-bb93-feb1055af3bd":{"id":"ae3b8474-2516-4a1e-a30f-9e7babaaacbd","type":"arrow","widgetType":"link","label":"","properties":{"curvyness":50,"selected":false,"color":"#545454","points":[{"id":"82d885a5-446e-424e-96d2-9c5a975da104","type":"point","x":197,"y":397.51563590008345},{"id":"7a40904f-9763-4f0d-ad88-62f6a0960cb5","type":"point","x":220,"y":397.51563590008345},{"id":"ae295e01-a239-46ed-a73e-06a42ea3ecae","type":"point","x":220,"y":409.1623661137934},{"id":"f5d207fb-19b5-4091-9d51-601cd9523d9a","type":"point","x":345,"y":409.1623661137934}],"width":1,"selectedColor":"#007aa3"},"points":[],"sourcePort":{"id":"26f4d4e2-a3eb-425c-aeae-5570cb5cbd51","activeWidgetId":"3e2f8a1d-b424-4081-a9da-33e71b69eaed","point":{"x":197,"y":397}},"targetPort":{"id":"6608c412-5749-49eb-8772-307eedb1da0d","activeWidgetId":"a4eee53c-3a4e-44aa-8591-ff2afa20bbdc","point":{"x":345,"y":409}}}},"properties":{"offsetX":219.2974688926929,"offsetY":43.36235737513091,"zoom":101.96666666666685,"gridSize":0}},"flowId":"64aecbc87915dd42293caa3c","eventFlows":{"eventsMap":{"GLOBAL_EVENTS":{"id":"GLOBAL_EVENTS","name":"name","description":"description","process":{"activities":{"0f8a9f72-e1f8-4fe4-b93a-bc4f3df03a33":{"id":"0f8a9f72-e1f8-4fe4-b93a-bc4f3df03a33","name":"AgentContactAssigned","group":"event","properties":{"eventSourceId":"5eff0e2eb10162499bc9f932","activityId":"event","eventSpecificationId":"5f354a0c6fb8c44e97ccb30d","eventSourceName":"WebexContactCenter","displayName":"AgentAnswered","iconDiagram":"icon-headset_16","eventSpecificationName":"AgentContactAssigned","name":"AgentContactAssigned","eventClassificationId":"5f10475cf021306e89e1692c","event":"AgentAnswered","_renderRequestTimestamp":1690908254409,"eventClassificationName":"VoiceInteractions"}},"51176bef-50f6-49ff-bbc8-5f0eea2fb775":{"id":"51176bef-50f6-49ff-bbc8-5f0eea2fb775","name":"ContactPredial","group":"event","properties":{"eventSourceId":"5eff0e2eb10162499bc9f932","activityId":"event","eventSpecificationId":"63c914bebfee4622076922b1","eventSourceName":"WebexContactCenter","displayName":"PreDial","iconDiagram":"icon-other-number_16","eventSpecificationName":"ContactPredial","name":"ContactPredial","eventClassificationId":"5f10475cf021306e89e1692c","event":"PreDial","_renderRequestTimestamp":1690908254409,"eventClassificationName":"VoiceInteractions"}},"fe25294a-9ed8-4e27-afd1-1d9f82f79740":{"id":"fe25294a-9ed8-4e27-afd1-1d9f82f79740","name":"AgentOfferContact","group":"event","properties":{"eventSourceId":"5eff0e2eb10162499bc9f932","activityId":"event","eventSpecificationId":"637da544c02b556cf406d192","eventSourceName":"WebexContactCenter","displayName":"AgentOffered","iconDiagram":"icon-audio-call_16","eventSpecificationName":"AgentOfferContact","name":"AgentOfferContact","eventClassificationId":"5f10475cf021306e89e1692c","event":"AgentOffered","_renderRequestTimestamp":1690908254409,"eventClassificationName":"VoiceInteractions"}},"5a5d7d5d-b5c0-4fb9-a5a7-8ec855032f37":{"id":"5a5d7d5d-b5c0-4fb9-a5a7-8ec855032f37","name":"ContactEnded","group":"event","properties":{"eventSourceId":"5eff0e2eb10162499bc9f932","activityId":"event","eventSpecificationId":"5f354a336fb8c44e97ccb30e","eventSourceName":"WebexContactCenter","displayName":"PhoneContactEnded","iconDiagram":"icon-handset-muted_16","eventSpecificationName":"ContactEnded","name":"ContactEnded","eventClassificationId":"5f10475cf021306e89e1692c","event":"PhoneContactEnded","_renderRequestTimestamp":1690908254409,"eventClassificationName":"VoiceInteractions"}},"f67401cd-1198-4fb4-8216-d1f4aed2ecfa":{"id":"f67401cd-1198-4fb4-8216-d1f4aed2ecfa","name":"GlobalErrorHandling","group":"event","properties":{"eventSourceId":"5eff0e2eb10162499bc9f932","activityId":"event","eventSpecificationId":"627c0663e98eca854178bba6","eventSourceName":"WebexContactCenter","displayName":"OnGlobalError","iconDiagram":"icon-error-legacy_16","eventSpecificationName":"GlobalErrorHandling","name":"GlobalErrorHandling","eventClassificationId":"5f10475cf021306e89e1692c","event":"OnGlobalError","_renderRequestTimestamp":1690908254409,"eventClassificationName":"VoiceInteractions"}},"7b2de879-31d8-4b8c-b4d5-16ccb17a94de":{"id":"7b2de879-31d8-4b8c-b4d5-16ccb17a94de","name":"FCAsk(ContactLastAgentRemoved)","group":"event","properties":{"eventSourceId":"5eff0e2eb10162499bc9f932","activityId":"event","eventSpecificationId":"5ffeafa86a7eff72a481c4b5","eventSourceName":"WebexContactCenter","displayName":"AgentDisconnected","iconDiagram":"icon-headset-muted_16","eventSpecificationName":"FCAsk(ContactLastAgentRemoved)","name":"FCAsk(ContactLastAgentRemoved)","eventClassificationId":"5f10475cf021306e89e1692c","event":"AgentDisconnected","_renderRequestTimestamp":1690908254410,"eventClassificationName":"VoiceInteractions"}}},"links":[]},"onEvents":{"GlobalErrorHandling":"f67401cd-1198-4fb4-8216-d1f4aed2ecfa","AgentOfferContact":"fe25294a-9ed8-4e27-afd1-1d9f82f79740","ContactPredial":"51176bef-50f6-49ff-bbc8-5f0eea2fb775","AgentContactAssigned":"0f8a9f72-e1f8-4fe4-b93a-bc4f3df03a33","ContactEnded":"5a5d7d5d-b5c0-4fb9-a5a7-8ec855032f37","FCAsk(ContactLastAgentRemoved)":"7b2de879-31d8-4b8c-b4d5-16ccb17a94de"},"diagram":{"widgets":{"f67401cd-1198-4fb4-8216-d1f4aed2ecfa":{"id":"d977b546-b140-4c53-a16c-108bbb94af88","type":"event","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":100,"y":115},"ports":[{"portId":"a9ac822e-bc7d-41d3-85a9-47279a3affc2","isSourcePort":false,"linkId":null,"type":"arrow","links":[],"properties":{"x":100,"name":"out","y":115,"label":"out","alignment":"right"}}],"properties":{"eventSourceId":"5eff0e2eb10162499bc9f932","activityId":"event","eventSpecificationId":"627c0663e98eca854178bba6","eventSourceName":"WebexContactCenter","displayName":"OnGlobalError","iconDiagram":"icon-error-legacy_16","eventSpecificationName":"GlobalErrorHandling","name":"GlobalErrorHandling","eventClassificationId":"5f10475cf021306e89e1692c","event":"OnGlobalError","_renderRequestTimestamp":1690908254409,"eventClassificationName":"VoiceInteractions"}},"fe25294a-9ed8-4e27-afd1-1d9f82f79740":{"id":"20b8a656-1ae0-4f5f-a6f4-99c2c8f55c0c","type":"event","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":100,"y":230},"ports":[{"portId":"f7f11f46-9c2d-47cf-bd38-d477b45d0703","isSourcePort":false,"linkId":null,"type":"arrow","links":[],"properties":{"x":100,"name":"out","y":230,"label":"out","alignment":"right"}}],"properties":{"eventSourceId":"5eff0e2eb10162499bc9f932","activityId":"event","eventSpecificationId":"637da544c02b556cf406d192","eventSourceName":"WebexContactCenter","displayName":"AgentOffered","iconDiagram":"icon-audio-call_16","eventSpecificationName":"AgentOfferContact","name":"AgentOfferContact","eventClassificationId":"5f10475cf021306e89e1692c","event":"AgentOffered","_renderRequestTimestamp":1690908254409,"eventClassificationName":"VoiceInteractions"}},"51176bef-50f6-49ff-bbc8-5f0eea2fb775":{"id":"660c7cdf-421d-44d1-b7e6-84f17274d05e","type":"event","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":100,"y":345},"ports":[{"portId":"a45df7e1-b83c-419d-be49-313ccc5926ef","isSourcePort":false,"linkId":null,"type":"arrow","links":[],"properties":{"x":100,"name":"out","y":345,"label":"out","alignment":"right"}}],"properties":{"eventSourceId":"5eff0e2eb10162499bc9f932","activityId":"event","eventSpecificationId":"63c914bebfee4622076922b1","eventSourceName":"WebexContactCenter","displayName":"PreDial","iconDiagram":"icon-other-number_16","eventSpecificationName":"ContactPredial","name":"ContactPredial","eventClassificationId":"5f10475cf021306e89e1692c","event":"PreDial","_renderRequestTimestamp":1690908254409,"eventClassificationName":"VoiceInteractions"}},"0f8a9f72-e1f8-4fe4-b93a-bc4f3df03a33":{"id":"bef7a5e3-3037-40dd-921a-d52d5efb1fd9","type":"event","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":100,"y":460},"ports":[{"portId":"34e5287c-1f1d-4294-8316-1ff116a77a07","isSourcePort":false,"linkId":null,"type":"arrow","links":[],"properties":{"x":100,"name":"out","y":460,"label":"out","alignment":"right"}}],"properties":{"eventSourceId":"5eff0e2eb10162499bc9f932","activityId":"event","eventSpecificationId":"5f354a0c6fb8c44e97ccb30d","eventSourceName":"WebexContactCenter","displayName":"AgentAnswered","iconDiagram":"icon-headset_16","eventSpecificationName":"AgentContactAssigned","name":"AgentContactAssigned","eventClassificationId":"5f10475cf021306e89e1692c","event":"AgentAnswered","_renderRequestTimestamp":1690908254409,"eventClassificationName":"VoiceInteractions"}},"5a5d7d5d-b5c0-4fb9-a5a7-8ec855032f37":{"id":"c2d43281-f3cf-4bd1-bc92-c2d29efb5477","type":"event","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":100,"y":575},"ports":[{"portId":"b981de16-c601-4999-9ac1-eef587552fa0","isSourcePort":false,"linkId":null,"type":"arrow","links":[],"properties":{"x":100,"name":"out","y":575,"label":"out","alignment":"right"}}],"properties":{"eventSourceId":"5eff0e2eb10162499bc9f932","activityId":"event","eventSpecificationId":"5f354a336fb8c44e97ccb30e","eventSourceName":"WebexContactCenter","displayName":"PhoneContactEnded","iconDiagram":"icon-handset-muted_16","eventSpecificationName":"ContactEnded","name":"ContactEnded","eventClassificationId":"5f10475cf021306e89e1692c","event":"PhoneContactEnded","_renderRequestTimestamp":1690908254409,"eventClassificationName":"VoiceInteractions"}},"7b2de879-31d8-4b8c-b4d5-16ccb17a94de":{"id":"c145aba3-fb22-4a4f-a2ea-5559f0ee7531","type":"event","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":100,"y":690},"ports":[{"portId":"93892445-b94c-4c92-bbea-892303051c19","isSourcePort":false,"linkId":null,"type":"arrow","links":[],"properties":{"x":100,"name":"out","y":690,"label":"out","alignment":"right"}}],"properties":{"eventSourceId":"5eff0e2eb10162499bc9f932","activityId":"event","eventSpecificationId":"5ffeafa86a7eff72a481c4b5","eventSourceName":"WebexContactCenter","displayName":"AgentDisconnected","iconDiagram":"icon-headset-muted_16","eventSpecificationName":"FCAsk(ContactLastAgentRemoved)","name":"FCAsk(ContactLastAgentRemoved)","eventClassificationId":"5f10475cf021306e89e1692c","event":"AgentDisconnected","_renderRequestTimestamp":1690908254410,"eventClassificationName":"VoiceInteractions"}}},"properties":{}}}},"properties":{"offsetX":0,"offsetY":0,"zoom":0,"gridSize":0}},"runtimeVariables":[],"validating":true,"persist":true,"validationResults":[],"createdBy":"nwuthoo_si@email.carehybrid.com","createdDate":"2023-08-01T16:44:19.62","lastModifiedDate":"2023-08-01T16:44:19.62","lastModifiedBy":"nwuthoo_si@email.carehybrid.com","variableOrders":{"pop-over":[{"name":"ani","variableSeq":"0"},{"name":"dn","variableSeq":"1"},{"name":"virtualTeamName","variableSeq":"2"}],"interaction-panel":[]}} \ No newline at end of file diff --git a/playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-cx-sample/Virtual_agent.zip b/playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-cx-sample/Virtual_agent.zip new file mode 100644 index 0000000000000000000000000000000000000000..fbcf7d99f1fae284720e397723a4609b694d1234 GIT binary patch literal 11642 zcmbVy1yt49+V`QQ!$SyCN_UrlbR4<`1?lF{ARtJ0NlA;8fV7BoNOvnpcb9-567PS! zcLq75cjo(GJqy^Z^Lujd{lr$5LqJ3Wfj~C^q68s`ewQ`|ezOCJ10WNqlZBI;x|^Me zBddX(ovj7b$p%kuy6#885bC?JF&IcC!>JIYy9jrU zs7VtI10LjkNo}n=9Bw^SUp)htYUjH_L_%~(nG%*(2=SL+ES7eFN67Nr#Wd+#9sVx= zOLh9k`GDLj0O14VYGP<^Yis4mYG`0>05vlCA*WQ9z?O?b`2IA~vxRq@k5`{(ThKgNE>z$Q8!LV@2uf)e(J;i6nG`zYKJt_eDrZTt ze#=sbeh_@T=sG?hEOusqfbJn}wxhUZ8>zWi=8Yt|t9hO&5L8KL2r^WO%JT6sy^(ht zZ2XnLC7xYDaS?1o9x$qa=U~9>RkXZ#Fs) zoninI00@X5zypq~5+KKjVtS8(xS`{-la=`Fm3Waj0>fG zt3IK=c!>ui;QM!QJC{X*w-;TAe62>!wjVQHNODq}ab4oRHOGS~S8Pwmuxv-)CnN~v z#;2SL=`FjgBTf&X4h`ug9ZIiLrjEQ$+)kZOp(K^gJCyON*o?ukQqjlJY%v-WR3dHL2BkPQqeo2n?ACBc9EDC)4?&Bzx;LZ{lk)x z)#GU1^MdlHspOxy!=E*JJm1`>ls@Nk)y>*G(kCe)zX)M@5btr9=qsFeIDW7yJTLM$ zf`@j6B!fz)arG)j3BI@P#pNL;61}R?%gABSOB649SpIal$K(Po$>vswp@OmmvObiI z$|GRM0cvB15l}hT-*~(_QT&Al=k%Wh&=S^uRxSoUpOz_E#F`bo93r(fLFaF0ri6h#?lbPPu|S z(RwQyjsuPBPTccj)020!YPL# z%dKw!_%-9O zf^&{~?wP|>@>*WKWA?A9O-2q5*J;>7mfkyzk{gdEg|2ZsK|NHZYV9XJsSiWpHlEz|WRgR_gnQP^0< zZy6zfHjm|qCLqL|-%%XWZaBVtnS&#ShozbB?~i7wtD{^arjC;JZliQvJz~%Tp`+b9 zzIKX@MUiae=y6?!^u{IhL(`K=%JQ19fLm&24yDq&FPjZ-TcE!!<*Ma>XYo0qpS?{; zHHJxR{{$167rDQ*gmPADowEXtl;3@N1}>{_x7(1p;krYVpzhuQfIfn7AQ0^@^!nZT z63LGKfek0%_$+jBg{8PSZE7l~Gl{GWC)T0bSNY4VM?PAlV)3r$?qU%ZNW&bWhPGO( zJnt)A)nplX=RvNPHKodP!ckL*b-R|wEw7(>`ZR02hr6x`k?E{#HlV?0fEa$#MAQs8`YF^M z44{stCJwCE|NOhZi0Ojc;`N%U^v%L=WgFfk>IDDcF047GOOML|Fe)Xk0HczarHB0D zBSHuX0s~`#yib>9&cPC9K92^T-xPDi=Wnk9?9K^UBidBr5Z7iCcuYWs0y*x<+mgRiywrx+8!HV z)g@_;d+D)j9T2ID_P*hSY)zT*;5gcyXP2YX&sGRdi3!NN^~&mJXX%U z>^f9W`6DHH!8l%48Z&x!p?>A%S(^WbA+z3fHFfJ7>8$|uyZ{3Kq^34-(E;>}Q-Fu9 zQofvx{Udj!4EHEEI|wg9DloUEon|E@L`t?jAs0CWB0xb(pVWrL9}@4S9PvEA4QJms zv-d2sHwKcCkq>vnTk-(nC?1N(dBAZnjKC3!7v@t?1n&L&Mct}~R2v2eb@9h#4I|ud z4Br-2h6c}$A#&^`*}32l_Ga_kyLJkve~=)X*#fP5=-GQA{M)4d#k$m0BQaX6+RZ0Vx z2KKwpDNw9474KKHJ><mAiSS+ zQM6@MwEdNt-&e44adVDvE6MT6NSMchchmqQQ+D`1r>Rzb zEVY%AH~*qITafOycUzMt7fvpv^x+9*OM6(}u%VyV!mf6rt~2&^OAF$RVdnyBOab)s z&J_bvZwk??Qim0G;jfeG0|jui2q76T2Qpx8K!m*Qhtk+h!Rm(Sh<2jMGt;k}HDfPl zUfyC5%L~vOA$^q+Pw*%hGZrG8q--J9yHnr;sMs^jS+ zmD4emoeEKy_?l`uA_r4(mvfF3!=;b98rK5#eJMUwpibhEb(Sy4`Q2spK81eBjcY4@ z@VKxZj^pfrKchQ$3-!9c-Co1*=KR9nl2Bs`aa*X1iGw4M@Yq6GVHf`E?;bSZnw300 z4~>3@yWR2$g7bbM^B!&zmml(H3)xH@$mR69k&EL%HK*qte=2k3bbmoI3<7~7Fj1#E z)UKprVn^Lxq>p5SOK#cHnrO3@c)^BVuPazi?!FV5uZ=~5fL$*_(3YUYz^&IG!z0i( zPM2}c?r@5r@w9TdjC8$?^1=jDw}=X^`t?^vlCHFwrqbuwstJ@DuX|qd?eR7A#8Q4k zxUMjzhWt(vps)^%yJ7YFt-G%>i@RZRgj$~zSr+DKB(WTGeG=n(@ENEtr?VOOYHsMx zdhSm1GJ=@HS*rA-gp4w?UF`y^Z+BaWB$gkdzFH%nf!#7 zawY}x7~RF-1K3Y58e=+aOdjD?g*}F|>vu&VrKutOzZ{qqXs(;$T6n{iGP@1v+V(o`_J)_vMfjlw5)l0HP z9upCg6-#Wk*kl^cpJARAms=z*ezL3A+$CXKd)#pBz$@k7isp`MD}%wbjJe3)_m(L~ za)=A;&G{MMBw!UL%E#(m8&C9u{mvf4nq70wVmpi?P$W*5Z6#Yb7QH^l##o}_S zn|#NwA!`cZ_hH!?{?@%&?QT`C`>t8a72>6(UVf=H?@P+iX;R(W*-YUNl56QLa6gKN z%ir@EnfAt?hmt7_kz6-}gXfXa5}-Z-5(vck4`%q?{*G(5glESI-2Dy~XVFV=(G5tL zkzjTIGN+J@u~S-G)#cA8D*1IGbvX7aF+tPu;{j=U7oU@j?FP*c5g%cg>Bp9do<;ghv&PSNU(?8alC zN%NB!6aAxu-l>6{)6LG~if=)i&*~$}-4&@K>~qOb`cr%!oy;wb$ot zzkN7Jqulup3v<44(wDbk*JF1joE>T);$={`uAI)jBIc|>nLR2!bX$?423{uz!c$NqCtwcWTGN9{oZ@|#m* zNbgZdp7^7CK>duRLKT-bqM-`gu6d~8++RH}aroqSjVq1sUsqG5oIJY-P%j@i37CGT z=I??c2BtHJ)mmpkt?z!HP6=1ymN7Ueo0fQax9 zwZ*lMPBN&1&)kPp(W|ihf?}OjhJkVu->Xjkn;v2U*i$Cu=BFkJ0>PJAPI!JI&cX>Fyc>{w-zdn{ralFeuzc%Etk(ln4o3OUeP?QI>w49BQgbqJaH5a`*8b`` zT`m3a^LD(h)g&7j*bj_YrllnJMng#6*V0p4SQuEz-K5J3ceq1J3$Kk9Q^yo{b}W0* zS$BlcKCbJDE7O0FuC;nX?JfWc1_NUIu9bSm5DM4OhWh!U*CtfeLj%+pN@K80u_FA? z^Ld%25^j~bh`sSn^C|NAfY5~T>Mj=DJDm?wRrpo-a4fRbQrj2|jJ_v|T9Jje`yi!; z1uL=YrlY!DSq@#iN8IsM^NE^|oG$v+NAXi}d#IDbAOvFFlpOk7(B)@-UnZ zt)4ati8#^E`5i%Qc^_mo4`Y3>qzvp~V`HfD#qZ*_c1BWkoJyD4vzfIbyyS?~3c%P0rg_z@iPi&JG>a(+L%5VCVy*Cy~T%JRa9?$rU&EQ+2 zSr%80fdCfGOorZl&tti2i8kt_S(nFzV$!uo2picF9h#`NGcA`>yZCm^W6~&I`s4&o z2#F^-fi^l*zIMVwbfXqvluGc&)2B9qpYHf#&j~-B&L}$K<{xRdHqx(&c{m8`+1}*ED9`vVGtT~7`wRYJ zU1GwP#aN~`0}eyUWMh7#E<>kQy!5EZVfz~WthQ1`qcfc?e;utIA(!27o3!KweQRVo%GC!Qdoy}`^*oGqdP zwqTLuxe>TDNT5lB88hRAyY*~0c-YXSqgI>h#+;uZd6X@gS>R)Wa1(;BiRbO*Q-z;D zfEig*GUwyXsca8w79zl#5Op#1fQhl_SG9I)^E)N<_6VK>Gn9yC(v9|BN|CIG3XR{5 z#YxVmQ;ckD8fHgcb}6L`1%e)87=L4%=p^26>`1I$M(DY4mdD5j|AzYXT-Zf0tG?pQ0G+FZgG>yqcYeb5)P;On3TXj}OZ(a@8SS`owxYS* zKI)PR^Cyg&)FlTlV;|9Uz)A$ww`$GBb-`X+45l($*c%;=304|QCg`E)S&Vu<5-ghn ztIm_flTvY+s;Be`C8|aZPqE(`Zp@f*Wc1|oK7W$a1sYRHnF|^tpi`wP8ZDw|2 zi86Ba{crZudZ5HwCDmQR7Y&b}z>UP~?rhH%ncB*X9;D|sa98!Ov#Yf4S?UtcjH(`# zGi6(Z7aZsaj*TF!v`;)dG^mSzIX<@Qs&D&&b&GlG4nigM(VdY)rY0=WXG)D;YQ@jm z zUCa?tYr(Z3Y7gaXF>#N{irW#{WHF4{+X_8p^aXYK64jX~R;tGKjVCbGPp^P*2^hEy zJ^%^QA9>@e7(=*Ko2Q&$L^WW%Xn)xyZ_;N!ap-WIcPC4>(s_aE*lf7m@vb}zGX z3F4skcBxTIQ%uuBbi<`;=> zcOtW7gWBhrn@8^EwAuLcnHa@)b4p)1o=U&Wef(@e_xs%^*oNMC{B*ZP!_Yda`2{F* z#(ko_pCXQ_by;fqj$u9?h}m9U<*n>YX&$V;89$~lM^P^^N8ta-8!A>q7KuP0_qMchLX)%^%ZlSl%xrp5OHc6(NghZ zT6-N4b|EQF3&nfQf^7)l>&)_}+l2-_abA~q&Z$mI9CZ10?r7yc^L<9(Cw$kI_zgC^ zkQrlB1r3pHWUK*RX)dK((H+j9$k!@7*}Q@MaeIn;$z3~!(|jI<7@BSbt<~gI0TV_R zI45q&h+el>diZV(6K{5=@Y^;sB9#=z(Vr>U7VC_A<`6)#$iQ`ew6^E_7b_#N#~X(& z(V7}W*=O_aT zPg4sAo1gm)KLRZ+?%^M)N5|}UdaO)r5(&zEYWq`;a%g~XHVGwb4yj}%)kF1!aHe>48n2H?}-CHN3sh8CkPD|hKg0f}$22nHoSGu?qIeXoR=c!)y@B32SOdZrFroNec zz$KL>?29%jGpxIXp!9Cx!)U2BF>~CTB!_$Vixsv>cg`oCP3j+HuJ`M71;jNwzV^s5 z{TLIYZCm|$vTm&GzLKzb4}ON+^aoNEtkl3qn-A^q5x$HfogmMRySVf|)CeE&D%9%f z>wCYv^8K~Z<{Q+ac1-r{%0Q~(?{&FlW%M0QV`GOUPkRWZl6ilD=eciJ~50BoUFL-Rjd!ckw@^+cqb45Ev z!rQcJ{cItN^m_7{ZtZXBa&RSmPOQoaPmT0#W)k@YXmuAeFvV6bZXpT42Zb0I4Pc8tK|Gqibr7NMt) z*M}(wV{-hR)^G&)DxaF|O*DUfCnR>^;YprD4;Jj)WekxXHbD|$+Km^$h6+JQ4SMSR(=?!ps{O8A_1S#&o7t}- zyq;`C47WS2zdh+%XG5IPm+7`2iXqrOAMYWhFDw3P(a8@8ro?Ce#E0=Rbg#Cs* z4Yz((=rk`?leqw{(TnrA8@01poM@2Jjx$I!iA>qUAK?a6U&J$TLUAwu1E|^Msn?yo zhOe@0`MOKnub=GBxL9CuQE7jQs~1J-h|m(%cC1i4@ssiA)-6w1n9H5q%9lA3s<||s zo}!Fy(v6yDzLRaXq|<_19fkR+Y2XuELQf{tyuXr}Iay4(Us;u=8^Tq{to?#{3;mn( z0p|776|zD5HV&|IKR|!HSpjlksMC)F(jN7G==iB*+%43EgoGk^=Yj_{WfUWc zbadEpRcz|#t}#x=r9ri^^=$nCt+c&?$aa><0cNZ!sZ}DhF50n`PY#Mp`wa(gZlRFx zrm2~;L5J?05Gp#QZ6k;?Y!=uQR6;+CJ2Ht<-54dg>@#DTlomGaL}$kB#I8bJ4wm?w zpZJ-2-#A>0;rV@)kKJDiw@{Sj;Na1I$ocEHHGl#?eF2*MKfbhq#fNlP?Ptfa=-d_!VVTFYqt6t%4UCA@_p+M|+3S%-y( h%}1}`)9?J8ohr*A0k<^>L<)SP0at|1AJ0@k{|9N(6?*^x literal 0 HcmV?d00001 diff --git a/playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-cx-sample/inline-editor.js b/playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-cx-sample/inline-editor.js new file mode 100644 index 0000000..ae2cbc3 --- /dev/null +++ b/playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-cx-sample/inline-editor.js @@ -0,0 +1,96 @@ +/** + * Dialogflow CX Fulfillment Webhook — Webex Contact Center Integration + * ===================================================================== + * Dialogflow generation: CX (current, recommended for new projects) + * Deploy target: Google Cloud Functions (HTTP trigger) + * WxCC integration: Virtual Agent Voice node → Dialogflow CX agent → this webhook + * + * WHAT THIS DOES: + * Handles a Dialogflow CX webhook POST request triggered by a page or route group. + * Calls a backend API to retrieve an account balance for the caller, then returns + * a fulfillment_response that Dialogflow CX speaks back to the caller. + * + * WHAT THIS DOES NOT DO: + * - Validate incoming webhook request signatures (add in production) + * - Handle authentication with Webex Contact Center (handled by WxCC + Google Cloud IAM) + * - Implement retry logic, circuit breaking, or persistent logging + * - Support multiple users / multi-tenant deployments + * + * ENVIRONMENT VARIABLES (set in Cloud Function runtime configuration): + * MOCK_API_URL_CX — Full URL of the account balance API endpoint. + * The API must return a JSON object with a "balance" key. + * Example: https://your-api.example.com/balance?customer=Caller + * + * CALLER CONTEXT: + * Caller metadata is passed from Webex Contact Center as Dialogflow CX session + * parameters. Access them via req.body.sessionInfo.parameters if needed. + * + * RESPONSE SHAPE (Dialogflow CX fulfillment_response): + * { + * fulfillment_response: { + * messages: [{ text: { text: ["...spoken text..."] } }] + * } + * } + * + * ADAPTED FROM: + * https://github.com/WebexSamples/webex-contact-center-api-samples/tree/main/dialogflow-sample/dialogflow-cx-sample + */ + +'use strict'; + +const https = require('https'); + +/** + * Cloud Function entry point for Dialogflow CX webhook fulfillment. + * Function name: acc_balance + * + * @param {import('express').Request} req Dialogflow CX webhook POST request + * @param {import('express').Response} res HTTP response + */ +exports.acc_balance = (req, res) => { + const mockApiUrl = process.env.MOCK_API_URL_CX; + + if (!mockApiUrl) { + console.error('MOCK_API_URL_CX environment variable is not set.'); + res.status(500).send('Server configuration error: MOCK_API_URL_CX not set.'); + return; + } + + https + .get(mockApiUrl, (apiResponse) => { + let data = ''; + + apiResponse.on('data', (chunk) => { + data += chunk; + }); + + apiResponse.on('end', () => { + try { + const responseData = JSON.parse(data); + const bal = responseData.balance; + + const jsonResponse = { + fulfillment_response: { + messages: [ + { + text: { + text: ['The balance amount in your account is ' + bal + '.'], + }, + }, + ], + }, + }; + + console.log('Balance retrieved:', bal); + res.status(200).send(jsonResponse); + } catch (error) { + console.error('Error parsing API response:', error.message); + res.status(500).send('Error parsing API response'); + } + }); + }) + .on('error', (error) => { + console.error('Error calling backend API:', error.message); + res.status(500).send('Error calling backend API'); + }); +}; diff --git a/playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-cx-sample/package.json b/playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-cx-sample/package.json new file mode 100644 index 0000000..9aea249 --- /dev/null +++ b/playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-cx-sample/package.json @@ -0,0 +1,17 @@ +{ + "name": "dialogflow-cx-fulfillment", + "description": "Dialogflow CX fulfillment webhook for Webex Contact Center — deploys to Google Cloud Functions", + "version": "0.0.1", + "private": true, + "license": "Apache-2.0", + "engines": { + "node": "18" + }, + "scripts": { + "start": "functions-framework --target=acc_balance --source=inline-editor.js", + "deploy": "gcloud functions deploy acc_balance --runtime nodejs18 --trigger-http --allow-unauthenticated" + }, + "devDependencies": { + "@google-cloud/functions-framework": "^3.0.0" + } +} diff --git a/playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-es-sample/CCAI_Flow_DialogFlowES.json b/playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-es-sample/CCAI_Flow_DialogFlowES.json new file mode 100644 index 0000000..c5bbfae --- /dev/null +++ b/playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-es-sample/CCAI_Flow_DialogFlowES.json @@ -0,0 +1 @@ +{"orgId":"6ea87036-890d-4118-be56-c1f4d92a9e7a","version":42,"id":"647a17d90b5b8a4655de76ee","name":"CCAI_Flow_DialogFlowES","description":"This is an example flow for Data passing to DialogFlow and usage for fulfillments.","comment":"","variables":[{"name":"Global_FeedbackSurveyOptIn","description":"Use this system variable to store if the caller opts-in to completing a feedback survey or not. This variable must be used in the flow to report on survey completion metrics. Use a Feedback activity after the opt-in logic to indicate the survey settings to use for each interaction. Supported string values include \"true\", \"false\" or \"undefined\".","type":"STRING","value":"uninitialized","isCAD":true,"desktopLabel":"Post Call Survey Opt-in","isAgentEditable":true,"source":"GLOBAL","isReportable":false,"overwrite":false,"isSecure":false,"id":""},{"name":"customerName","description":"","type":"STRING","value":"Arunabh","isCAD":true,"desktopLabel":"Name","isAgentEditable":false,"source":"","isReportable":false,"overwrite":false,"isSecure":false,"id":""},{"name":"Global_Language","description":"Use this system variable to store the default language code that the flow should use for all interactions. This reflects the input language that the customer uses. To reset the default value of en-US (English, US), use a Set Variable activity in the flow. You can override this default setting when configuring relevant activities.","type":"STRING","value":"en-US","isCAD":true,"desktopLabel":"Customer Language","isAgentEditable":false,"source":"GLOBAL","isReportable":false,"overwrite":false,"isSecure":false,"id":""},{"name":"Global_VoiceName","description":"Use this system variable to store the default output voice name that the flow should use for all text-to-speech and virtual agent interactions. By default, the value inherits the default voice name associated with the language code defined in the Global_Language variable value. To reset this to a specific voice name, use a Set Variable activity in the flow. You can override this default setting when configuring relevant activities.","type":"STRING","value":"Automatic","isCAD":false,"desktopLabel":"","isAgentEditable":false,"source":"GLOBAL","isReportable":false,"overwrite":false,"isSecure":false,"id":""},{"name":"customerEmail","description":"","type":"STRING","value":"arubhatt@cisco.com","isCAD":true,"desktopLabel":"Email","isAgentEditable":false,"source":"","isReportable":false,"overwrite":false,"isSecure":false,"id":""},{"name":"customerReason","description":"","type":"STRING","value":"Bookings","isCAD":false,"desktopLabel":"","isAgentEditable":false,"source":"","isReportable":false,"overwrite":false,"isSecure":false,"id":""},{"name":"botTranscript","description":"","type":"STRING","value":"None","isCAD":true,"desktopLabel":"Transcript","isAgentEditable":true,"source":"","isReportable":false,"overwrite":false,"isSecure":false,"id":""},{"name":"URL","description":"","type":"STRING","value":"None","isCAD":true,"desktopLabel":"URL","isAgentEditable":true,"source":"","isReportable":false,"overwrite":false,"isSecure":false,"id":""},{"name":"account","description":"","type":"STRING","value":"None","isCAD":true,"desktopLabel":"Account","isAgentEditable":false,"source":"","isReportable":false,"overwrite":false,"isSecure":false,"id":""},{"name":"phone","description":"","type":"STRING","value":"None","isCAD":true,"desktopLabel":"Phone","isAgentEditable":false,"source":"","isReportable":false,"overwrite":false,"isSecure":false,"id":""},{"name":"languageCode","description":"","type":"STRING","value":"english","isCAD":false,"desktopLabel":"","isAgentEditable":false,"source":"","isReportable":false,"overwrite":false,"isSecure":false,"id":""}],"process":{"activities":{"f00483c7-c0d8-4fe9-9d2d-6f3ae9b04c59":{"id":"f00483c7-c0d8-4fe9-9d2d-6f3ae9b04c59","name":"CustomGreeting","group":"enum-gateway","properties":{"speakingRate":"1.0","description":"Example to pass data for a custom greeting.","outputVoice:type":null,"activityId":"5f33a6045d76a50d1e8fb4d0","transcript":true,"volumeGain":"0.0","connector_type":null,"dtmfTimeout":5,"_renderRequestTimestamp":1685723095497,"maxNoInputCount":3,"terminationDelay":5,"inputLanguage:type":null,"inputLanguage_type":null,"inputLanguage":"en","botParameters":{"name":"{{customerName}}","email":"{{customerEmail}}","option":"1","reason":"{{customerReason}}","language":"{{languageCode}} ","pin":"70843"},"activityName":"ivr-virtualassistant","outputVoice":"en-US-Wavenet-A","connector:type":null,"interruptible":true,"overrideLanguageToggle":true,"connector":"c7fd8ba4-9918-4aed-8a69-0560d87ada24","name":"CustomGreeting","noInputTimeout":5,"outputVoice_type":null,"dtmfTerminatorSymbol":"#"}},"ad223aef-ac2d-423e-b88e-da4d3e618bb7":{"id":"ad223aef-ac2d-423e-b88e-da4d3e618bb7","name":"DisconnectContact1","group":"terminating-action","properties":{"name":"DisconnectContact1","activityName":"disconnect-contact","activityId":"5faa898c8bf5b65b82f0706b","_renderRequestTimestamp":1685723095497}},"dc07fd16-451b-4dc2-af1d-5775cc8ce8ec":{"id":"dc07fd16-451b-4dc2-af1d-5775cc8ce8ec","name":"PlayMusic1","group":"action","properties":{"duration":-1,"activityId":"5faa2ad13505f538acc86afc","prompt:type":null,"name":"PlayMusic1","activityName":"play-music","description":"Music in Queue","prompt_type":null,"skip":0,"_renderRequestTimestamp":1685723095497,"prompt":"defaultmusic_on_hold.wav","promptDynamic":null,"audioRadioGroup":"staticAudio"}},"eef1ca36-99fc-417e-8e41-e0e895edd166":{"id":"eef1ca36-99fc-417e-8e41-e0e895edd166","name":"DisconnectContact2","group":"terminating-action","properties":{"name":"DisconnectContact2","activityName":"disconnect-contact","activityId":"5faa898c8bf5b65b82f0706b","_renderRequestTimestamp":1685723095497}},"9ef87c71-1d3b-4e90-ab06-07025673d319":{"id":"9ef87c71-1d3b-4e90-ab06-07025673d319","name":"QueueContact1","group":"action","properties":{"fallbackQueue":null,"queueRadioGroup":"staticQueue","fallbackQueue_type":null,"fallbackQueue:type":null,"destination":"AXYaYZ5X9-gRG_t_4tWs","activityName":"queue-contact","description":"Queue to Agent","destination:type":"LONGEST_AVAILABLE_AGENT","toggle":true,"priority":"1","priority:type":null,"agentAvailabilityRadioGroup":null,"priorityRadioGroup":"staticPriority","skills":null,"activityId":"5f114550ef5cfc454fbbf133","destination_type":"LONGEST_AVAILABLE_AGENT","priority_type":null,"priorityVariable":null,"destinationVariable":null,"name":"QueueContact1","toggleAgentAvailability":false,"agentAvailabilityVariable":null,"_renderRequestTimestamp":1685723095497}},"c5196b6a-ec8d-498b-aac0-7bfbd3dd3c8c":{"id":"c5196b6a-ec8d-498b-aac0-7bfbd3dd3c8c","name":"SetLanguage","group":"set-variable","properties":{"activityId":"set-variable","srcVariable":"languageCode","name":"SetLanguage","srcVariableType":"STRING","activityName":"set-variable","setTo":"set-to-literal","description":"Here is where you can pass the language for your bot.\nThis can be a condition.","expr":"{{ \"english\" }}","_renderRequestTimestamp":1685723095497,"literal_invalid_error":false}},"3b676e69-906d-4fb4-8514-6567acf1a58e":{"id":"3b676e69-906d-4fb4-8514-6567acf1a58e","name":"NewPhoneContact","group":"start","properties":{"name":"NewPhoneContact","activityName":"NewPhoneContact","activityId":"start","event":"NewPhoneContact","_renderRequestTimestamp":1685723095497,"flowType":{"eventSourceId":"5eff0e2eb10162499bc9f932","eventClassificationId":"5f10475cf021306e89e1692c","eventSpecificationId":"5f2d02144332507e39cc8a7f","eventSourceName":"WebexContactCenter","eventClassificationName":"VoiceInteractions","eventSpecificationName":"ContactStartWorkflow"}}},"0a852019-d415-49ae-8fac-acfa762f360c":{"id":"0a852019-d415-49ae-8fac-acfa762f360c","name":"EndFlow_te8","group":"end","properties":{"name":"EndFlow_te8","activityName":"end","activityId":"end","_renderRequestTimestamp":1685723095497}},"97fcdf12-b05f-4331-b1f1-391e1b7c4d6e":{"id":"97fcdf12-b05f-4331-b1f1-391e1b7c4d6e","name":"EndFlow_vs5","group":"end","properties":{"name":"EndFlow_vs5","activityName":"end","activityId":"end","_renderRequestTimestamp":1685723095498}}},"links":[{"id":"6bf0085c-8673-49a9-83c3-29aec638eca5","sourceActivityId":"f00483c7-c0d8-4fe9-9d2d-6f3ae9b04c59","targetActivityId":"ad223aef-ac2d-423e-b88e-da4d3e618bb7","conditionExpr":"error","properties":{"value":"error"}},{"id":"4e6ad159-b355-446d-a37c-f9aaa14162c9","sourceActivityId":"dc07fd16-451b-4dc2-af1d-5775cc8ce8ec","targetActivityId":"dc07fd16-451b-4dc2-af1d-5775cc8ce8ec","conditionExpr":"default","properties":{"value":"default"}},{"id":"e57b087d-8455-4efe-b89f-1dbd0a330897","sourceActivityId":"f00483c7-c0d8-4fe9-9d2d-6f3ae9b04c59","targetActivityId":"eef1ca36-99fc-417e-8e41-e0e895edd166","conditionExpr":"ENDED","properties":{"value":"ENDED"}},{"id":"f0942321-35ea-493e-93f9-277562f3e787","sourceActivityId":"9ef87c71-1d3b-4e90-ab06-07025673d319","targetActivityId":"dc07fd16-451b-4dc2-af1d-5775cc8ce8ec","conditionExpr":"default","properties":{"value":"default"}},{"id":"6f3c0af9-cffd-4865-af71-6fbb82110df4","sourceActivityId":"c5196b6a-ec8d-498b-aac0-7bfbd3dd3c8c","targetActivityId":"f00483c7-c0d8-4fe9-9d2d-6f3ae9b04c59","conditionExpr":"out","properties":{"value":"out"}},{"id":"1225aff3-6842-4e64-9903-ed670218e1ca","sourceActivityId":"f00483c7-c0d8-4fe9-9d2d-6f3ae9b04c59","targetActivityId":"9ef87c71-1d3b-4e90-ab06-07025673d319","conditionExpr":"ESCALATE","properties":{"value":"ESCALATE"}},{"id":"76a432e0-b910-43cf-b1be-9dfabb3be4fd","sourceActivityId":"3b676e69-906d-4fb4-8514-6567acf1a58e","targetActivityId":"c5196b6a-ec8d-498b-aac0-7bfbd3dd3c8c","conditionExpr":"out","properties":{"value":"out"}},{"id":"5203afb8-02c1-434b-a65f-4b97701b5124","sourceActivityId":"dc07fd16-451b-4dc2-af1d-5775cc8ce8ec","targetActivityId":"0a852019-d415-49ae-8fac-acfa762f360c","conditionExpr":"error","properties":{"value":"error"}},{"id":"5416ed1d-06a1-4542-b811-67fdc63bd5e8","sourceActivityId":"9ef87c71-1d3b-4e90-ab06-07025673d319","targetActivityId":"97fcdf12-b05f-4331-b1f1-391e1b7c4d6e","conditionExpr":"failure","properties":{"value":"failure"}}]},"diagram":{"widgets":{"f00483c7-c0d8-4fe9-9d2d-6f3ae9b04c59":{"id":"6c5f0bf9-7f59-422f-b96d-7302d8f2b4aa","type":"enum-gateway","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":-666,"y":-2},"ports":[{"portId":"afc91347-fece-464b-a992-02fb21265e5a","isSourcePort":true,"linkId":"3010f5f5-5806-4295-bdbd-3a1c8463eabd","type":"arrow","links":["3010f5f5-5806-4295-bdbd-3a1c8463eabd"],"properties":{"x":-674,"name":"in","y":12,"label":"in","alignment":"left"}},{"portId":"c3875f1b-4013-4a12-817c-75c7b12c43f9","isSourcePort":false,"linkId":"288e1eca-100c-44fc-88f1-2f3f61b821f2","type":"arrow","links":["288e1eca-100c-44fc-88f1-2f3f61b821f2"],"properties":{"x":-498.5,"name":"error","y":203.566650390625,"label":"error","alignment":"right"}},{"portId":"cbc63f76-d0c8-46fd-8990-11a7e1de82bb","isSourcePort":false,"linkId":"27586dea-0e25-41ca-803c-f8c5a01ee369","type":"arrow","links":["27586dea-0e25-41ca-803c-f8c5a01ee369"],"properties":{"x":-498.5,"name":"ENDED","y":118.2833251953125,"label":"ENDED","alignment":"right"}},{"portId":"4ec4da25-f158-4dc0-b6ed-c73d3db774ac","isSourcePort":false,"linkId":"49dc2c71-f4ab-4357-b389-2848a121d780","type":"arrow","links":["49dc2c71-f4ab-4357-b389-2848a121d780"],"properties":{"x":-498.5,"name":"ESCALATE","y":148.85000610351562,"label":"ESCALATE","alignment":"right"}}],"properties":{"inputLanguage":"en","speakingRate":"1.0","botParameters":{"name":"{{customerName}}","email":"{{customerEmail}}","option":"1","reason":"{{customerReason}}","language":"{{languageCode}} ","pin":"70843"},"activityName":"ivr-virtualassistant","description":"Example to pass data for a custom greeting.","outputVoice":"en-US-Wavenet-A","outputVoice:type":null,"connector:type":null,"interruptible":true,"activityId":"5f33a6045d76a50d1e8fb4d0","transcript":true,"overrideLanguageToggle":true,"connector":"c7fd8ba4-9918-4aed-8a69-0560d87ada24","volumeGain":"0.0","name":"CustomGreeting","dtmfTimeout":5,"noInputTimeout":5,"dtmfTerminatorSymbol":"#","_renderRequestTimestamp":1685723095497,"maxNoInputCount":3,"terminationDelay":5,"inputLanguage:type":null}},"ad223aef-ac2d-423e-b88e-da4d3e618bb7":{"id":"dfe67cfc-0925-476f-8012-dd4b565d6cbd","type":"terminating-action","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":-531,"y":444},"ports":[{"portId":"d74ec674-723d-41e8-912e-759ff93f68bd","isSourcePort":true,"linkId":"288e1eca-100c-44fc-88f1-2f3f61b821f2","type":"arrow","links":["288e1eca-100c-44fc-88f1-2f3f61b821f2"],"properties":{"x":-539,"name":"in","y":462,"label":"in","alignment":"left"}}],"properties":{"name":"DisconnectContact1","activityName":"disconnect-contact","activityId":"5faa898c8bf5b65b82f0706b","_renderRequestTimestamp":1685723095497}},"6bf0085c-8673-49a9-83c3-29aec638eca5":{"id":"288e1eca-100c-44fc-88f1-2f3f61b821f2","type":"arrow","widgetType":"link","label":"","properties":{"curvyness":50,"selected":false,"color":"#545454","points":[{"id":"766d1947-4cc5-4130-8219-7eccdf1ef447","type":"point","x":-490,"y":212.066650390625},{"id":"ec522e0c-295b-4733-85b8-76c9decabf91","type":"point","x":-470,"y":212.066650390625},{"id":"7eba8c7b-5fde-427c-ba7d-b6c9c17f702a","type":"point","x":-470,"y":424},{"id":"10772fb7-1c12-4808-95d9-290390827260","type":"point","x":-550.5,"y":424},{"id":"e7597625-2e41-43c6-bf4e-4e4d069742e0","type":"point","x":-550.5,"y":470.5},{"id":"f14a54ba-f026-4883-9570-1167c152adcf","type":"point","x":-530.5,"y":470.5}],"width":1,"selectedColor":"#007aa3"},"points":[],"sourcePort":{"id":"c3875f1b-4013-4a12-817c-75c7b12c43f9","activeWidgetId":"6c5f0bf9-7f59-422f-b96d-7302d8f2b4aa","point":{"x":-490,"y":212}},"targetPort":{"id":"d74ec674-723d-41e8-912e-759ff93f68bd","activeWidgetId":"dfe67cfc-0925-476f-8012-dd4b565d6cbd","point":{"x":-530,"y":470}}},"dc07fd16-451b-4dc2-af1d-5775cc8ce8ec":{"id":"e9320fe4-199d-42d0-a869-0b2f73defe89","type":"action","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":-256,"y":375},"ports":[{"portId":"79240a9f-24f2-4b2c-8f8c-326279bb5198","isSourcePort":true,"linkId":"be0ccff2-d4aa-43cc-be2f-352cf8f998d8","type":"arrow","links":["be0ccff2-d4aa-43cc-be2f-352cf8f998d8","f3dd44fa-bcb1-4ef3-a0cb-19bfd031b8f9"],"properties":{"x":-264,"name":"in","y":393,"label":"in","alignment":"left"}},{"portId":"ceb6ff88-5570-458c-8abb-487d58e541ed","isSourcePort":false,"linkId":"be0ccff2-d4aa-43cc-be2f-352cf8f998d8","type":"arrow","links":["be0ccff2-d4aa-43cc-be2f-352cf8f998d8"],"properties":{"x":-89,"name":"default","y":393,"label":"default","alignment":"right"}},{"portId":"b4a69b83-66d6-4718-bc18-5b1f8d5fd531","isSourcePort":false,"linkId":"1d1451a8-2be3-4d08-9e16-12f6d92ea45c","type":"arrow","links":["1d1451a8-2be3-4d08-9e16-12f6d92ea45c"],"properties":{"x":-88.5,"name":"error","y":486.2833251953125,"label":"error","alignment":"right"}}],"properties":{"duration":-1,"activityId":"5faa2ad13505f538acc86afc","prompt:type":null,"name":"PlayMusic1","activityName":"play-music","description":"Music in Queue","skip":0,"_renderRequestTimestamp":1685723095497,"prompt":"defaultmusic_on_hold.wav","promptDynamic":null,"audioRadioGroup":"staticAudio"}},"4e6ad159-b355-446d-a37c-f9aaa14162c9":{"id":"be0ccff2-d4aa-43cc-be2f-352cf8f998d8","type":"arrow","widgetType":"link","label":"","properties":{"curvyness":50,"selected":false,"color":"#545454","points":[{"id":"974f6083-1393-4b33-9b6c-17167040a72d","type":"point","x":-80.5,"y":401.5},{"id":"3cfd0d04-9840-49ad-b791-c7f81467b5b7","type":"point","x":-60,"y":401.5},{"id":"3b5c3486-be45-4de8-a314-57e55d2623e8","type":"point","x":-60,"y":355},{"id":"f88ebf72-2553-4412-92b8-f642dca33591","type":"point","x":-275.5,"y":355},{"id":"cc3f1056-3d44-4413-a6d0-473521cbbccd","type":"point","x":-275.5,"y":401.5},{"id":"e181b61c-d03c-484d-869a-561d011c6a90","type":"point","x":-255.5,"y":401.5}],"width":1,"selectedColor":"#007aa3"},"points":[],"sourcePort":{"id":"ceb6ff88-5570-458c-8abb-487d58e541ed","activeWidgetId":"e9320fe4-199d-42d0-a869-0b2f73defe89","point":{"x":-80,"y":401}},"targetPort":{"id":"79240a9f-24f2-4b2c-8f8c-326279bb5198","activeWidgetId":"e9320fe4-199d-42d0-a869-0b2f73defe89","point":{"x":-255,"y":401}}},"eef1ca36-99fc-417e-8e41-e0e895edd166":{"id":"c89c5e6b-2b5c-4a97-83e9-8add559de02e","type":"terminating-action","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":-263,"y":44},"ports":[{"portId":"77343b44-f501-45ea-ade9-015415e9a29b","isSourcePort":true,"linkId":"27586dea-0e25-41ca-803c-f8c5a01ee369","type":"arrow","links":["27586dea-0e25-41ca-803c-f8c5a01ee369"],"properties":{"x":-271,"name":"in","y":62,"label":"in","alignment":"left"}}],"properties":{"name":"DisconnectContact2","activityName":"disconnect-contact","activityId":"5faa898c8bf5b65b82f0706b","_renderRequestTimestamp":1685723095497}},"e57b087d-8455-4efe-b89f-1dbd0a330897":{"id":"27586dea-0e25-41ca-803c-f8c5a01ee369","type":"arrow","widgetType":"link","label":"","properties":{"curvyness":50,"selected":false,"color":"#545454","points":[{"id":"dad82e63-0c08-4e6e-ad1a-c57835dc9597","type":"point","x":-490,"y":126.7833251953125},{"id":"af6faee5-8437-4c65-b807-fc0f9f6c92a1","type":"point","x":-470,"y":126.7833251953125},{"id":"fb1f3ce9-908e-482f-a3b8-5bc36d617c02","type":"point","x":-470,"y":70.5},{"id":"6196a7dc-1c34-449e-bb9d-52ce6f9500e1","type":"point","x":-265,"y":70.5}],"width":1,"selectedColor":"#007aa3"},"points":[],"sourcePort":{"id":"cbc63f76-d0c8-46fd-8990-11a7e1de82bb","activeWidgetId":"6c5f0bf9-7f59-422f-b96d-7302d8f2b4aa","point":{"x":-490,"y":126}},"targetPort":{"id":"77343b44-f501-45ea-ade9-015415e9a29b","activeWidgetId":"c89c5e6b-2b5c-4a97-83e9-8add559de02e","point":{"x":-265,"y":70}}},"9ef87c71-1d3b-4e90-ab06-07025673d319":{"id":"db5f994d-4ab0-4c5c-b2c7-b437443b49b8","type":"action","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":-165,"y":176},"ports":[{"portId":"037dce26-33ee-4a01-9122-8275975e0924","isSourcePort":true,"linkId":"49dc2c71-f4ab-4357-b389-2848a121d780","type":"arrow","links":["49dc2c71-f4ab-4357-b389-2848a121d780"],"properties":{"x":-173,"name":"in","y":194,"label":"in","alignment":"left"}},{"portId":"90f65f44-82a2-4c56-a52e-7c3f00304e93","isSourcePort":false,"linkId":"f3dd44fa-bcb1-4ef3-a0cb-19bfd031b8f9","type":"arrow","links":["f3dd44fa-bcb1-4ef3-a0cb-19bfd031b8f9"],"properties":{"x":2,"name":"default","y":194,"label":"default","alignment":"right"}},{"portId":"b69e9e10-6b49-42ea-9596-be54ed6e6494","isSourcePort":false,"linkId":"4e89e52d-2ada-4e82-accf-6ea26e20cf82","type":"arrow","links":["4e89e52d-2ada-4e82-accf-6ea26e20cf82"],"properties":{"x":11,"name":"failure","y":269.1499938964844,"label":"failure","alignment":"right"}}],"properties":{"fallbackQueue":null,"queueRadioGroup":"staticQueue","fallbackQueue:type":null,"destination":"AXYaYZ5X9-gRG_t_4tWs","activityName":"queue-contact","description":"Queue to Agent","destination:type":"LONGEST_AVAILABLE_AGENT","toggle":true,"priority":"1","priority:type":null,"agentAvailabilityRadioGroup":null,"priorityRadioGroup":"staticPriority","skills":null,"activityId":"5f114550ef5cfc454fbbf133","priorityVariable":null,"destinationVariable":null,"name":"QueueContact1","toggleAgentAvailability":false,"agentAvailabilityVariable":null,"_renderRequestTimestamp":1685723095497}},"f0942321-35ea-493e-93f9-277562f3e787":{"id":"f3dd44fa-bcb1-4ef3-a0cb-19bfd031b8f9","type":"arrow","widgetType":"link","label":"","properties":{"curvyness":50,"selected":false,"color":"#545454","points":[{"id":"2b2aad85-1f00-4ea3-9bc9-78c2f85b7bab","type":"point","x":10.5,"y":202.5},{"id":"087b9bfc-78af-4ded-b9d3-00ebe3d73706","type":"point","x":30,"y":202.5},{"id":"e03abc4b-fab2-4a39-b91c-86d937133f2f","type":"point","x":30,"y":355},{"id":"f3ffa3cd-ec6c-4397-8711-e1861a2f8401","type":"point","x":-275.5,"y":355},{"id":"f2a43398-0821-4273-a91e-2227e9a34bc0","type":"point","x":-275.5,"y":401.5},{"id":"dd6e0876-1a88-4341-aa1a-3f0fc440e768","type":"point","x":-255.5,"y":401.5}],"width":1,"selectedColor":"#007aa3"},"points":[],"sourcePort":{"id":"90f65f44-82a2-4c56-a52e-7c3f00304e93","activeWidgetId":"db5f994d-4ab0-4c5c-b2c7-b437443b49b8","point":{"x":10,"y":202}},"targetPort":{"id":"79240a9f-24f2-4b2c-8f8c-326279bb5198","activeWidgetId":"e9320fe4-199d-42d0-a869-0b2f73defe89","point":{"x":-255,"y":401}}},"c5196b6a-ec8d-498b-aac0-7bfbd3dd3c8c":{"id":"6feecb05-0fa3-4911-8aff-4a5c3290302b","type":"set-variable","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":-921,"y":179},"ports":[{"portId":"ebb671f8-d32f-4d61-ad81-e19e3fcad24b","isSourcePort":true,"linkId":"f97d0d42-2f46-46a6-8cc5-91b7a441bd66","type":"arrow","links":["f97d0d42-2f46-46a6-8cc5-91b7a441bd66"],"properties":{"x":-929,"name":"in","y":197,"label":"in","alignment":"left"}},{"portId":"c9478772-bfc9-4797-aec9-5979d7497d51","isSourcePort":false,"linkId":"3010f5f5-5806-4295-bdbd-3a1c8463eabd","type":"arrow","links":["3010f5f5-5806-4295-bdbd-3a1c8463eabd"],"properties":{"x":-754,"name":"out","y":197,"label":"out","alignment":"right"}},{"portId":"3b0215b7-54e1-4643-b62e-4c40fd26ca30","isSourcePort":false,"linkId":null,"type":"arrow","links":[],"properties":{"x":-753.5,"name":"error","y":290.2833251953125,"label":"error","alignment":"right"}}],"properties":{"activityId":"set-variable","srcVariable":"languageCode","name":"SetLanguage","srcVariableType":"STRING","activityName":"set-variable","setTo":"set-to-literal","description":"Here is where you can pass the language for your bot.\nThis can be a condition.","expr":"{{ \"english\" }}","_renderRequestTimestamp":1685723095497,"literal_invalid_error":false}},"6f3c0af9-cffd-4865-af71-6fbb82110df4":{"id":"3010f5f5-5806-4295-bdbd-3a1c8463eabd","type":"arrow","widgetType":"link","label":"","properties":{"curvyness":50,"selected":false,"color":"#545454","points":[{"id":"c499bd32-762c-423a-903c-791a6319e188","type":"point","x":-745.5,"y":205.5},{"id":"1fbda266-0319-4c8b-9538-f089ce95c226","type":"point","x":-725,"y":205.5},{"id":"7d739f15-3f37-4494-b31e-0b25bddd773f","type":"point","x":-725,"y":20.5},{"id":"ee3891e3-a103-4f92-9838-9e986d93d220","type":"point","x":-665.5,"y":20.5}],"width":1,"selectedColor":"#007aa3"},"points":[],"sourcePort":{"id":"c9478772-bfc9-4797-aec9-5979d7497d51","activeWidgetId":"6feecb05-0fa3-4911-8aff-4a5c3290302b","point":{"x":-745,"y":205}},"targetPort":{"id":"afc91347-fece-464b-a992-02fb21265e5a","activeWidgetId":"6c5f0bf9-7f59-422f-b96d-7302d8f2b4aa","point":{"x":-665,"y":20}}},"1225aff3-6842-4e64-9903-ed670218e1ca":{"id":"49dc2c71-f4ab-4357-b389-2848a121d780","type":"arrow","widgetType":"link","label":"","properties":{"curvyness":50,"selected":false,"color":"#545454","points":[{"id":"ce616164-c087-43e7-9de5-a2997ec4814f","type":"point","x":-490,"y":157.35000610351562},{"id":"d3474510-251f-475e-a0aa-ebaff9b60f0e","type":"point","x":-470,"y":157.35000610351562},{"id":"ed69e608-90b8-41e1-9774-ce26bdf5f1ae","type":"point","x":-470,"y":202.5},{"id":"622ddccd-4f98-4049-9d13-506633515e3a","type":"point","x":-164.5,"y":202.5}],"width":1,"selectedColor":"#007aa3"},"points":[],"sourcePort":{"id":"4ec4da25-f158-4dc0-b6ed-c73d3db774ac","activeWidgetId":"6c5f0bf9-7f59-422f-b96d-7302d8f2b4aa","point":{"x":-490,"y":157}},"targetPort":{"id":"037dce26-33ee-4a01-9122-8275975e0924","activeWidgetId":"db5f994d-4ab0-4c5c-b2c7-b437443b49b8","point":{"x":-164,"y":202}}},"3b676e69-906d-4fb4-8514-6567acf1a58e":{"id":"39739a0d-2e01-4493-a9fa-b8d3d56018c5","type":"start","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":-1005,"y":-56},"ports":[{"portId":"f3ea7450-2743-4339-b1b9-eb705e73ad0f","isSourcePort":false,"linkId":"f97d0d42-2f46-46a6-8cc5-91b7a441bd66","type":"arrow","links":["f97d0d42-2f46-46a6-8cc5-91b7a441bd66"],"properties":{"x":-838,"name":"out","y":-38,"label":"out","alignment":"right"}}],"properties":{"name":"NewPhoneContact","activityName":"NewPhoneContact","activityId":"start","event":"NewPhoneContact","_renderRequestTimestamp":1685723095497,"flowType":{"eventSourceId":"5eff0e2eb10162499bc9f932","eventClassificationId":"5f10475cf021306e89e1692c","eventSpecificationId":"5f2d02144332507e39cc8a7f","eventSourceName":"WebexContactCenter","eventClassificationName":"VoiceInteractions","eventSpecificationName":"ContactStartWorkflow"}}},"76a432e0-b910-43cf-b1be-9dfabb3be4fd":{"id":"f97d0d42-2f46-46a6-8cc5-91b7a441bd66","type":"arrow","widgetType":"link","label":"","properties":{"curvyness":50,"selected":false,"color":"#545454","points":[{"id":"a56d8a7b-25a3-4805-95c7-25c6218f2b87","type":"point","x":-829.5,"y":-29.5},{"id":"f51d12af-db1d-4dbc-8316-340bd632672e","type":"point","x":-810,"y":-29.5},{"id":"482703af-006e-420e-82a0-1dad138d6808","type":"point","x":-810,"y":159},{"id":"6bba11fb-dc4c-4830-a5a1-7012c995dd08","type":"point","x":-942.5,"y":159},{"id":"5231ca88-8674-47f9-9e04-8adf84c53fdb","type":"point","x":-942.5,"y":205.5},{"id":"fc805678-0c20-4305-b229-1eeb994a4a5b","type":"point","x":-920.5,"y":205.5}],"width":1,"selectedColor":"#007aa3"},"points":[],"sourcePort":{"id":"f3ea7450-2743-4339-b1b9-eb705e73ad0f","activeWidgetId":"39739a0d-2e01-4493-a9fa-b8d3d56018c5","point":{"x":-829,"y":-29}},"targetPort":{"id":"ebb671f8-d32f-4d61-ad81-e19e3fcad24b","activeWidgetId":"6feecb05-0fa3-4911-8aff-4a5c3290302b","point":{"x":-920,"y":205}}},"0a852019-d415-49ae-8fac-acfa762f360c":{"id":"95836bef-7ee7-40fe-af32-b8234c3d7e01","type":"end","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":56,"y":595},"ports":[{"portId":"1645625b-ec50-4905-b7fd-4c6a883c66d5","isSourcePort":true,"linkId":"1d1451a8-2be3-4d08-9e16-12f6d92ea45c","type":"arrow","links":["1d1451a8-2be3-4d08-9e16-12f6d92ea45c"],"properties":{"x":48,"name":"in","y":613,"label":"in","alignment":"left"}}],"properties":{"name":"EndFlow_te8","activityName":"end","activityId":"end","_renderRequestTimestamp":1685723095497}},"5203afb8-02c1-434b-a65f-4b97701b5124":{"id":"1d1451a8-2be3-4d08-9e16-12f6d92ea45c","type":"arrow","widgetType":"link","label":"","properties":{"curvyness":50,"selected":false,"color":"#545454","points":[{"id":"f4791560-6fe2-4f24-85a1-99f75d52324e","type":"point","x":-80,"y":494.7833251953125},{"id":"17e4d085-a997-43c8-8377-6351e1def062","type":"point","x":-60,"y":494.7833251953125},{"id":"a0f35ca4-922c-4e03-a406-80bfb655c0e0","type":"point","x":-60,"y":621.5},{"id":"e0f48536-c737-4c28-a3ce-2f630a258574","type":"point","x":55,"y":621.5}],"width":1,"selectedColor":"#007aa3"},"points":[],"sourcePort":{"id":"b4a69b83-66d6-4718-bc18-5b1f8d5fd531","activeWidgetId":"e9320fe4-199d-42d0-a869-0b2f73defe89","point":{"x":-80,"y":494}},"targetPort":{"id":"1645625b-ec50-4905-b7fd-4c6a883c66d5","activeWidgetId":"95836bef-7ee7-40fe-af32-b8234c3d7e01","point":{"x":55,"y":621}}},"97fcdf12-b05f-4331-b1f1-391e1b7c4d6e":{"id":"17813e1d-b14e-44c6-b9bc-f01412c702fa","type":"end","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":152,"y":325},"ports":[{"portId":"bfab7203-e4c7-4fa2-8ed1-ff5e3513bc57","isSourcePort":true,"linkId":"4e89e52d-2ada-4e82-accf-6ea26e20cf82","type":"arrow","links":["4e89e52d-2ada-4e82-accf-6ea26e20cf82"],"properties":{"x":144,"name":"in","y":343,"label":"in","alignment":"left"}}],"properties":{"name":"EndFlow_vs5","activityName":"end","activityId":"end","_renderRequestTimestamp":1685723095498}},"5416ed1d-06a1-4542-b811-67fdc63bd5e8":{"id":"4e89e52d-2ada-4e82-accf-6ea26e20cf82","type":"arrow","widgetType":"link","label":"","properties":{"curvyness":50,"selected":false,"color":"#545454","points":[{"id":"90f0eea7-48a4-442a-9af3-49a1e62b0d86","type":"point","x":11,"y":269.1499938964844},{"id":"6eded8fa-f971-4cda-bbd3-c1543546ecd4","type":"point","x":30,"y":269.1499938964844},{"id":"b533e32c-26b3-4ad7-84c8-405943a9b4bf","type":"point","x":30,"y":351.5},{"id":"3e82226e-e3b0-48b2-b004-7b2176719805","type":"point","x":150,"y":351.5}],"width":1,"selectedColor":"#007aa3"},"points":[],"sourcePort":{"id":"b69e9e10-6b49-42ea-9596-be54ed6e6494","activeWidgetId":"db5f994d-4ab0-4c5c-b2c7-b437443b49b8","point":{"x":11,"y":269}},"targetPort":{"id":"bfab7203-e4c7-4fa2-8ed1-ff5e3513bc57","activeWidgetId":"17813e1d-b14e-44c6-b9bc-f01412c702fa","point":{"x":150,"y":351}}}},"properties":{"offsetX":1057,"offsetY":119,"zoom":100,"gridSize":0}},"flowId":"60bfb862f34f0e092b355c38","eventFlows":{"eventsMap":{"GLOBAL_EVENTS":{"id":"GLOBAL_EVENTS","name":"name","description":"description","process":{"activities":{"44adfe4c-968b-43ac-9df6-14e44cb4fea3":{"id":"44adfe4c-968b-43ac-9df6-14e44cb4fea3","name":"AgentContactAssigned","group":"event","properties":{"eventSourceId":"5eff0e2eb10162499bc9f932","activityId":"event","eventSpecificationId":"5f354a0c6fb8c44e97ccb30d","eventSourceName":"WebexContactCenter","displayName":"AgentAnswered","iconDiagram":"icon-headset_16","eventSpecificationName":"AgentContactAssigned","name":"AgentContactAssigned","eventClassificationId":"5f10475cf021306e89e1692c","event":"AgentAnswered","_renderRequestTimestamp":1685723095498,"eventClassificationName":"VoiceInteractions"}},"691fe448-bf1e-4230-ba1d-10d8b49352e0":{"id":"691fe448-bf1e-4230-ba1d-10d8b49352e0","name":"EndFlow_zlx","group":"end","properties":{"activityId":"end","name":"EndFlow_zlx","activityName":"end","_renderRequestTimestamp":1685723095498}},"d3e54703-32d6-4a08-8afe-dddfc5adae99":{"id":"d3e54703-32d6-4a08-8afe-dddfc5adae99","name":"EndFlow_0mu","group":"end","properties":{"activityId":"end","name":"EndFlow_0mu","activityName":"end","_renderRequestTimestamp":1685723095498}},"2a983fbe-892e-4046-b3f5-92a9a3d84b53":{"id":"2a983fbe-892e-4046-b3f5-92a9a3d84b53","name":"EndFlow4","group":"end","properties":{"activityId":"end","name":"EndFlow4","activityName":"end","_renderRequestTimestamp":1685723095498}},"5494af1b-33a1-4162-94ef-cb5155ba843c":{"id":"5494af1b-33a1-4162-94ef-cb5155ba843c","name":"EndFlow2","group":"end","properties":{"activityId":"end","name":"EndFlow2","activityName":"end","_renderRequestTimestamp":1685723095498}},"e12a42ed-7d5d-4967-850d-4f921f7ca328":{"id":"e12a42ed-7d5d-4967-850d-4f921f7ca328","name":"FCAsk(ContactLastAgentRemoved)","group":"event","properties":{"eventSourceId":"5eff0e2eb10162499bc9f932","activityId":"event","eventSpecificationId":"5ffeafa86a7eff72a481c4b5","eventSourceName":"WebexContactCenter","displayName":"AgentDisconnected","iconDiagram":"icon-headset-muted_16","eventSpecificationName":"FCAsk(ContactLastAgentRemoved)","name":"FCAsk(ContactLastAgentRemoved)","eventClassificationId":"5f10475cf021306e89e1692c","event":"AgentDisconnected","_renderRequestTimestamp":1685723095498,"eventClassificationName":"VoiceInteractions"}},"b67f4416-470a-4c55-ae30-8da8517d339f":{"id":"b67f4416-470a-4c55-ae30-8da8517d339f","name":"EndFlow3","group":"end","properties":{"activityId":"end","name":"EndFlow3","activityName":"end","_renderRequestTimestamp":1685723095498}},"5d7f8a27-6e96-45cd-8260-e54316e628c0":{"id":"5d7f8a27-6e96-45cd-8260-e54316e628c0","name":"GlobalErrorHandling","group":"event","properties":{"eventSourceId":"5eff0e2eb10162499bc9f932","activityId":"event","eventSpecificationId":"627c0663e98eca854178bba6","eventSourceName":"WebexContactCenter","displayName":"OnGlobalError","iconDiagram":"icon-error-legacy_16","eventSpecificationName":"GlobalErrorHandling","name":"GlobalErrorHandling","eventClassificationId":"5f10475cf021306e89e1692c","event":"OnGlobalError","_renderRequestTimestamp":1685723095498,"eventClassificationName":"VoiceInteractions"}},"0fba4f53-98fe-4e5c-b935-e20a66ec4a6e":{"id":"0fba4f53-98fe-4e5c-b935-e20a66ec4a6e","name":"AgentOfferContact","group":"event","properties":{"eventSourceId":"5eff0e2eb10162499bc9f932","activityId":"event","eventSpecificationId":"637da544c02b556cf406d192","eventSourceName":"WebexContactCenter","displayName":"AgentOffered","iconDiagram":"icon-audio-call_16","eventSpecificationName":"AgentOfferContact","name":"AgentOfferContact","eventClassificationId":"5f10475cf021306e89e1692c","event":"AgentOffered","_renderRequestTimestamp":1685723095498,"eventClassificationName":"VoiceInteractions"}},"e142f73c-34bf-4c34-afc9-dc0a10b22915":{"id":"e142f73c-34bf-4c34-afc9-dc0a10b22915","name":"ContactEnded","group":"event","properties":{"eventSourceId":"5eff0e2eb10162499bc9f932","activityId":"event","eventSpecificationId":"5f354a336fb8c44e97ccb30e","eventSourceName":"WebexContactCenter","displayName":"PhoneContactEnded","iconDiagram":"icon-handset-muted_16","eventSpecificationName":"ContactEnded","name":"ContactEnded","eventClassificationId":"5f10475cf021306e89e1692c","event":"PhoneContactEnded","_renderRequestTimestamp":1685723095498,"eventClassificationName":"VoiceInteractions"}}},"links":[{"id":"a0c3c95f-387f-43f2-8b76-76a26f7dec8d","sourceActivityId":"44adfe4c-968b-43ac-9df6-14e44cb4fea3","targetActivityId":"2a983fbe-892e-4046-b3f5-92a9a3d84b53","conditionExpr":"out","properties":{"value":"out"}},{"id":"83311050-aa2e-41a1-9b27-b4c2ee766cd1","sourceActivityId":"e142f73c-34bf-4c34-afc9-dc0a10b22915","targetActivityId":"5494af1b-33a1-4162-94ef-cb5155ba843c","conditionExpr":"out","properties":{"value":"out"}},{"id":"67b9ccfd-b7b3-4b85-bb77-23bd31c771d3","sourceActivityId":"e12a42ed-7d5d-4967-850d-4f921f7ca328","targetActivityId":"b67f4416-470a-4c55-ae30-8da8517d339f","conditionExpr":"out","properties":{"value":"out"}},{"id":"553ccc42-c777-4179-ad63-ea2beea54f3f","sourceActivityId":"5d7f8a27-6e96-45cd-8260-e54316e628c0","targetActivityId":"d3e54703-32d6-4a08-8afe-dddfc5adae99","conditionExpr":"out","properties":{"value":"out"}},{"id":"2761b97f-c360-4520-bac1-be93d11dd563","sourceActivityId":"0fba4f53-98fe-4e5c-b935-e20a66ec4a6e","targetActivityId":"691fe448-bf1e-4230-ba1d-10d8b49352e0","conditionExpr":"out","properties":{"value":"out"}}]},"onEvents":{"AgentContactAssigned":"44adfe4c-968b-43ac-9df6-14e44cb4fea3","ContactEnded":"e142f73c-34bf-4c34-afc9-dc0a10b22915","FCAsk(ContactLastAgentRemoved)":"e12a42ed-7d5d-4967-850d-4f921f7ca328","GlobalErrorHandling":"5d7f8a27-6e96-45cd-8260-e54316e628c0","AgentOfferContact":"0fba4f53-98fe-4e5c-b935-e20a66ec4a6e"},"diagram":{"widgets":{"44adfe4c-968b-43ac-9df6-14e44cb4fea3":{"id":"0b722dbb-f220-40fb-b1ea-8c03eac5f647","type":"event","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":7,"y":22},"ports":[{"portId":"de680329-453a-492f-870a-bd7fc74c0a9b","isSourcePort":false,"linkId":"3f369b5d-db2f-4dd5-95d4-9e48a0fe3941","type":"arrow","links":["3f369b5d-db2f-4dd5-95d4-9e48a0fe3941"],"properties":{"x":174,"name":"out","y":40,"label":"out","alignment":"right"}}],"properties":{"eventSourceId":"5eff0e2eb10162499bc9f932","activityId":"event","eventSpecificationId":"5f354a0c6fb8c44e97ccb30d","eventSourceName":"WebexContactCenter","displayName":"AgentAnswered","iconDiagram":"icon-headset_16","eventSpecificationName":"AgentContactAssigned","name":"AgentContactAssigned","eventClassificationId":"5f10475cf021306e89e1692c","event":"AgentAnswered","_renderRequestTimestamp":1685723095498,"eventClassificationName":"VoiceInteractions"}},"2a983fbe-892e-4046-b3f5-92a9a3d84b53":{"id":"aab95228-b4aa-4645-b592-e6c06b157b44","type":"end","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":388,"y":100},"ports":[{"portId":"be0ba31d-ca9b-4b47-ae3f-ebc168c6e427","isSourcePort":true,"linkId":"3f369b5d-db2f-4dd5-95d4-9e48a0fe3941","type":"arrow","links":["3f369b5d-db2f-4dd5-95d4-9e48a0fe3941"],"properties":{"x":380,"name":"in","y":118,"label":"in","alignment":"left"}}],"properties":{"name":"EndFlow4","activityName":"end","activityId":"end","_renderRequestTimestamp":1685723095498}},"a0c3c95f-387f-43f2-8b76-76a26f7dec8d":{"id":"3f369b5d-db2f-4dd5-95d4-9e48a0fe3941","type":"arrow","widgetType":"link","label":"","properties":{"curvyness":50,"selected":false,"color":"#545454","points":[{"id":"5ba186c6-c6c8-4993-9d5b-a3191dee056d","type":"point","x":182.5,"y":48.5},{"id":"ae6b19a1-c92c-4ce5-ac20-81cfafe792a4","type":"point","x":205,"y":48.5},{"id":"9d53aca5-139e-4ecd-8176-511002c9745c","type":"point","x":205,"y":126.5},{"id":"60800129-d632-4b27-be0f-ed43c52953c7","type":"point","x":388.5,"y":126.5}],"width":1,"selectedColor":"#007aa3"},"points":[],"sourcePort":{"id":"de680329-453a-492f-870a-bd7fc74c0a9b","activeWidgetId":"0b722dbb-f220-40fb-b1ea-8c03eac5f647","point":{"x":182,"y":48}},"targetPort":{"id":"be0ba31d-ca9b-4b47-ae3f-ebc168c6e427","activeWidgetId":"aab95228-b4aa-4645-b592-e6c06b157b44","point":{"x":388,"y":126}}},"e142f73c-34bf-4c34-afc9-dc0a10b22915":{"id":"05c109f6-c053-4bff-bd31-039b14fbbe23","type":"event","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":4,"y":127},"ports":[{"portId":"7eed830e-c791-43c9-b83b-aeffb8d18476","isSourcePort":false,"linkId":"b5452096-d6ff-4c54-bb78-6dde094cd0e6","type":"arrow","links":["b5452096-d6ff-4c54-bb78-6dde094cd0e6"],"properties":{"x":171,"name":"out","y":145,"label":"out","alignment":"right"}}],"properties":{"eventSourceId":"5eff0e2eb10162499bc9f932","activityId":"event","eventSpecificationId":"5f354a336fb8c44e97ccb30e","eventSourceName":"WebexContactCenter","displayName":"PhoneContactEnded","iconDiagram":"icon-handset-muted_16","eventSpecificationName":"ContactEnded","name":"ContactEnded","eventClassificationId":"5f10475cf021306e89e1692c","event":"PhoneContactEnded","_renderRequestTimestamp":1685723095498,"eventClassificationName":"VoiceInteractions"}},"5494af1b-33a1-4162-94ef-cb5155ba843c":{"id":"375ccbb2-4b81-42ea-b503-1a6a9c898ed0","type":"end","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":378,"y":182},"ports":[{"portId":"e961845d-b1b9-4c25-a61a-87a3a639a112","isSourcePort":true,"linkId":"b5452096-d6ff-4c54-bb78-6dde094cd0e6","type":"arrow","links":["b5452096-d6ff-4c54-bb78-6dde094cd0e6"],"properties":{"x":370,"name":"in","y":200,"label":"in","alignment":"left"}}],"properties":{"name":"EndFlow2","activityName":"end","activityId":"end","_renderRequestTimestamp":1685723095498}},"83311050-aa2e-41a1-9b27-b4c2ee766cd1":{"id":"b5452096-d6ff-4c54-bb78-6dde094cd0e6","type":"arrow","widgetType":"link","label":"","properties":{"curvyness":50,"selected":false,"color":"#545454","points":[{"id":"cc377b66-5f7a-4c98-8adf-3a32ee045ec2","type":"point","x":179.5,"y":153.5},{"id":"1cb0d214-457d-494a-a3c3-8afd3d7c72fe","type":"point","x":200,"y":153.5},{"id":"7b14c18c-4ac8-48b9-b4dc-790fd3f0f46a","type":"point","x":200,"y":208.5},{"id":"97ed7929-40ca-4566-9cfb-eb77a2ee89e2","type":"point","x":378.5,"y":208.5}],"width":1,"selectedColor":"#007aa3"},"points":[],"sourcePort":{"id":"7eed830e-c791-43c9-b83b-aeffb8d18476","activeWidgetId":"05c109f6-c053-4bff-bd31-039b14fbbe23","point":{"x":179,"y":153}},"targetPort":{"id":"e961845d-b1b9-4c25-a61a-87a3a639a112","activeWidgetId":"375ccbb2-4b81-42ea-b503-1a6a9c898ed0","point":{"x":378,"y":208}}},"e12a42ed-7d5d-4967-850d-4f921f7ca328":{"id":"86f36dc4-8eae-4a66-9911-b993f38fc1c5","type":"event","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":8,"y":240},"ports":[{"portId":"8db25d59-ee50-4ccc-aea3-aaafd47f5290","isSourcePort":false,"linkId":"704f29cd-3f65-4e0d-ac01-8771a8e04f04","type":"arrow","links":["704f29cd-3f65-4e0d-ac01-8771a8e04f04"],"properties":{"x":175,"name":"out","y":258,"label":"out","alignment":"right"}}],"properties":{"eventSourceId":"5eff0e2eb10162499bc9f932","activityId":"event","eventSpecificationId":"5ffeafa86a7eff72a481c4b5","eventSourceName":"WebexContactCenter","displayName":"AgentDisconnected","iconDiagram":"icon-headset-muted_16","eventSpecificationName":"FCAsk(ContactLastAgentRemoved)","name":"FCAsk(ContactLastAgentRemoved)","eventClassificationId":"5f10475cf021306e89e1692c","event":"AgentDisconnected","_renderRequestTimestamp":1685723095498,"eventClassificationName":"VoiceInteractions"}},"b67f4416-470a-4c55-ae30-8da8517d339f":{"id":"693cf043-c7db-4e5d-98dc-b56805fc50be","type":"end","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":371,"y":318},"ports":[{"portId":"d25ab31d-b42b-4ae3-8d31-85f2747b776d","isSourcePort":true,"linkId":"704f29cd-3f65-4e0d-ac01-8771a8e04f04","type":"arrow","links":["704f29cd-3f65-4e0d-ac01-8771a8e04f04"],"properties":{"x":363,"name":"in","y":336,"label":"in","alignment":"left"}}],"properties":{"name":"EndFlow3","activityName":"end","activityId":"end","_renderRequestTimestamp":1685723095498}},"67b9ccfd-b7b3-4b85-bb77-23bd31c771d3":{"id":"704f29cd-3f65-4e0d-ac01-8771a8e04f04","type":"arrow","widgetType":"link","label":"","properties":{"curvyness":50,"selected":false,"color":"#545454","points":[{"id":"d8a0e02c-17bb-40b1-9e96-94e0a8b0415e","type":"point","x":183.5,"y":266.5},{"id":"5c1c4d9c-eb1c-4c1b-b5f2-b52d197324aa","type":"point","x":215,"y":266.5},{"id":"4cb05685-b301-446a-b5f6-779213d02cf1","type":"point","x":215,"y":344.5},{"id":"2c909cc5-007e-4c60-9aa6-22c9f9b10bf9","type":"point","x":371.5,"y":344.5}],"width":1,"selectedColor":"#007aa3"},"points":[],"sourcePort":{"id":"8db25d59-ee50-4ccc-aea3-aaafd47f5290","activeWidgetId":"86f36dc4-8eae-4a66-9911-b993f38fc1c5","point":{"x":183,"y":266}},"targetPort":{"id":"d25ab31d-b42b-4ae3-8d31-85f2747b776d","activeWidgetId":"693cf043-c7db-4e5d-98dc-b56805fc50be","point":{"x":371,"y":344}}},"5d7f8a27-6e96-45cd-8260-e54316e628c0":{"id":"41a35d97-7b05-4455-b49f-9dd7437e5c60","type":"event","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":12,"y":363},"ports":[{"portId":"bcd608b3-cc0c-4e7a-b0f1-9afb0eafabe4","isSourcePort":false,"linkId":"c5d90e16-86d3-4c4c-a3b9-230c00c1e7ec","type":"arrow","links":["c5d90e16-86d3-4c4c-a3b9-230c00c1e7ec"],"properties":{"x":179,"name":"out","y":381,"label":"out","alignment":"right"}}],"properties":{"eventSourceId":"5eff0e2eb10162499bc9f932","activityId":"event","eventSpecificationId":"627c0663e98eca854178bba6","eventSourceName":"WebexContactCenter","displayName":"OnGlobalError","iconDiagram":"icon-error-legacy_16","eventSpecificationName":"GlobalErrorHandling","name":"GlobalErrorHandling","eventClassificationId":"5f10475cf021306e89e1692c","event":"OnGlobalError","_renderRequestTimestamp":1685723095498,"eventClassificationName":"VoiceInteractions"}},"d3e54703-32d6-4a08-8afe-dddfc5adae99":{"id":"d179c0ec-7793-4b6b-9e98-cf9fea3b0f79","type":"end","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":363,"y":399},"ports":[{"portId":"18e0d561-10a8-48aa-bf85-29492cc7b2ab","isSourcePort":true,"linkId":"c5d90e16-86d3-4c4c-a3b9-230c00c1e7ec","type":"arrow","links":["c5d90e16-86d3-4c4c-a3b9-230c00c1e7ec"],"properties":{"x":355,"name":"in","y":417,"label":"in","alignment":"left"}}],"properties":{"name":"EndFlow_0mu","activityName":"end","activityId":"end","_renderRequestTimestamp":1685723095498}},"553ccc42-c777-4179-ad63-ea2beea54f3f":{"id":"c5d90e16-86d3-4c4c-a3b9-230c00c1e7ec","type":"arrow","widgetType":"link","label":"","properties":{"curvyness":50,"selected":false,"color":"#545454","points":[{"id":"d080205f-37a3-49a9-bcb1-ca5d18ffac6c","type":"point","x":187.5,"y":389.5},{"id":"5165d1f1-2d43-4826-85ca-3339977650ae","type":"point","x":210,"y":389.5},{"id":"e5915efd-b4d8-4e3b-9149-72b0a963a910","type":"point","x":210,"y":425.5},{"id":"ef34bb0b-9a90-449e-919b-7380f0fed259","type":"point","x":363.5,"y":425.5}],"width":1,"selectedColor":"#007aa3"},"points":[],"sourcePort":{"id":"bcd608b3-cc0c-4e7a-b0f1-9afb0eafabe4","activeWidgetId":"41a35d97-7b05-4455-b49f-9dd7437e5c60","point":{"x":187,"y":389}},"targetPort":{"id":"18e0d561-10a8-48aa-bf85-29492cc7b2ab","activeWidgetId":"d179c0ec-7793-4b6b-9e98-cf9fea3b0f79","point":{"x":363,"y":425}}},"0fba4f53-98fe-4e5c-b935-e20a66ec4a6e":{"id":"723af118-e58a-4ad3-bc71-b2b5e6bf14e0","type":"event","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":10,"y":498},"ports":[{"portId":"6715e487-423a-4639-b832-4c29617db7f7","isSourcePort":false,"linkId":"dae9b99e-85ba-4ca1-8be7-5f8cad50d587","type":"arrow","links":["dae9b99e-85ba-4ca1-8be7-5f8cad50d587"],"properties":{"x":177,"name":"out","y":516,"label":"out","alignment":"right"}}],"properties":{"eventSourceId":"5eff0e2eb10162499bc9f932","activityId":"event","eventSpecificationId":"637da544c02b556cf406d192","eventSourceName":"WebexContactCenter","displayName":"AgentOffered","iconDiagram":"icon-audio-call_16","eventSpecificationName":"AgentOfferContact","name":"AgentOfferContact","eventClassificationId":"5f10475cf021306e89e1692c","event":"AgentOffered","_renderRequestTimestamp":1685723095498,"eventClassificationName":"VoiceInteractions"}},"691fe448-bf1e-4230-ba1d-10d8b49352e0":{"id":"19d9e877-874c-430b-b121-17e2810c0ead","type":"end","widgetType":"activity","label":"New Activity Widget in Diagram","point":{"x":331,"y":499},"ports":[{"portId":"d0275b29-6825-4104-8300-29a68e65e8d8","isSourcePort":true,"linkId":"dae9b99e-85ba-4ca1-8be7-5f8cad50d587","type":"arrow","links":["dae9b99e-85ba-4ca1-8be7-5f8cad50d587"],"properties":{"x":323,"name":"in","y":517,"label":"in","alignment":"left"}}],"properties":{"name":"EndFlow_zlx","activityName":"end","activityId":"end","_renderRequestTimestamp":1685723095498}},"2761b97f-c360-4520-bac1-be93d11dd563":{"id":"dae9b99e-85ba-4ca1-8be7-5f8cad50d587","type":"arrow","widgetType":"link","label":"","properties":{"curvyness":50,"selected":false,"color":"#545454","points":[{"id":"3bb8de16-ec8f-4a79-b36d-5e1c655a9753","type":"point","x":185.5,"y":524.5},{"id":"6b8ab0db-be4a-491d-ac92-19420f916e86","type":"point","x":205,"y":524.5},{"id":"21ad80d6-a859-41e1-8b40-4fa413946340","type":"point","x":205,"y":479},{"id":"5c5cd6f5-b1a7-4091-8d8f-82b546e7b6f0","type":"point","x":311.5,"y":479},{"id":"4be66504-51d0-4835-a719-a1515f888c45","type":"point","x":311.5,"y":525.5},{"id":"594822cc-2a36-4563-9293-07fb01fcea87","type":"point","x":331.5,"y":525.5}],"width":1,"selectedColor":"#007aa3"},"points":[],"sourcePort":{"id":"6715e487-423a-4639-b832-4c29617db7f7","activeWidgetId":"723af118-e58a-4ad3-bc71-b2b5e6bf14e0","point":{"x":185,"y":524}},"targetPort":{"id":"d0275b29-6825-4104-8300-29a68e65e8d8","activeWidgetId":"19d9e877-874c-430b-b121-17e2810c0ead","point":{"x":331,"y":525}}}},"properties":{}}}},"properties":{"offsetX":1,"offsetY":1,"zoom":100,"gridSize":0}},"runtimeVariables":[],"validating":true,"persist":true,"validationResults":[],"createdBy":"arubhatt_partnerdemo@email.carehybrid.com","createdDate":"2023-06-02T16:24:57.106","lastModifiedDate":"2023-06-02T16:24:57.106","lastModifiedBy":"arubhatt_partnerdemo@email.carehybrid.com","variableOrders":{"pop-over":[{"name":"ani","variableSeq":"0"},{"name":"dn","variableSeq":"1"},{"name":"virtualTeamName","variableSeq":"2"}],"interaction-panel":[]}} \ No newline at end of file diff --git a/playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-es-sample/inline-editor.js b/playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-es-sample/inline-editor.js new file mode 100644 index 0000000..787c80f --- /dev/null +++ b/playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-es-sample/inline-editor.js @@ -0,0 +1,180 @@ +/** + * Dialogflow ES Fulfillment Webhook — Webex Contact Center Integration + * ===================================================================== + * Dialogflow generation: ES (Essentials / legacy — use CX for new projects) + * Deploy target: Dialogflow ES Inline Editor → Firebase Cloud Functions + * WxCC integration: Virtual Agent Voice node → Dialogflow ES agent → this webhook + * + * WHAT THIS DOES: + * Handles Dialogflow ES fulfillment requests triggered by matched intents. + * On "Default Welcome Intent": reads caller context passed from Webex Contact Center + * via originalDetectIntentRequest.payload, performs a CRM lookup using the caller's + * PIN, sets output context, and returns a personalized spoken greeting. + * On "Confirm Details": reads context set in the welcome turn and chains to an + * escalation event. + * + * WHAT THIS DOES NOT DO: + * - Validate incoming webhook request signatures (add in production) + * - Handle authentication with Webex Contact Center (handled by WxCC + Firebase IAM) + * - Implement retry logic, circuit breaking, or persistent logging + * - Support multiple users / multi-tenant deployments + * + * ENVIRONMENT VARIABLES (set via Firebase CLI or Cloud Function runtime config): + * MOCK_API_URL_ES — Base URL of the CRM lookup API. The function appends + * ?pin= to this URL and expects a JSON array + * response with account and phone fields. + * Example: https://your-crm.example.com/api/customers + * + * WEBEX CONTACT CENTER CALLER CONTEXT (via originalDetectIntentRequest.payload): + * name — Caller's name passed from WxCC flow + * email — Caller's email passed from WxCC flow + * reason — Call reason passed from WxCC flow + * pin — Caller's PIN used for CRM lookup + * + * HOW TO DEPLOY (Inline Editor): + * 1. In Dialogflow ES console, go to Fulfillment → Inline Editor. + * 2. Replace index.js with the contents of this file. + * 3. Replace package.json with src/dialogflow-es-sample/package.json. + * 4. Set MOCK_API_URL_ES as a Firebase environment variable: + * firebase functions:config:set crm.api_url="https://..." + * Then update the fetchCRMInfo call to use functions.config().crm.api_url. + * 5. Click Deploy. + * + * ADAPTED FROM: + * https://github.com/WebexSamples/webex-contact-center-api-samples/tree/main/dialogflow-sample/dialogflow-es-sample + */ + +// See https://github.com/dialogflow/dialogflow-fulfillment-nodejs +// for Dialogflow fulfillment library docs, samples, and to report issues +'use strict'; + +const functions = require('firebase-functions'); +const { WebhookClient } = require('dialogflow-fulfillment'); +const fetch = require('node-fetch'); + +process.env.DEBUG = 'dialogflow:debug'; // enables lib debugging statements + +exports.dialogflowFirebaseFulfillment = functions.https.onRequest( + (request, response) => { + const agent = new WebhookClient({ request, response }); + console.log( + 'Dialogflow Request headers: ' + JSON.stringify(request.headers) + ); + console.log('Dialogflow Request body: ' + JSON.stringify(request.body)); + + /** + * Fetch CRM data for a given caller PIN. + * Replace MOCK_API_URL_ES with a real CRM endpoint in production. + * + * @param {string} pin Caller's PIN extracted from WxCC payload + * @returns {{ account: string, phone: string }} + */ + const fetchCRMInfo = async (pin) => { + const crmBaseUrl = process.env.MOCK_API_URL_ES; + + if (!crmBaseUrl) { + throw new Error('MOCK_API_URL_ES environment variable is not set.'); + } + + const crmResponse = await fetch(`${crmBaseUrl}?pin=${pin}`); + const data = await crmResponse.json(); + const account = data[0].account; + const phone = data[0].phone; + return { account, phone }; + }; + + /** + * Handler for "Default Welcome Intent". + * Reads caller context from Webex Contact Center via + * originalDetectIntentRequest.payload, performs CRM lookup, and + * returns a personalized spoken greeting. + */ + const welcome = async (agent) => { + // Read caller context injected by Webex Contact Center + const webexCCData = + request.body.originalDetectIntentRequest.payload || {}; + + const customerName = webexCCData.name || 'Valued Customer'; + const customerEmail = webexCCData.email || 'your email'; + const customerReason = webexCCData.reason || 'your inquiry'; + const customerPin = webexCCData.pin || '00000'; + + // CRM lookup using caller's PIN + const crmInfo = await fetchCRMInfo(customerPin); + + // Set output context for the next turn (Confirm Details intent) + agent.context.set({ + name: 'confirm-details', + lifespan: 5, + parameters: { + account: crmInfo.account, + phone: crmInfo.phone, + 'account.original': crmInfo.account, + 'phone.original': crmInfo.phone, + }, + }); + + agent.add( + ` Hello ${customerName}, ` + + `we see you sent us an email from ${customerEmail} ` + + `and are probably calling regarding ${customerReason}, Right? ` + + `Please confirm your account number is ${crmInfo.account} ` + ); + }; + + /** + * Handler for "Confirm Details" intent. + * Reads account/phone from context set in the welcome turn and + * chains to the escalation event. + */ + const confirmDetails = (agent) => { + const contexts = request.body.queryResult.outputContexts; + + const myContext = contexts.filter((item) => { + return item.parameters && item.parameters.account && item.parameters.phone; + }); + + if (!myContext.length) { + agent.add("I'm sorry, I couldn't retrieve your account details. Please try again."); + return; + } + + agent.context.set({ + name: 'escalated', + lifespan: 5, + parameters: { + account: myContext[0].parameters.account, + 'account.original': myContext[0].parameters.account, + phone: myContext[0].parameters.phone, + 'phone.original': myContext[0].parameters.phone, + }, + }); + + agent.add('Confirming Details..'); + + agent.setFollowupEvent({ + name: 'escalated', + parameters: { + account: myContext[0].parameters.account, + phone: myContext[0].parameters.phone, + }, + }); + }; + + /** + * Default fallback handler. + */ + const fallback = (agent) => { + agent.add(`I didn't understand`); + agent.add(`I'm sorry, can you try again?`); + }; + + // Map Dialogflow intent display names to handler functions + const intentMap = new Map(); + intentMap.set('Default Welcome Intent', welcome); + intentMap.set('Default Fallback Intent', fallback); + intentMap.set('Confirm Details', confirmDetails); + + agent.handleRequest(intentMap); + } +); diff --git a/playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-es-sample/package.json b/playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-es-sample/package.json new file mode 100644 index 0000000..f47ca07 --- /dev/null +++ b/playbooks/wxcc-dialogflow-fulfillment/src/dialogflow-es-sample/package.json @@ -0,0 +1,21 @@ +{ + "name": "dialogflowFirebaseFulfillment", + "description": "Dialogflow ES fulfillment for Webex Contact Center integration — deploys via Firebase Cloud Functions Inline Editor", + "version": "0.0.1", + "private": true, + "license": "Apache-2.0", + "author": "Google Inc.", + "engines": { + "node": "18" + }, + "scripts": { + "start": "firebase serve --only functions:dialogflowFirebaseFulfillment", + "deploy": "firebase deploy --only functions:dialogflowFirebaseFulfillment" + }, + "dependencies": { + "firebase-admin": "^11.0.0", + "firebase-functions": "^4.0.0", + "dialogflow-fulfillment": "^0.6.1", + "node-fetch": "^2.6.0" + } +} diff --git a/playbooks/wxcc-dialogflow-fulfillment/src/env.template b/playbooks/wxcc-dialogflow-fulfillment/src/env.template new file mode 100644 index 0000000..b2b49c3 --- /dev/null +++ b/playbooks/wxcc-dialogflow-fulfillment/src/env.template @@ -0,0 +1,38 @@ +# env.template — Environment variables for the Dialogflow Fulfillment samples +# Copy this file to .env and fill in your values before deploying. +# NEVER commit a .env file with real secrets to version control. +# +# Deployment notes: +# CX sample — Set these as Cloud Function runtime environment variables +# via the Google Cloud console or: gcloud functions deploy ... --set-env-vars +# ES sample — Set these as Firebase environment config: +# firebase functions:config:set crm.api_url="https://..." +# Then read in code as functions.config().crm.api_url +# OR set as Cloud Function env vars if using 2nd-gen Firebase functions. + +# ============================================================================= +# --- Dialogflow CX sample (src/dialogflow-cx-sample/inline-editor.js) --- +# ============================================================================= + +# Full URL of the account balance API endpoint. +# The function calls this URL as-is with an HTTPS GET request. +# The API must return a JSON object containing a "balance" key. +# +# Example (real endpoint): https://api.yourbank.example.com/v1/balance?customer=Caller +# Example (mock for demo): https://.mock.pstmn.io/ +# +MOCK_API_URL_CX=https://your-balance-api.example.com/balance + +# ============================================================================= +# --- Dialogflow ES sample (src/dialogflow-es-sample/inline-editor.js) --- +# ============================================================================= + +# Base URL of the CRM lookup API. +# The function appends ?pin= to this URL and performs a GET request. +# The API must return a JSON array where the first element contains +# "account" and "phone" string fields. +# +# Example (real endpoint): https://api.yourcrm.example.com/v1/customers +# Example (mock for demo): https://.mockapi.io/crm/api/customers +# +MOCK_API_URL_ES=https://your-crm-api.example.com/api/customers