Sync employee roster from MySQL to raw_employee_roster

Recipe ToolsDatabaseMarketing

What it does

When someone makes a call to add raw_employee_roster, this automation retrieves the latest employee data from MySQL. It inserts that batch into the raw_employee_roster table and returns the response with error handling.

Who it's for

HR teams who need to keep the employee roster synchronized across database tables without manual intervention.

How teams use this

Sync roster on a schedule

Run this automation daily or weekly to keep raw_employee_roster current with the latest data from get_latest_wscid. The same flow works for any frequency the team needs.

Route sync from payroll system

Send the add raw_employee_roster call from a payroll platform instead of a manual call so employee changes flow automatically. Only the source of the call changes.

Filter roster by department before sync

Add a condition to select only rows where department matches a specific value, so only relevant employees are inserted into raw_employee_roster. This requires a department filter in the MySQL query.

How it works

  1. Receive the roster sync call. A real-time call to add raw_employee_roster initiates this automation so the latest employee data can be processed.
  2. Retrieve latest employee records. Select rows from the get_latest_wscid table in MySQL in batch mode to gather all employees that need to be synced.
  3. Insert employees into roster table. Insert the batch of rows into the raw_employee_roster table in MySQL so the roster is current and complete.
  4. Return sync result. Send back the response from add raw_employee_roster so the caller knows the sync succeeded or failed without retry.