title: Freshdesk Webhook - Get data from subject to populate a custom field
body: <p>Has anyone tried to get a string from a ticket subject and populate a custom field using Webhooks on Freshdesk?</p>
  <p>I am trying to get a reservation number that starts with the letter 'R' and put it on a custom field.</p>
  <p>Example code:</p>
  <pre><code>     &lt;script&gt;
  var strng;  
      strng = &quot;Either way, time largely defines the human experience.&quot;;  
      var incStr = strng.includes(&quot;human&quot;);  
      document.write(&quot;Is 'human' present in the string? : &quot; + incStr);
  &lt;/script&gt;
  
  {
  &quot;custom_fields&quot;: {&quot;Resv#&quot;: incStr}
  
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/Fp09G.png" rel="nofollow noreferrer">enter image description here</a></p>