You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/connections/functions/destination-functions.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -192,7 +192,7 @@ If your function fails, you can check the error details and logs in the **Output
192
192
Batch handlers are an extension of destination functions. When you define an `onBatch` handler alongside the handler functions for single events (for example: `onTrack` or `onIdentity`), you're telling Segment that the destination function can accept and handle batches of events.
193
193
194
194
> info ""
195
-
> Batching is available to destination functions only.
195
+
> Batching is available for destination functions only.
196
196
197
197
### When to use batching
198
198
@@ -278,7 +278,7 @@ async function onIdentifyBatch(events, settings) {
278
278
279
279
### Configure your batch parameters
280
280
281
-
By default, Functions waits up to 10 seconds to form a batch of 20 events. You can increase the number of events included in each batch (up to 400 events per batch) by contacting [Segment support](https://segment.com/help/contact/){:target="_blank"}. Segment recommends users who wish to include fewer than 20 events per batch use destination Functions without the `onBatch` handler.
281
+
By default, Functions waits up to 10 seconds to form a batch of 20 events. You can increase the number of events included in each batch (up to 400 events per batch) by contacting [Segment support](https://segment.com/help/contact/){:target="_blank"}. Segment recommends users who wish to include fewer than 20 events per batch use destination functions without the `onBatch` handler.
282
282
283
283
### Test the batch handler
284
284
@@ -295,7 +295,7 @@ The [Config API](/docs/config-api/) Functions/Preview endpoint also supports tes
295
295
296
296
### Handling batching errors
297
297
298
-
Standard [function error types](/docs/connections/functions/destination-functions/#destination-functions-error-types) apply to batch handlers. Segment attempts to retry the batch in the case of Timeout or Retry errors. For all other error types, Segment discards the batch. If only part of a batch succeeds, Segment does not retry the failing part of the batch.
298
+
Standard [function error types](/docs/connections/functions/destination-functions/#destination-functions-error-types) apply to batch handlers. Segment attempts to retry the batch in the case of Timeout or Retry errors. For all other error types, Segment discards the batch.
299
299
300
300
| Error Type | Result |
301
301
| ---------------------- | ------- |
@@ -306,6 +306,8 @@ Standard [function error types](/docs/connections/functions/destination-function
306
306
| Timeout | Retry |
307
307
| Unsupported Event Type | Discard |
308
308
309
+
If only part of a batch succeeds and the failed events return either a `RetryError` or `Timeout` error, Segment retries the entire batch. You can optionally configure a response array for partially failed syncs and retry only the failed events in a batch. To configure the response array for partially failed syncs, [contact Segment support](https://segment.com/help/contact/){:target="_blank"}.
310
+
309
311
## Save and deploy the function
310
312
311
313
Once you finish building your destination function, click **Configure** to name it, then click **Create Function** to save it.
0 commit comments