- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2022 09:23 PM
I want to send an integer in JSON but payload builder turns it into a string. In the action input it is specified as an integer.
Solved! Go to Solution.
- Labels:
-
Flow Designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2022 06:31 PM
Hi
unfortunately you have to take the Payload Builder as it is and in most of the cases it doesn't matter as JavaScript is not a type-safe language like Java or C++. That means under the hood, the data in variables is permanently converted to other data types.
But I would like to know what concerns do you have with it? Does the consumer have any issues with the stringified version of the number?
Kind regards
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2022 11:02 PM
Glad to help you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
I don't know if this is something new since this post or not, but JSON Builder now lets you specify a Type of Number.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wednesday
Came here to say it looks like JSON Builder step can handle Integers being passed and tagged as number fields successfully, but JSON Parser step doesn't let you specify a number field - everything is a string, array or object 😞
Also another observation - JSON Builder (and Flow Designer in general) doesn't seem to be able to allow the developer to choose whether a Choice field pill will return the Choice Label or Value. I would LOVE to be able to do this and use JSON builder to return the choice integer value for integrations that them.
Another observation is that JSON Builder doesn't seem to be able to convert a Currency field to a decimal number - it leaves it as a string with a currency character (recognising how tricky currencies can be, I'll let this one slide) 🙂
My solution to all this is to pass my reference object into a Script step to do all the Choice value conversions against the sys_choice table and to also pass my currency values so they can be transformed.

