<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Workflow with Custom Code in Data Hub</title>
    <link>https://community.hubspot.com/t5/Data-Hub/Workflow-with-Custom-Code/m-p/1155017#M3060</link>
    <description>&lt;P&gt;I have a contact property called "contact engagement score" and another contact property called "lead status". Whenever the lead status is anything other thank "JUnk", I want an average of all the contact engagement scores, to be input into a custom property at the company record.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Example:&amp;nbsp;&lt;/P&gt;&lt;P&gt;contact A - 10&lt;BR /&gt;contact B - 5, but junk status&lt;BR /&gt;contact C - 16&lt;/P&gt;&lt;P&gt;then the average would be 13, and this value would be appended to the company record in another custom property&lt;BR /&gt;&lt;BR /&gt;need the line of code to solve this using a hubspot workflow with ops hub steps&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 21 May 2025 06:29:05 GMT</pubDate>
    <dc:creator>Manasa_V</dc:creator>
    <dc:date>2025-05-21T06:29:05Z</dc:date>
    <item>
      <title>Workflow with Custom Code</title>
      <link>https://community.hubspot.com/t5/Data-Hub/Workflow-with-Custom-Code/m-p/1155017#M3060</link>
      <description>&lt;P&gt;I have a contact property called "contact engagement score" and another contact property called "lead status". Whenever the lead status is anything other thank "JUnk", I want an average of all the contact engagement scores, to be input into a custom property at the company record.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Example:&amp;nbsp;&lt;/P&gt;&lt;P&gt;contact A - 10&lt;BR /&gt;contact B - 5, but junk status&lt;BR /&gt;contact C - 16&lt;/P&gt;&lt;P&gt;then the average would be 13, and this value would be appended to the company record in another custom property&lt;BR /&gt;&lt;BR /&gt;need the line of code to solve this using a hubspot workflow with ops hub steps&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 May 2025 06:29:05 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/Workflow-with-Custom-Code/m-p/1155017#M3060</guid>
      <dc:creator>Manasa_V</dc:creator>
      <dc:date>2025-05-21T06:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: Workflow with Custom Code</title>
      <link>https://community.hubspot.com/t5/Data-Hub/Workflow-with-Custom-Code/m-p/1155019#M3061</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/825978"&gt;@Manasa_V&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wouldn't do this with a workflow / custom code, but a roll-up property instead: &lt;A href="https://knowledge.hubspot.com/properties/create-calculation-properties" target="_blank"&gt;https://knowledge.hubspot.com/properties/create-calculation-properties&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can create this property on the company record, let it calculate the average of the associated contact records in that particular field and define a condition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a far superior approach compared to workflows as it's not prone to enrollment issues or code errors, and calculates in real-time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards!&lt;/P&gt;</description>
      <pubDate>Wed, 21 May 2025 06:31:31 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/Workflow-with-Custom-Code/m-p/1155019#M3061</guid>
      <dc:creator>karstenkoehler</dc:creator>
      <dc:date>2025-05-21T06:31:31Z</dc:date>
    </item>
  </channel>
</rss>

