Create Purchase Order on schedule

Recipe ToolsMarketingDeveloper ToolAPI IntegrationDatabaseUtilities

What it does

When the scheduled trigger fires every 5 minutes, this automation fetches order headers and details via HTTP. It batches the data and logs results to a job report so someone can verify what was processed.

Who it's for

Procurement teams who need to generate purchase orders from a scheduled data sync without manual intervention.

How teams use this

Automate purchase order generation

Run the sync every 5 minutes to pull new orders and create purchase orders in batch without manual data entry. The team reviews the job report to confirm all records were processed.

Sync purchase orders to ERP

Extend this automation to push the created purchase orders into an ERP system after the batch is complete. Add a final step that sends headers and lines to the ERP via API.

Route orders by vendor

Retarget the automation to filter purchase orders by vendor and send each batch to a different approval queue. Only the routing logic changes, not the core fetch and create steps.

Alert on sync failures

Add a notification step that sends a message to Slack if the HTTP fetch fails or the batch creation encounters an error. Include the error details so the team can troubleshoot.

How it works

  1. Run every 5 minutes. The automation starts on a 5-minute schedule to check for new orders that need purchase order creation.
  2. Retrieve order headers via HTTP. Fetch order header data from the source system using Rest. If an error occurs, the step stops and does not retry.
  3. Batch purchase order headers. Build a batch list of purchase order headers from the fetched data so they can be processed together as one group.
  4. Retrieve order details via HTTP. Fetch line-item details for each order using Rest Secondary. If an error occurs, the step stops and does not retry.
  5. Record results to job report. Log the headers, line items, and any errors to a job report so the team can verify what was created and processed.