Skip to content

Commit d2a51c1

Browse files
authored
Merge pull request #5190 from segmentio/spencerattick-patch-4
add info about Actions destinations
2 parents 258ab46 + fbfcd3a commit d2a51c1

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Diff for: src/connections/functions/insert-functions.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,14 @@ If you don't supply a function for an event type, Segment throws an `EventNotSup
164164

165165
You can read more about [error handling](#destination-insert-functions-logs-and-errors) below.
166166

167+
## Insert Functions and Actions destinations
168+
169+
There are a couple of behavorial nuances to consider when using Insert Functions with Actions destinations.
170+
171+
Insert Functions block Actions destinations from triggering multiple mapping subscriptions for a single payload. If you have a single payload coming through the pipeline that you expect to trigger multiple mapping subscriptions in your configuration, it will work as expected without an Insert Function enabled. With an Insert Function enabled, however, when a payload that is meant to trigger multiple mappings subscriptions is seen, no mappings subscriptions will fire. If you have an Insert Function enabled for a destination, make sure that you configure your payloads so that they only trigger a single mapping subscription.
172+
173+
A payload must also come into the pipeline with the attributes that allow it to match your mapping triggers. You can't use an Insert Function to change the event to match your mapping triggers. If an event comes into an Actions destination and already matches a mapping trigger, that mapping subscription will fire. If a payload doesn't come to the Actions destination matching a mapping trigger, even if an Insert Function is meant to alter the event to allow it to match a trigger, it won't fire that mapping subscription. Segment sees the mapping trigger first in the pipeline, so a payload won't make it to the Insert Function at all if it doesn't come into the pipeline matching a mapping trigger.
174+
167175
## Create settings and secrets
168176

169177
{% include content/functions/settings.md %}
@@ -311,10 +319,6 @@ No, destination insert functions are currently available as cloud-mode destinati
311319

312320
If you are a partner, looking to publish your destination and distribute your app through Segment catalog, visit the [Developer Center](https://segment.com/partners/developer-center/){:target="_blank"} and check out the Segment [partner docs](/docs/partners/).
313321

314-
##### Are there any nuances to consider in using Insert Functions with Actions destinations?
315-
316-
Yes. Without Insert Functions enabled, a single event could trigger multiple mappings. With Insert Functions enabled, though, events only trigger one Actions mapping, even if more than one mapping is set up to run when a particular event is seen.
317-
318322

319323
{% comment %}
320324

0 commit comments

Comments
 (0)