<?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 Deal Search API in Custom_Code of Workflow Step.  Filter Multiple Checkbox Field in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Deal-Search-API-in-Custom-Code-of-Workflow-Step-Filter-Multiple/m-p/535583#M49152</link>
    <description>&lt;P&gt;I have a Custom_Code Step where I'm searching deals on a field that is a multi-select.&amp;nbsp; If I search for a specific value it equals, it works fine, but the minute I change it to see if it has one of the items checked, it does not&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WORKS&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const PublicObjectSearchRequest = {
    "properties": ["dealname","project_type" ],
    "limit": 100,
    "sorts": [
      {
        "propertyName": "project_type",
        "direction": "DESCENDING"
      }
    ],
    "filterGroups":[
      {
        "filters":[
          {
            "propertyName": "project_type",
            "operator": "EQ",
            "value": "AB"
          }
        ]
      }
    ]
  }
const apiResponse = await hubspotClient.crm.deals.searchApi.doSearch(PublicObjectSearchRequest);&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;DOES NOT WORK&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const PublicObjectSearchRequest = {
    "properties": ["dealname","project_type" ],
    "limit": 100,
    "sorts": [
      {
        "propertyName": "project_type",
        "direction": "DESCENDING"
      }
    ],
    "filterGroups":[
      {
        "filters":[
          {
            "propertyName": "project_type",
            "operator": "IN",
            "values": ["CD","AB"]
          }
        ]
      }
    ]
  }
const apiResponse = await hubspotClient.crm.deals.searchApi.doSearch(PublicObjectSearchRequest);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Can someone assist with what's being missed here?&lt;/P&gt;</description>
    <pubDate>Thu, 02 Dec 2021 16:02:08 GMT</pubDate>
    <dc:creator>soccery387</dc:creator>
    <dc:date>2021-12-02T16:02:08Z</dc:date>
    <item>
      <title>Deal Search API in Custom_Code of Workflow Step.  Filter Multiple Checkbox Field</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Deal-Search-API-in-Custom-Code-of-Workflow-Step-Filter-Multiple/m-p/535583#M49152</link>
      <description>&lt;P&gt;I have a Custom_Code Step where I'm searching deals on a field that is a multi-select.&amp;nbsp; If I search for a specific value it equals, it works fine, but the minute I change it to see if it has one of the items checked, it does not&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;WORKS&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const PublicObjectSearchRequest = {
    "properties": ["dealname","project_type" ],
    "limit": 100,
    "sorts": [
      {
        "propertyName": "project_type",
        "direction": "DESCENDING"
      }
    ],
    "filterGroups":[
      {
        "filters":[
          {
            "propertyName": "project_type",
            "operator": "EQ",
            "value": "AB"
          }
        ]
      }
    ]
  }
const apiResponse = await hubspotClient.crm.deals.searchApi.doSearch(PublicObjectSearchRequest);&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;DOES NOT WORK&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const PublicObjectSearchRequest = {
    "properties": ["dealname","project_type" ],
    "limit": 100,
    "sorts": [
      {
        "propertyName": "project_type",
        "direction": "DESCENDING"
      }
    ],
    "filterGroups":[
      {
        "filters":[
          {
            "propertyName": "project_type",
            "operator": "IN",
            "values": ["CD","AB"]
          }
        ]
      }
    ]
  }
const apiResponse = await hubspotClient.crm.deals.searchApi.doSearch(PublicObjectSearchRequest);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Can someone assist with what's being missed here?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 16:02:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Deal-Search-API-in-Custom-Code-of-Workflow-Step-Filter-Multiple/m-p/535583#M49152</guid>
      <dc:creator>soccery387</dc:creator>
      <dc:date>2021-12-02T16:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: Deal Search API in Custom_Code of Workflow Step.  Filter Multiple Checkbox Field</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Deal-Search-API-in-Custom-Code-of-Workflow-Step-Filter-Multiple/m-p/535956#M49170</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/228762"&gt;@soccery387&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;I might be completely wrong here, but is "IN" a valid operator for the &lt;A href="https://developers.hubspot.com/docs/api/crm/search" target="_blank" rel="noopener"&gt;Search API&lt;/A&gt;?&lt;BR /&gt;You could pass multiple filterGroups with the "EQ" operator instead. When multiple filterGroups are included in the request body, they'll be combined using a logical OR operator.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 07:31:18 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Deal-Search-API-in-Custom-Code-of-Workflow-Step-Filter-Multiple/m-p/535956#M49170</guid>
      <dc:creator>Teun</dc:creator>
      <dc:date>2021-12-03T07:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: Deal Search API in Custom_Code of Workflow Step.  Filter Multiple Checkbox Field</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Deal-Search-API-in-Custom-Code-of-Workflow-Step-Filter-Multiple/m-p/536246#M49193</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/101258"&gt;@Teun&lt;/a&gt;&amp;nbsp;thanks for your reply.&amp;nbsp; I can use the "IN" operator with Deal Search when I do this in Postman.&amp;nbsp; I just cannot get it to work within a Workflow Custom_Code Step.&amp;nbsp; I understand I could use the EQ and stack multiple requests, but am trying to keep the requests and code clean&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 16:36:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Deal-Search-API-in-Custom-Code-of-Workflow-Step-Filter-Multiple/m-p/536246#M49193</guid>
      <dc:creator>soccery387</dc:creator>
      <dc:date>2021-12-03T16:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Deal Search API in Custom_Code of Workflow Step.  Filter Multiple Checkbox Field</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Deal-Search-API-in-Custom-Code-of-Workflow-Step-Filter-Multiple/m-p/547918#M49715</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/228762"&gt;@soccery387&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN data-sheets-value="{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:&amp;quot;please use this code : \r\n\t var options = { method: 'POST',\r\n\t  url: 'https://api.hubapi.com/crm/v3/objects/deals/search',\r\n\t  qs: { hapikey: '' },\r\n\t  headers: \r\n\t   { \r\n\t     'Content-Type': 'application/json' },\r\n\t  body: {\r\n        \&amp;quot;filterGroups\&amp;quot;:[\r\n          {\r\n            \&amp;quot;filters\&amp;quot;:[\r\n              {\r\n                \&amp;quot;propertyName\&amp;quot;: \&amp;quot;pipeline\&amp;quot;,\r\n                \&amp;quot;operator\&amp;quot;: \&amp;quot;EQ\&amp;quot;,\r\n                \&amp;quot;value\&amp;quot;: \&amp;quot;agent_sales\&amp;quot;\r\n              },\r\n              {\r\n                \&amp;quot;propertyName\&amp;quot;: \&amp;quot;dealstage\&amp;quot;,\r\n                \&amp;quot;operator\&amp;quot;: \&amp;quot;EQ\&amp;quot;,\r\n                \&amp;quot;value\&amp;quot;: \&amp;quot;booking_stage\&amp;quot;\r\n              },\r\n              {\r\n\t\t        \&amp;quot;propertyName\&amp;quot;: \&amp;quot;associations.contact\&amp;quot;,\r\n\t\t        \&amp;quot;operator\&amp;quot;: \&amp;quot;EQ\&amp;quot;,\r\n\t\t        \&amp;quot;value\&amp;quot;: event.object.objectId\r\n\t\t      }\r\n            ]\r\n          }\r\n        ]\r\n      },\r\n\t  json: true };\r\n  \r\n\t  request(options, function (error, response, body) {&amp;quot;}" data-sheets-userformat="{&amp;quot;2&amp;quot;:829,&amp;quot;3&amp;quot;:{&amp;quot;1&amp;quot;:0},&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;6&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;7&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;8&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;11&amp;quot;:4,&amp;quot;12&amp;quot;:0}"&gt;please use this code : &lt;BR /&gt;var options = { method: 'POST', &lt;BR /&gt;url: '&lt;A href="https://api.hubapi.com/crm/v3/objects/deals/search" target="_blank"&gt;https://api.hubapi.com/crm/v3/objects/deals/search&lt;/A&gt;', &lt;BR /&gt;qs: { hapikey: '' }, &lt;BR /&gt;headers: &lt;BR /&gt;{ &lt;BR /&gt;'Content-Type': 'application/json' }, &lt;BR /&gt;body: { &lt;BR /&gt;"filterGroups":[ &lt;BR /&gt;{ &lt;BR /&gt;"filters":[ &lt;BR /&gt;{ &lt;BR /&gt;"propertyName": "pipeline", &lt;BR /&gt;"operator": "EQ", &lt;BR /&gt;"value": "agent_sales" &lt;BR /&gt;}, &lt;BR /&gt;{ &lt;BR /&gt;"propertyName": "dealstage", &lt;BR /&gt;"operator": "EQ", &lt;BR /&gt;"value": "booking_stage" &lt;BR /&gt;}, &lt;BR /&gt;{ &lt;BR /&gt;"propertyName": "associations.contact", &lt;BR /&gt;"operator": "EQ", &lt;BR /&gt;"value": event.object.objectId &lt;BR /&gt;} &lt;BR /&gt;] &lt;BR /&gt;} &lt;BR /&gt;] &lt;BR /&gt;}, &lt;BR /&gt;json: true }; &lt;BR /&gt;&lt;BR /&gt;request(options, function (error, response, body) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps!&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;If we were able to answer your query, kindly help the community by marking it as a solution.&lt;BR /&gt;Thanks and Regard.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 09:51:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Deal-Search-API-in-Custom-Code-of-Workflow-Step-Filter-Multiple/m-p/547918#M49715</guid>
      <dc:creator>webdew</dc:creator>
      <dc:date>2021-12-29T09:51:52Z</dc:date>
    </item>
  </channel>
</rss>

