Workflows

Read when: following a safe step-by-step procedure, including batch approval by an agent.

Before using tlnt

tlnt is unofficial and attendance approval changes account data. Read the full bilingual disclaimer and confirm that the account and approval activity are authorized before continuing.

These procedures are intentionally detail-first and confirmation-first. tlnt never opens login automatically. Examples assume settings from the default OS config path or environment variables; pass --config PATH before commands that need a non-default file.

Read-only preflight

Before any Talenta operation:

tlnt status --json
tlnt profile --json

If the result code is session_missing, session_invalid, mobile_token_missing, or mobile_token_expired, ask the user to run the explicit login command and stop.

Preview attendance

Use dry-run to fetch today's schedule and build the request without submitting:

tlnt attendance clock-in --dry-run \
  --latitude LATITUDE --longitude LONGITUDE --notes "Preview" --json
tlnt attendance clock-out --dry-run \
  --latitude LATITUDE --longitude LONGITUDE --notes "Preview" --json

Review the coordinates, event type, schedule date, and optional location ID. Only after the user reviews the preview may a live command be run. Live commands retain the terminal confirmation prompt.

Approve remaining attendance requests

Use this workflow only when the user explicitly asks to review and approve remaining attendance requests.

  1. Check the existing session; never open login automatically.
  2. Start at page 1. Fetch each page with tlnt notification attendance-list --page PAGE --query "" --status 3 --json, replacing PAGE with the current page number. Increment PAGE by one after each response until it equals the returned last_page.
  3. From each result's data.inbox.data[], select only records whose numeric approval_flag equals 0.
  4. Freeze the selected inbox IDs and show safe summaries. Do not include tokens, cookies, request bodies, or unnecessary employee data.
  5. Inspect every selected notification with tlnt notification detail INBOX_ID --json.
  6. Ask the user to authorize the frozen set before submitting anything. The CLI confirmation prompt still applies to every approval.
  7. Run approvals sequentially:

bash tlnt attendance approve INBOX_ID --reason "Reviewed" --json

  1. Treat only code == "attendance_approved" as success. Stop on cancellation or any other failure, report the completed and pending IDs, and do not retry automatically.
  2. Re-list all pages and verify the frozen IDs no longer have approval_flag == 0.
  3. Do not add records discovered after the preview to the current batch.

Time-off requests use the same steps. Fetch each page with tlnt notification timeoff-list --page PAGE --query "" --status 3 --json, approve with tlnt timeoff approve INBOX_ID --reason "Reviewed" --json, and treat only code == "timeoff_approved" as success.

Overtime requests use the same steps. Fetch each page with tlnt notification overtime-list --page PAGE --query "" --status 3 --json, approve with tlnt overtime approve INBOX_ID --json (there is no reason option), and treat only code == "overtime_approved" as success.

If no records match, report that no approvals are pending and submit nothing.

Handle a Google Play version notice

When a command prints ⚠️ Talenta app vY is configured, but vX is on Google Play on stderr, the configured app_version differs from the latest Talenta release. The notice is advisory; stdout JSON and result codes are unaffected.

  1. Finish or stop the current workflow as you normally would.
  2. Ask the user to set app_version to X in their config file (or TALENTA_APP_VERSION).
  3. With the user's explicit request, run tlnt logout --json, then ask the user to run tlnt login --json so the new version is used for the session.
  4. Optionally run tlnt update when the user asks to upgrade tlnt itself, for example after a ⚠️ tlnt vX is installed, but vY is available notice.

Never log out, log in, or update automatically because of either notice.

Safe logout

Run logout only after the user explicitly requests removal of the saved session:

tlnt logout --json

If a remote logout fails, the local session is preserved for retry. If no usable token or session exists, local cleanup remains idempotent.