Skip to content

Commit efb8ea9

Browse files
committed
edits
1 parent 8cb5345 commit efb8ea9

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/connections/functions/destination-functions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ To test the batch handler:
269269
2. Add events as a JSON array, with one event per element.
270270
3. Click **Run** to preview the batch handler with the specified events.
271271

272-
> note ""
272+
> info ""
273273
> The Sample Event option tests single events only. You must use Manual Mode to add more than one event so you can test batch handlers.
274274
275275
The editor displays logs and request traces from the batch handler.
@@ -306,7 +306,7 @@ Standard [function error types](/docs/connections/functions/destination-function
306306
]
307307
```
308308

309-
After receiving the response from the `onBatch` handler, Segment only retries **event_4** and **event_5**.
309+
For example, after receiving the responses above from the `onBatch` handler, Segment only retries **event_4** and **event_5**.
310310

311311
| Error Type | Result |
312312
| ---------------------- | ------- |

src/connections/functions/insert-functions.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ To prevent your insert function from processing data, toggle Enable Function off
239239
Batch handlers are an extension of insert 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 insert function can accept and handle batches of events.
240240

241241
> info ""
242-
> Batching is available for insert and destination functions only.
242+
> Batching is available for destination and destination insert functions only.
243243
244244
### When to use batching
245245

@@ -265,7 +265,7 @@ async function onBatch(events, settings){
265265
```
266266

267267
> info ""
268-
> The `onBatch` handler is an optional extension. Destination insert functions must still contain single event handlers as a fallback, in cases where Segment does not receive enough events to execute the batch.
268+
> The `onBatch` handler is an optional extension. Destination insert functions must still contain single event handlers as a fallback, in cases where Segment doesn't receive enough events to execute the batch.
269269
270270
The handler function receives an array of events. The events can be of any supported type and a single batch may contain more than one event type. Handler functions can also receive function settings. Here is an example of what a batch can look like:
271271

@@ -340,7 +340,7 @@ async function onIdentifyBatch(events, settings) {
340340

341341
### Configure your batch parameters
342342

343-
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.
343+
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 insert functions without the `onBatch` handler.
344344

345345
### Test the batch handler
346346

@@ -351,7 +351,7 @@ To test the batch handler:
351351
2. Add events as a JSON array, with one event per element.
352352
3. Click **Run** to preview the batch handler with the specified events.
353353

354-
> note ""
354+
> info ""
355355
> The Sample Event option tests single events only. You must use Manual Mode to add more than one event so you can test batch handlers.
356356
357357
The editor displays logs and request traces from the batch handler.
@@ -389,7 +389,7 @@ Standard [function error types](/docs/connections/functions/destination-function
389389
]
390390
```
391391

392-
After receiving the response from the `onBatch` handler, Segment only retries **event_4** and **event_5**.
392+
For example, after receiving the responses above from the `onBatch` handler, Segment only retries **event_4** and **event_5**.
393393

394394
| Error Type | Result |
395395
| ---------------------- | ------- |

0 commit comments

Comments
 (0)