Sync timecard batches to SQL from function call

Recipe ToolsDeveloper ToolAPI IntegrationDatabaseMarketing

What it does

When a function call runs, this automation retrieves timecard data and processes it in batches to update SQL records. It retries up to three times if an error occurs, then stops the job and logs the failure.

Who it's for

Operations teams who need to bulk sync timecard changes to SQL without manual intervention.

How teams use this

Bulk update timecard records nightly

Run this automation on a schedule to sync all timecard changes from Lasso to SQL in one batch. The retry logic ensures transient errors do not block the sync.

Exclude specific employees from sync

Add a filter to the excluded IDs list so certain employee timecards are skipped during the bulk update. Only the matching records are sent to SQL.

Alert the team when sync fails

Include a notification step when the job stops due to a persistent error so the team can check logs and rerun the automation immediately.

How it works

  1. Receive the function call. A function call starts this automation in real time to begin processing timecard data from the source system.
  2. Fetch timecard data via Rest. Send a Rest request to retrieve timecard data from Lasso. If an error occurs, retry the request up to three times before stopping the job.
  3. Build batch lists for SQL. Create three separate batch lists in Mssql: excluded IDs, reference numbers to edit, and reference numbers to delete for processing.
  4. Process each timecard record. Loop through each timecard from the Rest response and apply the batch updates to Mssql based on the lists created in the prior step.
  5. Stop the job on persistent error. If the error persists after three retries, stop the job and log the failure so the team can investigate and rerun if needed.