<turbo-stream action="update" target="wiki_card"><template>

<h1>How to handle calculated Fields in HubSpot </h1>
<div class="trix-content"><p><strong><u>What Are Calculated Fields?</u></strong></p><p>In HubSpot, <strong>calculated properties</strong> (or calculated fields) are read-only fields whose values are automatically generated by HubSpot based on other data in the system. They are often used for metrics such as totals, conversions, or exchange rate calculations. Examples include:</p><ul><li><strong><code>amount_in_home_currency</code></strong> – calculates deal amount converted into your account’s home currency.</li><li><strong><code>hs_lastmodifieddate</code></strong> – automatically updated when a record changes.</li><li><strong><code>hs_time_to_close</code></strong> – calculated based on deal creation and close dates.</li></ul><p>Because HubSpot controls the calculation logic, these fields cannot be manually edited through the UI, imports, or the API.</p><p><strong><u>Why You Can’t Update Calculated Fields</u></strong></p><p>If you attempt to set a value for a calculated property, HubSpot will reject the request because the field is <strong>read-only</strong>. Any attempt to modify it will result in a <strong>validation error</strong>.</p><p>Here’s an example of such an error:</p><p><em>E2180 - ECE_RestFaultResponse: We received a REST Fault (error) response from the server: Status code: 400 Bad Request<br>Response body: "message": "\"amount_in_home_currency\" is a calculated property; its value cannot be set.","code": "READ_ONLY_VALUE"</em></p><p>In this case, the integration tried to set <code>"amount_in_home_currency": 10590.000000</code> when sending data to HubSpot. Since this property is automatically calculated by HubSpot using the <code>amount</code> and currency exchange rates, the API refused the update.<br><br><strong><u>How to Fix the Error</u></strong></p><p>If you encounter this error when creating or updating records through an integration:</p><ol><li><strong>Remove the calculated property from your payload.</strong><ul><li>Example: Remove <code>"amount_in_home_currency"</code> from the JSON body sent to HubSpot.</li></ul></li><li><strong>Send only editable properties.</strong><ul><li>For deals, that could include <code>amount</code>, <code>dealstage</code>, <code>closedate</code>, <code>dealname</code>, and custom fields.</li></ul></li><li><strong>Let HubSpot handle the calculation.</strong><ul><li>Once the <code>amount</code> and currency fields are updated, HubSpot will automatically recalculate <code>amount_in_home_currency</code>.</li></ul></li></ol><p><strong><u>Best Practices When Working with HubSpot Properties</u></strong></p><ul><li><strong>Check property settings before updating.</strong> In HubSpot, navigate to <em>Settings → Properties</em> and verify whether a property is editable.</li><li><strong>Avoid sending system/calculated properties via API updates.</strong> This includes currency conversion fields, lifecycle stages, and internal timestamps.</li><li><strong>Use property definitions from HubSpot’s API schema</strong> to confirm which fields are <code>readOnly</code>.</li></ul></div>
</template></turbo-stream>

