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.
- Check the existing session; never open login automatically.
- Start at page
1. Fetch each page withtlnt notification attendance-list --page PAGE --query "" --status 3 --json, replacingPAGEwith the current page number. IncrementPAGEby one after each response until it equals the returnedlast_page. - From each result's
data.inbox.data[], select only records whose numericapproval_flagequals0. - Freeze the selected inbox IDs and show safe summaries. Do not include tokens, cookies, request bodies, or unnecessary employee data.
- Inspect every selected notification with
tlnt notification detail INBOX_ID --json. - Ask the user to authorize the frozen set before submitting anything. The CLI confirmation prompt still applies to every approval.
- Run approvals sequentially:
bash
tlnt attendance approve INBOX_ID --reason "Reviewed" --json
- 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. - Re-list all pages and verify the frozen IDs no longer have
approval_flag == 0. - 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.
- Finish or stop the current workflow as you normally would.
- Ask the user to set
app_versiontoXin their config file (orTALENTA_APP_VERSION). - With the user's explicit request, run
tlnt logout --json, then ask the user to runtlnt login --jsonso the new version is used for the session. - Optionally run
tlnt updatewhen the user asks to upgrade tlnt itself, for example after a⚠️ tlnt vX is installed, but vY is availablenotice.
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.