SUPPORT.TWILIO.COM END OF LIFE NOTICE: This site, support.twilio.com, is scheduled to go End of Life on February 27, 2024. All Twilio Support content has been migrated to help.twilio.com, where you can continue to find helpful Support articles, API docs, and Twilio blog content, and escalate your issues to our Support team. We encourage you to update your bookmarks and begin using the new site today for all your Twilio Support needs.

Actions Event Not Firing Due to Array Mapping Error

Issue

You have configured an Actions destination, but a specific event (such as "Product Added") is not firing. Other events might fire successfully, but this particular event does not trigger a network request or send data to the destination, even though the triggers and mappings appear to be configured correctly.

 

Product

Segment

 

Environment

Segment Console

 

Cause

This issue may be caused by a data-type mismatch within your mapping configuration. In many single-item events (like Product Added), the root properties field is a single JSON object containing the details of one item. However, some destination fields strictly expect an array (a list of multiple items). If you map a single object to an array field within the "Array Mappings" section, the destination may fail to validate the data type, which can cause the event to be silently dropped.

 

Resolution

To see if this resolves the issue, you can try removing the invalid array mapping and using the standard mapping sections for your single-item properties:

  1. Log in to the Segment Console and navigate to your Connections > Destinations page.
  2. Select your destination and go to the Mappings tab.
  3. Click on the mapping for the failing event to edit it.
  4. Scroll down to the Array Mappings section.
  5. If you have a single object (such as the root properties field) mapped to a destination array field, remove it so that the mapping is left blank.
  6. Scroll to the standard mapping sections (often labeled as Event Metadata or similar) and ensure your single-item properties (such as properties.price, properties.quantity, or properties.currency) are mapped individually there instead.
  7. Save the mapping and perform a test on your website or app to verify if the event now fires successfully.

 

Additional Information 

For events that inherently contain a list of products (such as Order Completed or Checkout Started), mapping the properties.products array to an array field is the correct approach. The validation failure typically only occurs when attempting to map a single-item object into an array field.

If you are troubleshooting a client-side (device-mode) destination, keep in mind that tracking data is sent directly from the browser to the destination tool's API. As a result, successful or failed device-mode event deliveries will not appear in the Segment Delivery Overview tab. You can verify successful client-side pixel fires by opening your browser's Developer Tools Network tab and filtering for the destination's network requests.

Have more questions? Submit a request
Powered by Zendesk