<?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 Re: Custom coded workflows using custom objects in Data Hub</title>
    <link>https://community.hubspot.com/t5/Data-Hub/Custom-coded-workflows-using-custom-objects/m-p/614663#M818</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/63499"&gt;@SteveHTM&lt;/a&gt;&amp;nbsp;, I would like to invite our top experts to share their ideas&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/338029"&gt;@LMartinez7&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/152058"&gt;@bryce-corey&lt;/a&gt;&amp;nbsp;any recommendations to&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/63499"&gt;@SteveHTM&lt;/a&gt;&amp;nbsp;matter?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Pam&lt;/P&gt;</description>
    <pubDate>Wed, 13 Apr 2022 21:45:45 GMT</pubDate>
    <dc:creator>PamCotton</dc:creator>
    <dc:date>2022-04-13T21:45:45Z</dc:date>
    <item>
      <title>Custom coded workflows using custom objects</title>
      <link>https://community.hubspot.com/t5/Data-Hub/Custom-coded-workflows-using-custom-objects/m-p/613307#M809</link>
      <description>&lt;P&gt;Community - hope you can help. I'm working on a complex workflow that uses at least one custom coded workflow step. The issue I'm running into is that I need to search/filter/sort custom objects (rather than contacts/companies etc) in the coded workflow step and I don't understand how to use the Javascript APIs to access these objects.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a document I've failed to find or a code example/snippet somewhere that can help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2022 14:39:51 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/Custom-coded-workflows-using-custom-objects/m-p/613307#M809</guid>
      <dc:creator>SteveHTM</dc:creator>
      <dc:date>2022-04-12T14:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: Custom coded workflows using custom objects</title>
      <link>https://community.hubspot.com/t5/Data-Hub/Custom-coded-workflows-using-custom-objects/m-p/614663#M818</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/63499"&gt;@SteveHTM&lt;/a&gt;&amp;nbsp;, I would like to invite our top experts to share their ideas&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/338029"&gt;@LMartinez7&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/152058"&gt;@bryce-corey&lt;/a&gt;&amp;nbsp;any recommendations to&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/63499"&gt;@SteveHTM&lt;/a&gt;&amp;nbsp;matter?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Pam&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 21:45:45 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/Custom-coded-workflows-using-custom-objects/m-p/614663#M818</guid>
      <dc:creator>PamCotton</dc:creator>
      <dc:date>2022-04-13T21:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: Custom coded workflows using custom objects</title>
      <link>https://community.hubspot.com/t5/Data-Hub/Custom-coded-workflows-using-custom-objects/m-p/638418#M869</link>
      <description>&lt;P&gt;Hey there &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/63499"&gt;@SteveHTM&lt;/a&gt;,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;There are a few ways to make API calls related to custom objects. The most important part of this is identifying what's called the objectTypeId of the custom object. The easiest way to identify this id in the CRM is by going to the index page of the custom object you're looking to query, and take a look at the url.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I've attached a screenshot of an example. Note the part highlighted at the top. The object type id will always be in this portion of the url on the index page of the custom object. It will always be in the format "2-" followed by...I think it's 6 or 7 digits.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another option would be to retrieve all schemas in the portal and find the ID based on the label of the custom object, or the schema name - "Hospital" for example, if we were looking at the object in the screenshot. This, in most cases, won't be necessary. See the "Get all schemas" endpoint in the docs &lt;A href="https://developers.hubspot.com/docs/api/crm/crm-custom-objects" target="_blank"&gt;HERE&lt;/A&gt;.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;You won't be able to use the hubspot api client in the same fashion as you would if you were querying the standard objects, which would allow you to use simple dot notation to access the appropriate endpoints.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Below is an example search api request using a custom object&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;		let courseSearchObj = {
			filterGroups: [
				{
					filters: [
						{
							value: `${enrollmentInfo.course_id}`,
							propertyName: "thinkific_course_id",
							operator: "EQ"
						}
					]
				}
			],
			properties: ["id", "thinkific_course_id", "name"],
			limit: 1,
			after: 0
		};

		let courseSearchRes = await hubspotClient.apiRequest({
			method: "POST",
			path: `/crm/v3/objects/2-1877015/search`,
			headers: {
				accept: "application/json",
				"content-type": "application/json"
			},
			body: courseSearchObj
		});&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;The docs linked earlier on in this post will give more details on searching via API when working with custom objects. Make sure to navigate to the "Objects" tab.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Hopefully this helps.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2022 20:56:25 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/Custom-coded-workflows-using-custom-objects/m-p/638418#M869</guid>
      <dc:creator>nikodev</dc:creator>
      <dc:date>2022-05-24T20:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: Custom coded workflows using custom objects</title>
      <link>https://community.hubspot.com/t5/Data-Hub/Custom-coded-workflows-using-custom-objects/m-p/639108#M871</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/152964"&gt;@nikodev&lt;/a&gt;&amp;nbsp;- this is helpful material that really should be added to the API documentation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 19:56:12 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/Data-Hub/Custom-coded-workflows-using-custom-objects/m-p/639108#M871</guid>
      <dc:creator>SteveHTM</dc:creator>
      <dc:date>2022-05-25T19:56:12Z</dc:date>
    </item>
  </channel>
</rss>

