Skip to content

What-if Triage guest message (rollup delta)

POST
/v1/actions/hospitality.action.triage_guest_message/whatif
curl --request POST \
--url https://api.aerandil.com/v1/actions/hospitality.action.triage_guest_message/whatif \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "branch": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "params": { "enrichment_snapshot": {}, "expires_at": "2026-04-15T12:00:00Z", "factors_considered": [ "message_text" ], "intent_alternatives": "example", "intent_confidence": "low", "intent_confidence_score": "example", "intent_primary": "booking.inquiry", "policy_outcomes": [ "pan_redacted" ], "rationale_text": "example", "recommended_action_kind": "auto_respond", "recommended_action_params": {}, "recommended_action_ref": "example", "recommended_response_text": "example", "sentiment": "negative", "sentiment_score": "example", "urgency": "low" }, "return_modified": false, "target": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "object_type": "hospitality.guest_message" } }'

What-if projection of apply_hospitality_action_triage_guest_message — previews the action (execute-and-roll-back) and folds its would-be events into rollup deltas, returning the contribution an apply would make to the daily_rooms fact (ADR / RevPAR / TRevPAR / Occupancy inputs) without persisting anything. Requires the same actions:hospitality.action.triage_guest_message:apply scope as apply. An action that emits no rooms-fact events yields an empty daily_rooms.

Media typeapplication/json
object
branch

Apply against an open branch’s overlay view instead of the canonical (main) plane. The action’s writes land in the branch’s copy-on-first-write overlay, its events in the branch’s own stream, and the invocation is journaled for merge-by-replay. Branch writes are action-only, so this is the write-side entry point to a branch (POST /v1/branches forks one).

string format: uuid
params
required
object
enrichment_snapshot
required
Frozen context snapshot at issue time (struct as JSON)
object
key
additional properties
any
expires_at
Triage expiry (default: issued_at + 4h, or 30min for urgency=critical)
string format: date-time
factors_considered
required
Signals that drove the triage
Array<string>
Allowed values: message_text conversation_history guest_profile reservation_context recognition_history recovery_history loyalty_tier time_of_day language_detected attachment_present prior_triage_history safety_keywords other
intent_alternatives
Top-k alternative intents with scores (JSON array of {intent, score})
intent_confidence
required
Confidence ordinal
string
Allowed values: low medium high
intent_confidence_score
Calibrated probability (optional)
string format: decimal
intent_primary
required
Leaf intent
string
Allowed values: booking.inquiry booking.modification booking.cancellation booking.confirmation_query complaint.cleanliness complaint.noise complaint.billing complaint.service complaint.food complaint.other service.amenities service.spa service.restaurant service.transport service.lost_and_found service.wake_up service.technical service.housekeeping service.in_room_dining service.other info.amenities info.directions info.payment_policy info.wifi info.hours info.other recognition.celebration safety.emergency marketing.feedback chitchat.general injection.suspected other.unclassified
policy_outcomes
required
Compliance flags observed during triage
Array<string>
Allowed values: pan_redacted phi_redacted tcpa_opt_out_detected gdpr_erasure_referenced whatsapp_window_outside voice_consent_missing injection_attempt_detected safety_keyword_matched none
rationale_text
required
Human-readable explanation
string
recommended_action_kind
required
Apply-path discriminator
string
Allowed values: auto_respond chain_typed_action escalate_to_staff silent_acknowledge no_action
recommended_action_params
Proposed parameters for the chained action (JSON)
object
key
additional properties
any
recommended_action_ref
API name of the chained action (when kind = chain_typed_action)
string
recommended_response_text
Drafted reply text (when kind = auto_respond)
string
sentiment
required
Sentiment ordinal
string
Allowed values: negative neutral positive
sentiment_score
Calibrated sentiment score [-1, 1]
string format: decimal
urgency
required
Urgency classification
string
Allowed values: low normal high critical
return_modified

When true, the response carries modified_objects and modified_links projections — the engine reads the event log inside the same transaction so the projection observes the handler’s own writes.

boolean
target
required
object
id
required
string format: uuid
object_type
required
Allowed value: hospitality.guest_message

Rollup deltas the action would contribute, computed and rolled back.

Media typeapplication/json
object
daily_rooms
required

Per (property, business_date) additive contribution to the rooms rollup.

Array<object>
object
business_date
required
string format: date
currency

ISO 4217, when the fold observed one.

string
property_id
required
string format: uuid
rooms_revenue_net_delta
required

Decimal, net rooms revenue delta.

string
rooms_sold_delta
required
integer format: int64
total_revenue_net_delta
required

Decimal, net total revenue delta.

string
Examplegenerated
{
"daily_rooms": [
{
"business_date": "2026-04-15",
"currency": "example",
"property_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"rooms_revenue_net_delta": "example",
"rooms_sold_delta": 1,
"total_revenue_net_delta": "example"
}
]
}
Cache-Control
string
Allowed value: no-store

Always no-store — derived, uncommitted data.

Validation error — the apply would be rejected.