Hi All,
Looking for a bit of clarity on the Destination Event Mapping Trigger logic.
I understand that All implies every condition in the trigger must be true resulting in AND logic.
For example:
- Event Name is Order Completed
- Product Sku is abc
- Product Type is subscription
Becomes:
- Event Name is Order Completed AND Product Sku is abc AND Product Type is subscription
- This would isolate Order Completed with the specific product parameters and send “abc product subscription purchase” to the given destination
Based on the documentation Any implies at least one of the conditions in the trigger must be true resulting in full OR logic.
The example becomes:
- Event Name is Order Completed OR Product Sku is abc OR Product Type is subscription
- This would include all Order Completed events, any other events passing the abc sku, or any events passing a product type of subscription
What I am struggling with is AND OR logic together. I am attempting to curate custom conversions for destinations where:
Event Name is “xyz” AND Condition 2 is “abc” OR “def”
Is the only option in Segment to create 2 separate mappings, 1 for the each of the OR conditions and mapping them to the same Destination Event Name endpoint?
Example:
- Event Name is “Order Completed” AND Condition 2 is “abc” ---- sent to destination as “example purchase” conversion id “1” conversion label “yes”
- Event Name is “Order Completed” AND Condition 2 is “def” ----- sent to destination as “example purchase” conversion id “1” conversion label “yes”
This is currently the only way I think both sets of conditions could be sent together either by the endpoint event name or conversion id/label etc.
Am I missing anything in regards to how the Segment Trigger Logic works? Is this the best path forward?
*Edit
Would a transformation/insert function be a better option?
Intercept the Order Completed event, insert a new boolean property into the event based on Condition 2 is “abc OR def” as a True or False value.
Then use this new property Condition 2 Bool is true as the trigger?
What would be the cost implications to running let’s say 5 functions like this on 4 different destinations?
Any insight is appreciated.