Scenario and campaign authoring workflow
Before authoring, connect your agent, verify your organization with betterstood_account_info, and choose Read and write access. Read-only access is enough to inspect and review existing resources.
Ground the brief in product knowledge
Section titled “Ground the brief in product knowledge”When a brief depends on how Betterstood works, call betterstood_knowledge_search before authoring. Search the user’s requested locale and narrow to overview, campaigns, credits, pricing_tiers, or use_cases when useful. Product-reference results can explain concepts and packaging, but they do not grant an entitlement or report the authenticated organization’s live account state; use betterstood_account_info for the latter.
The search corpus is maintained by Betterstood and is distinct from scenario-owned Knowledge Bases. Private Knowledge Base metadata and settings use the separate scenario_knowledge tools and explicit Knowledge Base scopes. Product search never searches tenant documents.
Create a draft
Section titled “Create a draft”scenario_create_draft accepts a semantic scenario definition, not provider configuration or an internal database object. Supply a new idempotency key for each intended creation. Retrying the identical request with the same key returns the original result for 24 hours.
New scenarios default to Adaptive on every plan. A Free workspace can save the draft and use hosted Text Chat within its allowance. Copies and imports that create a new scenario receive the same default. Browser calls with respondents require a plan that includes Voice. Studio also offers Current when you create a scenario, including for ordinary phone campaigns.
definition.assistantName is an optional 256-character identity label. Leave it
out to use the scenario name. For later changes, send
set_metadata.assistantName; send null to clear the override. This does not
make the legal notice editable: Betterstood still supplies the AI identity and the
actual recording/transcription statement.
The operation validates the full bundle and checks the organization scenario quota in one transaction. Validation failure never leaves a partial scenario behind.
Read before updating
Section titled “Read before updating”Always call scenario_get immediately before scenario_update_draft. Include the returned revision as expectedRevision and a fresh idempotency key.
Updates are a closed list of typed operations. They can change scenario metadata and assistant identity, profile, intake, conversation design, fields and ordering, outputs/scoring, analysis style, classifications, and analysis questions. Removals require explicit acknowledgement, except that the explicit assistantName: null value is the defined clear operation for that optional label.
If another editor wins the race, Betterstood returns REVISION_CONFLICT with the current revision. Read again, reconcile intent, and submit a new operation; do not blindly retry stale input.
If a Studio or Campaign editor already holds the temporary exclusive lease, Betterstood returns RESOURCE_LOCKED before producing a write or provider side effect. Do not attempt an early takeover. Wait for the editor to release the resource or for the lease to expire, then read the resource again and explicitly retry with its latest revision and a fresh idempotency key.
Clone and import
Section titled “Clone and import”scenario_clone_draft requires scenario:write, a source scenarioId, its
current expectedRevision, a new name and an idempotency key. It calls the same
tenant-scoped clone service as Studio and the Scenario Copilot. The copy uses an
ordinary scenario slot and starts as a new configuration. Private Knowledge
Base sources, their readiness and published runtime bindings are not copied;
the source stays unchanged. Tenant-local booking and activation settings retain
the canonical clone validation.
scenario_import_draft accepts a closed betterstood.scenario.v1 bundle from
scenario_export plus a new name and idempotency key. It creates a new draft,
never overwrites an existing one. Portable import resets tenant-local operator
mailboxes to the workspace default, removes automation destination references,
and clears Knowledge Base and booking bindings, as Studio import does. Inspect
the returned configuration before proceeding. Provider fields, raw prompts and
administrative settings are outside this public format.
Both operations cost 0 credits, require available scenario capacity and return a 24-hour idempotency receipt. Reuse a key only with identical arguments.
Policy and activation rules
Section titled “Policy and activation rules”Existing scenario_update_draft accepts set_policy and set_rules alongside
the existing output, scoring, analysis and field operations. Policy sets Voice
and Text Chat availability, follow-up limits, an active disclaimer and its
delivery, and bounded extraction guidance. Reads report the stored disclaimer
state; public policy writes require disclaimer.enabled: true and nonempty text.
An export with a disabled disclaimer needs an explicit corrected policy before
public import. The domain rejects disabling the
last conversation channel or a channel required by a non-archived campaign.
Rules use existing score/classification conditions and configured respondent
email, operator email, operator Slack or verified automation webhook actions.
The same recipient and destination validators apply as in Studio. set_rules
replaces the rule list; removing rule IDs requires confirmRemovals as a
configuration acknowledgement. That flag never approves execution or sending.
Read the result and review the complete draft after changing rules. No email,
webhook, model call or publication occurs while saving configuration.
Active campaign edit lock
Section titled “Active campaign edit lock”Public MCP treats a scenario as editable only while it has no linked ACTIVE campaign. Activation and MCP update share the same database lock, so a last-millisecond activation cannot race an update.
When locked, read, review, export and clone remain available. Use the approved unpublish flow below for every active campaign using the scenario, or clone it and configure a draft campaign to use the copy.
Review before handoff
Section titled “Review before handoff”scenario_review_draft returns validation findings, warnings, readiness, and a safe prompt preview. Resolve errors before handing the Studio URL to a human operator.
The optional conversationLength assessment reports ok, near_limit or too_long with practical shortening suggestions. near_limit is an advisory: reduce repeated guidance and lengthy examples when useful. too_long keeps the draft saved but blocks Voice preparation, publication and Live tests until the Scenario is shortened or split. Use support code BS-SCENARIO-001 when asking for help. Explain the length issue plainly, preserve the active disclaimer and customer work, and propose edits for the customer to review before applying them. A successful draft save does not establish Voice readiness.
scenario_export returns betterstood.scenario.v1. It excludes secrets and provider state and is not a round-trip import promise.
Create and configure a campaign draft
Section titled “Create and configure a campaign draft”Call campaign_create_draft with a scenario id, name, channel, and unique idempotency key. Creation uses the organization’s ordinary non-archived campaign quota. Text Chat accepts a governed budget; Phone Call and Web Call do not.
Read with campaign_get, then send its revision as expectedRevision to campaign_update_draft. Updates accept a closed set of operations: set_scenario, set_channel, set_intake, and set_theme. Each type can appear at most once. Betterstood applies the complete request atomically in that canonical order and preserves advanced settings the public contract does not own.
To rename a DRAFT campaign, send the optional name field with the campaign key,
current revision and a new idempotency key. Omit operations for a name-only
change, or include operations to commit the rename and configuration together
with one revision increment. The name is trimmed, must contain non-whitespace
text and is limited to 256 characters after trimming. A blank name returns
VALIDATION_FAILED on /name. Renaming preserves the campaign key, public links
and embeds. Requests must contain a name or at least one operation; omit an
unused operations array rather than sending an empty one.
{ "campaignKey": "solar-consultation-web", "expectedRevision": 3, "idempotencyKey": "rename-solar-spring-20261117", "name": "Solar consultation - spring"}Name changes use the same campaign:write scope, draft-only lifecycle check,
editor lease, revision conflict and 24-hour idempotency guards as other campaign
updates. They are included on every plan, add no quota and cost 0 credits.
set_intake.intake.marketingConsentEnabled controls the default optional marketing
checkbox for new respondents. It defaults to enabled for existing Campaigns;
omitting it preserves the current setting, including a saved disabled value.
campaign_get returns the resolved boolean. This does not remove the required
interaction notice, custom Campaign consent scopes, or historical consent receipts.
Theme input is deliberately constrained to an HTTPS logo (or null), brand name, preset font/radius, and known color tokens. Public MCP cannot inject arbitrary CSS.
Direct campaign configuration writes require DRAFT status. Scenario or channel routing changes are also blocked while non-test interactions are open. A stale revision returns REVISION_CONFLICT; editor contention returns RESOURCE_LOCKED; a campaign blocked by its lifecycle or interactions returns CAMPAIGN_LOCKED. Call campaign_review_draft for deterministic, provider-free findings, prepare the scenario channel, then use the separately approved campaign publication/access operations. Use editorUrl for settings not exposed through MCP.
If publication readiness reports PUBLISH_CONVERSATION_TOO_LONG, shorten or split the linked Scenario first. Its optional supportCode is BS-SCENARIO-001; the Campaign draft remains saved.
Edit and republish an active campaign
Section titled “Edit and republish an active campaign”- Read
campaign_getandscenario_getto capture current revisions. - Call
campaign_prepare_unpublishwith the separatecampaign:unpublishpermission. SendapprovalUrlto the user and wait forbetterstood_operation_waitto reportsucceeded, keeping the turn active. - Apply the requested questions/configuration through
scenario_update_draft. - Read the new revision and call
scenario_prepare_channelfor the campaign’s enabled channel. Regeneration can replace manual channel text only with explicitdiscardManualOverride: true. - Resolve
scenario_review_draftandcampaign_review_draftfindings. Readcampaign_getagain, because unpublication advances the campaign revision. Callcampaign_prepare_publishwith that newrevisionasexpectedRevision. Obtain its separate approval and wait for success.
Unpublishing stops new collection, keeps access settings and retains results. Scheduled callback cancellation must be explicit and is included in the preview; it is not undone when republishing. A scenario shared with another ACTIVE campaign remains locked until that campaign is also unpublished, or the agent uses a clone. See operation approvals for deadlines and job recovery.
What the agent can never do
Section titled “What the agent can never do”- Approve its own operation, or publish/unpublish without the human-approved job. Archive and deletion remain unavailable.
- Read or configure passwords, invitation secrets, or caller numbers. Public-access changes use separate approval.
- Place a live call, run a transcript test, or spend conversation credits.
- Configure provider credentials, voice infrastructure, scenario Knowledge Base storage, or internal policy.
- Read full respondent transcripts, recordings, or raw model output. Evidence tools return only bounded, redacted excerpts.
- Remove the active scenario disclaimer or bypass Betterstood guardrails.
Draft persistence and preparation
Section titled “Draft persistence and preparation”Draft authoring uses the same Scenario domain service as Betterstood Studio and
Copilot. Saving prompt-relevant configuration invalidates the prepared channel
prompt and advances its revision. A draft save does not publish a campaign or
make it publicly accessible. Read the new revision, call scenario_prepare_channel
with channel: "voice" or "text_chat", and review before preparing publication.
This uses the canonical deterministic compiler, costs 0 credits, and does not call
a model. It cannot enable a disabled channel or modify a scenario used by an
active campaign. Manual channel text is preserved unless the request explicitly
sets discardManualOverride: true to replace it.
The public definition is an allowlisted semantic view. A displayed opening question can be inferred from the first field; importing it as an explicit conversation instruction is an intentional configuration change. Private source preparation and Knowledge Base effects have separate permissions/jobs; raw prompts and internal provider settings remain private.
Private scenario Knowledge Base
Section titled “Private scenario Knowledge Base”Request knowledge:read to inspect scenario_knowledge_get, and additionally
knowledge:write to use scenario_knowledge_update. These are separate choices in authenticated Betterstood consent, selected by the
Read and write preset when requested. Existing four-scope
connections do not gain them through refresh or a changed consent form.
Read the scenario revision, then save enabled, maxResults (1–10), or
usageInstructions (nullable, at most 1,000 characters). The canonical service
normalizes newlines and outer whitespace; it rejects template expressions and
control characters. Use a unique idempotency key for one exact revision/settings
request. Replays last 24 hours and recheck the current grant, role and entitlement.
A stale revision returns REVISION_CONFLICT; reload before preparing another edit.
The returned metadata contains at most 50 sources. Source IDs identify entries
in this scenario snapshot; source contents, storage coordinates and raw provider
errors are excluded. URL labels omit credentials, query strings and fragments.
publicationStatus is the persisted snapshot and lastValidatedAt its validation
time: saved publicationStatus is a snapshot; readiness is computed from canonical revision/projection state without provider I/O. Enabling a setting does not
publish a source or make an unpublished revision ready.
These reads and settings cost 0 credits. They require owner/admin plus both
Developer Access and the existing Knowledge Base entitlement on PAYG, Growth or
Scale. Source preparation is available through its own knowledge:prepare job; embedding, publication and validation use separate approved operations; no source execution is hidden in a settings save.
{ "scenarioId": "scenario_01", "expectedRevision": 1, "idempotencyKey": "kb-policy-20261109", "settings": { "maxResults": 5, "usageInstructions": "Use only the approved product facts. Preserve source attribution." }}Public KB settings writes are limited to scenarios without ACTIVE campaigns.
SCENARIO_LOCKED requires approved unpublication of the active campaigns or a
cloned scenario before changing retrieval configuration. Reads remain available.
Request publication or public access
Section titled “Request publication or public access”After review, use the separately scoped approval and job workflow for campaign_prepare_publish or campaign_prepare_access_change. Each prepares an exact change for the user to approve in Betterstood. Show its approval URL in a progress message and call betterstood_operation_wait without ending the turn to ask the user to say “done”. Repeat while nextAction is wait; inspect the terminal result before preparing any dependent change against the new revision.
For private source preparation, request knowledge:read knowledge:prepare, read
the current scenario revision and call scenario_knowledge_stage_source. Observe
the returned job before further edits; use its committed revision. See
operation jobs for file/URL limits and retry rules.
An uploaded draft is not a published, ready Knowledge Base.
Learn from retained results
Section titled “Learn from retained results”After execution, use the results and evidence readers for current states, structured outputs, exact aggregates and bounded citations. Saving a revised configuration does not publish it or start a new paid execution.
Once private sources are ready, use the approved Knowledge Base operations
for publication, removal or retrieval validation. Present the revision, effects,
maximum credits and shadow/enforce mode before sending the approval URL. Use betterstood_operation_wait for the same durable job after a timeout; do not start another paid effect.