Hi @ASuthar
You definitely sent me far down the rabbit hole with this one. But after digging through it, here’s what I found.
1. The property is calculated
The value of “hs_weighted_pipeline_in_company_currency” is calculated using:
hs_open_amount_in_home_currency * hs_deal_stage_probability
So whatever you get back from the API depends entirely on the output of these two fields at that exact moment.
2. different “types” of zero
Let’s have a look at the “hs_open_amount_in_home_currency” property, which is also calculated. Its logic behaves roughly like this:
- Deal is open → use “amount_in_home_currency” (stored as decimal e.g. 0.0)
- Deal is closed → return 0 (not a decimal)
- If values are missing / haven’t ben calculated yet → return “” (empty string) / null
So the calculation may receive:
- 0.0 (decimal)
- 0 (integer)
- “” (empty String)
- null
Even though all of them look like “nothing,” they are stored as different data types, and HubSpot seems to treat them differently within the calculation.
3. How HubSpot behaves with each case
Based on testing, HubSpot seems to follow this pattern:
| Input |
Result |
| 0.0 × probability (any) |
“0.0” (decimal) |
| 0 × probability (0 or 100%) |
“0” (integer) |
| “” × probability (any) |
“” (empty String) |
| null × probability (any) |
null |
This confirms that HubSpot does not normalize the result into a single numeric format.
Instead, it preserves the “type” of whatever went into the formula.
4. Why this happens
This is likely due to how HubSpot’s calculated fields propagate values internally,
how null and empty values are handled and how the API serializes numbers differently depending on the source. So even though mathematically everything is “zero”, HubSpot treats decimal zero, integer zero, empty String and null as different inputs.
5. Recommendation
Since HubSpot may return “0”, “0.0”, “”, or null, the safest approach is to normalize the value in your integration logic before using it. This prevents parsing issues, type errors, or unexpected behavior when HubSpot switches between these formats.
Did my post resolve your question? If so, please consider marking it as the accepted solution to help others in the community.
Kind regards
Dennis