confirm_change runs,
after the person saw the preview and said yes.
Emails to hotels go out only on confirm.
send_rfp, negotiate,
decide_proposal, request_contract and draft_venue_email each email one or
more venues, and no venue hears anything until the change is confirmed.
Confirm a prepared change
1
Prepare the change
Call the tool that prepares it, for example
update_event. The result has two
parts: a preview in plain words, then a handoff like this:2
Show the person the preview
Show the preview word for word, then ask whether to go ahead.
3
Wait for a yes
If the person says no, or does not answer, do nothing. The prepared change
expires on its own.
4
Call confirm_change
Pass the
approval_token, the change copied exactly, and
user_approved: true. Never set user_approved unless the person said yes
in this conversation.5
Report the status
Tell the person what the result’s
status and message say. See
Statuses for what each status means.confirm_change
Applies a change that one of the prepare tools returned.
Returns
draft_id, status, a message and the rows it changed. Every
status except applied flags the result as an error, so a client that reads
only the error flag never takes a partial or failed change for success.
The approval follows these rules:
- A token works only for the person who prepared it, and only in the organization that was selected then.
- A token expires after 10 minutes. Prepare the change again to get a new one.
- A
changethat differs from the prepared one is refused, and nothing runs. - If the event changed after an
update_eventpreview, the confirm applies nothing and says so. Callget_eventand prepare the change again. - The confirm checks again that you can still reach the change’s event in the organization you have selected. If your access was revoked, or you switched organization, nothing runs.
Statuses
Confirming twice
A change runs at most once. Confirming the sameapproval_token again never
runs it a second time. It reports the first outcome instead, for example “This
change was already applied. It was not run again.” That makes it safe to
confirm again after a dropped connection.
If the confirm itself cannot reach the record of the change, the error says so.
Call confirm_change again with the same approval_token and change before
you prepare anything new.
Event changes
create_event and update_event follow extra rules, covered here.
If an update_event change would alter nothing, the tool says so and prepares
nothing.
Creating
The confirm result names the new event’sid in its message and rows.
The organization comes from your session, so it is never an argument. The
preview names it, so the person can check where the event will land.
Updating
update_event takes only the fields you are changing, under changes. Three
rules apply to every update:
Omitted means unchanged, null means cleared
Omitted means unchanged, null means cleared
A field you leave out is not touched. Sending
null clears it. You cannot
blank a field by leaving it out, and you cannot clear one by guessing at an
empty value.All or nothing
All or nothing
If any field is rejected, nothing is written and the error lists every
problem at once. A rejected update always leaves the event untouched, so
it is safe to correct and retry without checking what partially landed.
Some fields are derived, not writable
Some fields are derived, not writable
location is derived from formattedLocations. Event dates are derived
from the union of your guestroom nights and agenda date ranges. Neither is
accepted as input. Send the inputs and the derived values follow.Editing the agenda
The agenda is edited by operation, not by replacement. SendagendaOperations with add, update or remove, each addressed by a session
id from a prior get_event:
sessionId is an error, not a silent no-op.
Two refusals worth planning for
A canceled event cannot be edited. Reopen it in Nowadays first. Shrinking the agenda dates is refused if any session would lose a date. The affected sessions are named inorphanedSessions:
Limits
A single call is bounded so one request cannot monopolize the service:
A value over a limit is rejected with the field named, and nothing is written.