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.

Why Are Large Numbers Truncated in Segment Action Mappings?

Question

Why are large numeric values rounded or truncated in Segment Action Mapping, and how can I preserve the full value?

 

Product

Twilio Segment

 

Environment

Segment Console

 

Answer

Numeric values in Action Mapping are subject to JavaScript’s maximum safe integer limit of 9,007,199,254,740,991. Integers above this limit may lose precision, causing the mapped value to appear rounded or truncated.

To preserve large identifiers:

  • Send the value as a string from the source before it reaches Action Mapping.
  • Map it to a destination field that accepts strings, without converting it back to a number.
  • Test the mapping to confirm that the output preserves the complete value.

 

Additional Information 

Converting a number to a string after precision has already been lost will not restore the original digits. The value must be preserved as a string before numeric processing occurs.

Have more questions? Submit a request
Powered by Zendesk