Sync PayClass data every 5 minutes

Recipe ToolsMarketingDeveloper ToolAPI Integration

What it does

When the clock triggers every 5 minutes, this automation fetches PayClass records from a remote system. It encodes each record, stores the results in a lookup table, and keeps PayClass data current for other automations to reference.

Who it's for

HR teams who need PayClass records refreshed automatically for downstream processes.

How teams use this

Keep PayClass data fresh automatically

Run the sync every 5 minutes so PayClass records are always current without manual intervention. Other automations can rely on up-to-date lookup table entries.

Encode PayClass codes for system compatibility

Transform XrefCode values during the sync so they match the format required by downstream systems. The lookup table stores only encoded records.

Add a second data source to the sync

Include an additional HTTP request to fetch PayClass data from another system and merge both results into the same lookup table. Set a condition to handle records from each source.

Alert when PayClass sync fails

Check if the HTTP request or encoding step returns an error and send a notification to the HR team. Only proceed to the lookup table if all steps succeed.

How it works

  1. Trigger every 5 minutes. The automation runs on a 5-minute schedule to keep PayClass data current without manual intervention.
  2. Fetch PayClass records from remote system. Send an HTTP request via Rest to retrieve the latest PayClass data from the source system for processing.
  3. Encode each PayClass record. Execute JavaScript code to encode the XrefCode for each PayClass item in the response so it matches downstream system requirements.
  4. Store PayClass entries in lookup table. Add all encoded PayClass records to the Lookup Table so they are available for other automations to reference without delay.
  5. Call Create PayClass Payload. Invoke the payload function to format and finalize the PayClass data for storage and downstream use by connected systems.