@@ -41,7 +41,8 @@ For an end-to-end sandbox call, you also need:
4141- A Webex Contact Center sandbox or organization with BYOVA enabled
4242- Contact Center administrator access
4343- A Webex Service App authorized by the sandbox organization
44- - A BYODS data-source registration using the BYOVA schema
44+ - Service App credentials with ` spark-admin:datasource_read ` and
45+ ` spark-admin:datasource_write ` when using automatic datasource registration
4546- A publicly reachable HTTPS endpoint that supports HTTP/2 gRPC and routes to
4647 gateway port ` 50051 `
4748- A test entry point and a published flow containing a Virtual Agent V2 activity
@@ -207,21 +208,70 @@ The `datasource_url` must exactly match the URL used in the BYODS registration,
207208including scheme, hostname, path, and any explicitly supplied port. Restart the
208209gateway after changing it.
209210
210- # ## 3. Register the BYOVA data source
211+ # ## 3. Enable automatic BYOVA data- source registration
211212
212213Follow the Webex
213214[Bring Your Own Virtual Agent](https://developer.webex.com/webex-contact-center/docs/bring-your-own-virtual-agent)
214215and
215216[Bring Your Own Data Source](https://developer.webex.com/webex-contact-center/docs/bring-your-own-data-source-cc)
216- guides to :
217+ guides to confirm BYOVA is enabled, create a Service App with the required
218+ data-source scopes and allowed gateway domain, and have a sandbox administrator
219+ authorize it.
217220
218- 1. Confirm BYOVA is enabled for the sandbox organization.
219- 2. Create a Service App with the required data-source scopes and add the gateway
220- hostname as an allowed domain.
221- 3. Have a sandbox administrator authorize the Service App.
222- 4. Register a data source with the BYOVA schema UUID
223- ` 5397013b-7920-4ffc-807c-e8a3e0a18f43` and the exact URL configured above.
224- 5. Save the returned data-source ID.
221+ Provide the authorized OAuth credentials through environment variables :
222+
223+ ` ` ` bash
224+ export WEBEX_BYODS_CLIENT_ID="your-client-id"
225+ export WEBEX_BYODS_CLIENT_SECRET="your-client-secret"
226+ export WEBEX_BYODS_REFRESH_TOKEN="your-refresh-token"
227+ ` ` `
228+
229+ Do not commit these values. Use your deployment platform's secret manager for
230+ shared or long-running environments.
231+
232+ Enable lifecycle management in `config/config.yaml` :
233+
234+ ` ` ` yaml
235+ data_source:
236+ enabled: true
237+ fail_startup_on_error: true
238+ id: ""
239+ id_env: "WEBEX_BYODS_DATA_SOURCE_ID"
240+ # Empty values inherit jwt_validation.datasource_url and schema.
241+ url: ""
242+ schema_id: ""
243+ audience: "BYOVAGateway"
244+ subject: "callAudioData"
245+ token_lifetime_minutes: 1440
246+ renewal_lead_time_minutes: 60
247+ retry_interval_seconds: 60
248+ auth:
249+ type: "oauth_refresh"
250+ client_id_env: "WEBEX_BYODS_CLIENT_ID"
251+ client_secret_env: "WEBEX_BYODS_CLIENT_SECRET"
252+ refresh_token_env: "WEBEX_BYODS_REFRESH_TOKEN"
253+ ` ` `
254+
255+ Start the gateway after the public endpoint is available. Before accepting gRPC
256+ traffic, it searches for an exact URL, schema, audience, and subject match. It
257+ reuses and reconciles one match or registers a new datasource when no match
258+ exists. The startup summary prints the datasource ID and JWS expiry :
259+
260+ ` ` ` text
261+ BYODS Datasource:
262+ • Management: ENABLED
263+ • ID: <data-source-id>
264+ • Token Expires: <timestamp>
265+ ` ` `
266+
267+ Keep the gateway running. It renews the JWS 60 minutes before expiry by default
268+ and retries a failed renewal every 60 seconds. If more than one existing
269+ datasource matches, set `WEBEX_BYODS_DATA_SOURCE_ID` to the intended ID and
270+ restart.
271+
272+ For a one-time manual registration instead, leave `data_source.enabled` set to
273+ ` false` , register the same URL and BYOVA schema through the Webex API, and save
274+ the returned datasource ID. Automatic renewal is disabled in that mode.
225275
226276No vendor credentials are needed for the local connector.
227277
@@ -231,7 +281,7 @@ In Control Hub:
231281
2322821. Go to **Contact Center > Integrations > Features**.
2332832. Create a virtual-agent feature using the authorized Service App.
234- 3. Use the data-source ID as the resource identifier.
284+ 3. Use the datasource ID printed by gateway startup as the resource identifier.
2352854. Give it a recognizable name such as `BYOVA Local Audio Test`.
236286
237287# ## 5. Configure and publish the flow
@@ -297,6 +347,17 @@ JWT validation is enabled without a URL. For a localhost-only smoke test, set
297347` jwt_validation.enabled` to `false`. For a sandbox call, configure the exact
298348public BYODS URL and leave validation enabled.
299349
350+ # ## Automatic datasource registration fails during startup
351+
352+ - Confirm the three `WEBEX_BYODS_*` environment variables are available to the
353+ gateway process.
354+ - Confirm the authorized Service App has both datasource read and write scopes.
355+ - Confirm the public URL uses a domain allowed by the Service App.
356+ - If the logs report multiple matches, set `WEBEX_BYODS_DATA_SOURCE_ID` to the
357+ intended datasource ID.
358+ - Keep `fail_startup_on_error : true` for end-to-end testing so the gateway does
359+ not accept traffic without a managed datasource.
360+
300361# ## The local agent does not appear in Flow Designer
301362
302363- Confirm `/api/config` lists `Local Audio : Local Playback`.
0 commit comments