Skip to main content

Status Auto-update to User Cancelled

Overview

Currently, if a user exits or kills the SDK mid-flow, the application status remains stuck at "started", leaving clients with no visibility into user drop-offs.

This feature addresses that gap by allowing you to configure a time threshold (in hours), after which such applications will be automatically marked as "user_cancelled" for the given appId.

Prerequisites

Purpose & use case

When a user exits or kills the SDK before completing the flow, the application stays in the "started" status indefinitely. This creates a visibility gap — there's no clear indication of user drop-offs or incomplete sessions.

This feature introduces a configurable timeout after which such applications are automatically transitioned to "user_cancelled" for the specified appId. It enables better tracking of user intent and allows clients to take informed follow-up actions based on more accurate application statuses.

How it works

The application status auto-updates based on this rule:

(Time of the last API call processed for the transaction) + N hours

The update to user_cancelled occurs with a maximum delay of 10 minutes after the configured time.

Example scenario

  • Configured delay: 6 hours
  • First API call for the transaction: 12:00 PM → Status update scheduled for 6:00 PM
  • Another API call at 1:00 PM → New status update time becomes 7:00 PM
  • No finishTransaction call made by 7:00 PM → Status is auto-updated to user_cancelled

How to configure the delay for an appId

  1. Navigate to the client-configurations folder

    Go to hv-central-config/client-configurations.

  2. Locate or create the config file

    • If a file named {appId}.json exists, open it.
    • If not, create a new file named exactly {appId}.json.
  3. Add the configuration key

    Inside the JSON file, add:

    {
    "startedToUserCancelledUpdateDelay": 6
    }

    The value is the number of hours.

  4. Commit and raise a PR

    • Push your changes to a branch.
    • Raise a PR for review and get it approved and merged by your peers.
    • Once merged, the change takes effect based on the deployment cycle — up to 15 minutes after the merge pipeline is successful.

Notes

  • The value of startedToUserCancelledUpdateDelay must be a positive integer (in hours).
  • The delay resets every time a new API call is made for the transaction.
  • If a finish transaction call is made for the same application before this delay is breached, the status in that Finish Transaction call takes priority — the status will not be auto-updated to user_cancelled.

Additional resources

Was this helpful?
Ask AI

Ask anything about the internal documentation

AI answers are based on internal documentation. Verify critical information.