KIVEX

Actions and confirmation

How KIVEX makes changes on a site, and why a person always confirms them.

Availability

inquiry.create is the first available action. Other actions, such as refunds and bookings, will follow the same rules.

An action is a capability that changes something, such as sending an inquiry, booking a slot or refunding an order. Actions never run in a single step. A person always confirms them first.

Lifecycle

requested → authorized → previewed → awaiting_confirmation → executing → completed

An action can also end as rejected (you aren't allowed to run it), stale (the data changed before it ran), expired (nobody confirmed it in time) or failed.

Your agent requests the action

Your agent calls the capability, for example refund.execute for an order. KIVEX checks who you are, whether the order belongs to the person you act for, and whether a refund is possible.

KIVEX prepares a preview

The preview describes exactly what will happen, for example "Refund 2 490 Kč for order 123. The money arrives in 5–10 working days." Nothing has changed at the business yet.

The person confirms

The person sees the preview in an interface KIVEX trusts: the KIVEX card on the website, a KIVEX confirmation page, or the business's own application. An agent can't confirm an action for a person.

KIVEX runs the action and checks the result

If the business's system supports it, KIVEX checks that the refund went through before it reports completed.

Confirmations are bound to one action

A confirmation covers the person, the capability, the order or invoice, the exact preview and the amount. A confirmation for a refund of 2 490 Kč for order 123 can't authorize a refund of 4 990 Kč for order 456.

SituationError
The data changed after the person saw the previewCONFIRMATION_STALE. Request a new preview.
The confirmation is for a different actionCONFIRMATION_MISMATCH
The confirmation has expired or was already usedCONFIRMATION_EXPIRED

Retry safely

Send an idempotencyKey with every action, and send the same key when you retry after a timeout. A retry with the same key and the same arguments returns the original result and doesn't run the action again. A retry with the same key and different arguments returns IDEMPOTENCY_CONFLICT.

On this page