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.