Emp sync

Employee Sync keeps your employee list in Leena AI aligned with your source system — an HRMS, a directory, or any other employee database. An accurate directory underpins access control (terminated people shouldn't stay active), the attributes used across audiences, personalization and workflows, and every downstream experience that relies on knowing who someone is.

Data can arrive two ways: a spreadsheet you upload yourself, or a scheduled pull from your HRIS.

Where to find it

Open the Admin Console, then go to Bot Users → Emp Sync.

The page has four tabs:

  • Manual sync — field mappings and Excel/CSV upload. This is where you land by default.
  • Automated sync — scheduled syncs via Workflows utility apps.
  • Sync history — the audit log of every run, manual and automated.
  • Employee data — the resulting directory, split into Active and Terminated.
📘

Access

User Sync is available to roles holding the employee sync capability — in most deployments, System Admin.

Choosing a sync method

MethodHow it worksBest for
Manual syncUpload an Excel or CSV file mapped to your configured field mappingsOne-time loads, small organizations, or ad-hoc corrections
Automated syncA scheduled sync via a Workflows utility app that fetches data from your HRISOngoing, hands-off synchronization with your source system

The two can coexist. Field mappings apply only to Excel uploads — for automated sync, attribute mapping happens inside the utility app itself.

Manual sync

Field mappings

The Field mappings table lists every configured field and defines the schema of your employee data. Mandatory Leena AI fields that aren't yet mapped appear as placeholder rows, and must be configured before you can upload anything.

Click Add field, or click an existing row, to open the panel. It has two tabs — Field details and Field validations (optional).

ConfigurationDescription
Field name – LeenaSelect an existing Leena field, or create a new custom field
Field name – ClientThe source system field name. Cannot be empty, and cannot contain . or $
Field typeString, Date, Boolean, Phone number, or Array. Numeric-only input is enforced through a String validation
ValidationsRegex, allowed values, email domains, number-only, uniqueness, or date format, depending on type
Mandatory toggleWhether a value must exist for every employee

A few things worth knowing:

  • System-mandatory fields cannot be deleted, and their field type may be locked.
  • Available validations depend on the field type. Boolean fields have none, Date fields require a format, and Phone number fields support uniqueness and regex only.
  • Array fields hold several values in one cell. The cell is read as comma-separated text, split, trimmed, and each element validated individually. Use it for attributes like multiple roles or locations.
  • The regex validation includes an inline Test regex option, so you can check a pattern before saving it.

Version history

Field mappings are versioned. Open View version history to preview any earlier version read-only, or to Restore one if a recent change needs rolling back.

Restoring creates a new version rather than overwriting history, and shows a changelog of how many fields were added or removed compared with the current version.

Uploading employee data

Upload XLS stays disabled until every mandatory field is mapped, so clear the placeholder rows first.

Before uploading, consider downloading the template — it contains column headers matching your current client field names exactly, which skips the review step described below.

Your file must be:

  • .xls, .xlsx, or .csv
  • No larger than 10 MB
  • A single, non-empty file
  • Headed with non-empty column names containing no . or $

Choose whether to Terminate absent employees. With it on, anyone present in Leena AI but missing from the file is marked Terminated.

The file is then validated against your field mappings, with two possible outcomes:

  • Everything mapped, no errors — the data is staged and you land on Sync history with the run in Uploaded status.
  • Unmapped columns — you're taken to Review mapping, where each unmapped column must be matched to a unique field. You can instead choose to continue with errors, which excludes the unmapped fields and leaves the run as Uploaded with errors.
⚠️

Uploading does not sync

At this point the data is only staged and validated. No employee record has been created or updated yet — the sync is initiated separately, below.

Initiating the sync

Finish the sync from Sync history:

  1. Open the run with status Uploaded or Uploaded with errors to see its record-level detail.
  2. Review the records. Each row shows its parsed values, with warning icons and tooltips on any field that failed validation. Use the All / No Errors / Errors toggle to isolate problems.
  3. Click Save. For a run with errors, a confirmation appears first — proceeding syncs the valid records and excludes the rest. To include them, fix the source file and re-upload.
  4. The run moves to Sync in progress, then Successful or Synced with errors. Added, Updated and Terminated counts populate on the run, and the results appear under Employee data.

Until you click Save, the run sits in Uploaded status and nothing reaches the directory. If you re-upload a corrected file, start the sync from the newest run.

Automated sync

Automated sync pulls employee data from your source system on a schedule using an Employee Sync utility app built in Workflows Studio. Each utility app gets its own independent configuration.

Before you start

You need the User Sync capability for the bot, and a published Employee Sync utility app — without one, the Utility app dropdown will be empty.

To create the app: go to Workflows Studio → App Listing → Create App and set the Utility Type to Employee Sync Utility. Configure pagination to match how your HRIS API returns data (page-number or skip-token), add an Action node to call the API, use the Mapper node to transform source fields into Leena AI's employee schema, set the Response Template on the Trigger node with the data array and pagination fields, then publish. It will then appear in the dropdown. Full instructions are in User Sync Utility Apps.

Adding an automated sync

Go to the Automated sync tab and click Add automated sync. Each utility app supports one configuration, and each runs independently.

SettingWhat it does
Utility appThe Employee Sync utility app to run. Apps already used by another sync are hidden, and the choice cannot be changed later
Schedule methodDaily, Weekly (pick a day), or Custom (every N days, weeks, or months)
TimeThe sync hour, in UTC, with a local time hint. Only the hour is used
Sync typeAdd employees adds new people and updates existing ones. Update data only updates existing employees, matched by Employee ID — no one new is created, and unmatched records are skipped and counted
Terminate absent employeesAvailable with Add employees only. Makes this sync authoritative: anyone absent from its response is marked Terminated
📘

Only one authoritative sync per bot

Just one configuration can have Terminate absent employees enabled. The panel warns you and blocks a conflicting setup.

Saving also attempts an immediate sync for that configuration. A 1-hour cooldown applies per configuration — if it was manually triggered within the last hour, the save still succeeds but the immediate run is skipped and the remaining minutes are shown.

Because the scheduler evaluates once per hour, a sync runs somewhere inside the hour you chose rather than at an exact minute.

Managing automated syncs

Configured syncs are listed with their utility app, schedule, sync type, and status.

From each row's menu you can Edit the configuration, Deactivate or Activate it, or Delete it. Deactivated syncs are skipped by the scheduler — though re-saving one through Edit will reactivate it.

Sync history

Sync history is the audit log for every run, Excel and automated alike. For Excel runs it's also where you initiate the sync after uploading.

ColumnWhat it shows
Triggered atWhen the run occurred
SourceExcel or API. API runs show the utility app name
StatusSee the reference below. Hover a failed run for the reason
Total employeesRecords processed in the run
Added / Updated / TerminatedHow many employees were added, updated, and terminated
Download dataDownloads the uploaded spreadsheet. Excel runs only

Status reference

StatusMeaning
In progressThe uploaded file is still being processed and validated
UploadedValidated and staged — not yet synced. Open the run and click Save
Uploaded with errorsStaged, but some records failed validation. Save syncs the valid ones only
Sync in progressThe sync is running
SuccessfulCompleted, all records applied
Synced with errorsCompleted, but some records failed — open the run to inspect them

Automated runs use only the last three, since they have no upload or staging step.

Filters and search

Narrow the list by Sync status (multi-select), Sync type (Excel or API), and Utility app (multi-select, shown when the type is API). Search, sorting and filters are held in the page URL, so a filtered view can be shared as a link.

Run details and downloads

Clicking an Excel run opens its record-level detail, where each row shows its values with warning icons and tooltips for validation errors, and the All / No Errors / Errors toggle isolates problems. For runs still in Uploaded status, this is where you click Save. The uploaded file can be downloaded from either the row or the detail page, with an extra column listing each row's errors.

Fully successful runs don't open a detail page — the sync is already complete, so use the row's Download option instead. API runs have no detail page or download; use the stats columns and the failure reason tooltip.

📘

Retention

Row-level data behind a completed run is purged 7 days after upload, so download an error report while you still need it. Runs that were never synced are preserved.

Employee data

The Employee data tab shows the resulting directory.

Switch between Active and Terminated, each with a live count. Search and sort across any column to spot-check records, and use Manage columns to show or hide fields — your choices are remembered. Clicking a row opens the full employee record, including fields hidden from the table.

Download employee data exports every employee, Active and Terminated, as an XLSX regardless of the filters currently applied.

If no data exists yet, the tab offers two starting points: Upload manually or Add automated sync.

Troubleshooting

What to check regularly

Watch Sync history to confirm runs happened at the expected UTC hour, that the status is Successful, and that the record counts line up with your HRMS. Also check that no Excel runs are sitting in Uploaded or Uploaded with errors — those are staged uploads waiting for someone to open them and click Save.

Automated sync failures

Missing identifier — records without an Employee ID, User ID, or Email are skipped, since they can't be matched or created. Make sure your utility app returns at least one identifier per record.

Pagination error — the run stopped because pagination didn't advance: either the page number or skip token repeated, or three consecutive pages returned no new employees. This is a safeguard against runaway loops. Check the utility app's pagination configuration.

Termination limit — if a sync with Terminate absent employees enabled would terminate more than 50% of the employees it owns, terminations are blocked and the run is marked with errors. Confirm the source system returned the full employee list before re-running. This guard only applies once the owned population exceeds 10, so very small directories aren't protected by it.

Manual sync issues

Upload button disabled — one or more mandatory fields are unmapped. Configure the placeholder rows first.

File rejected — check the format, the size limit of 10 MB, and that the file isn't empty or corrupt.

File uploaded but Employee data hasn't changed — the run is almost certainly still in Uploaded status. Uploading only stages data; open the run in Sync history and click Save.

Validation errors — open the run to see them per record, fix the source file or the field validations, and re-upload. Saving an "Uploaded with errors" run excludes the failing records.

Duplicate value errors on a unique field — uniqueness is checked within the uploaded file, so two rows sharing a value are both flagged even when neither conflicts with existing data.


Did this page help you?