Skip to main content

Test with mock AI alerts

Use simulated alerts to verify the SCO alert-resolution experience before testing with live AI.

Refer to the Edge API documentation to learn how to configure test mode:

An alert only fires while a transaction is open. Start a transaction before setting the test mode — calling scan-started alone, with no open transaction, won't trigger a simulated alert.

Test scenarios​

Scenario 1 — Normal transaction​

Set event_type to no_alert.

Acceptance criteria

  • The AI Box publishes a no-alert verdict over MQTT after the scan completes.
  • The SCO proceeds straight to payment — no resolution popup appears.

Scenario 2 — Item Left (missed scan)​

Set event_type to item_left, and test the resolution flow in both modes:

  • Customer Mode — rescan all flagged items (rescan).
  • Staff Mode — mark some items as No Need to Rescan (scan_not_required) and some as Rescan (rescan), so both outcomes are exercised in one alert.

Acceptance criteria

  • After the scan completes, the AI Box publishes an alert over MQTT flagging the correct missed item(s).
  • The SCO shows the resolution popup listing the correct issue_items and corresponding images.
  • The resolution is successfully reported through Update Alert:
    • Customer Mode — managed_by = customer, and each issue item should be rescan
    • Staff Mode — managed_by = staff, and each issue item could be either scan_not_required or rescan