Overview
Record Webhooks send import data to your system in batches in real-time. Receiving large amounts of data by webhook can be more complex than pulling data from the Fuse API, so you should only use Record Webhooks if you need to show backend validation errors to the user during import. Record Webhooks send data in batches of up to 1,000. An import with 10,000 records will have ten batches of records sent by webhook, each with 1,000 records.Record Webhook Flow
There are three steps that you need to set up to get Record Webhooks working properly.Step 1: Receive Batches
Fuse will send records to your webhook in batches of 1,000. The payload looks like this:- batch_slug: A unique identifier for the batch.
- import_slug: A unique identifier for the import.
- batches_count: The number of batches that will be sent.
- records: The records in the current batch.
- complete: The final batch sent will have this marked as true.
completed
with any associated validation issues, as seen below.
processing
.
- status: Must be ‘completed’ if you have finished processing the batch, or ‘processing’ if, for example, you are processing the batch in a background job.
- record_slug: The unique slug of the record.
- validation_type: Must be ‘warning’ or ‘error’.
- column_name: The
internal_key
from the column in Fuse. - issue_description: A user-facing message to show the user.
Step 2: Update Batch Status
If you responded with a status ofprocessing
to any batches in step 1, then you must update us once each batch has been completed
.
You can send an HTTP request to Fuse to update the status of your batch.