Oct 15, 2021 4:25 AM
I'm trying to copy my HubSpot Deals which contains both "company deals" and "contact deals" to Google Spreadsheets using Google AppsScript by an API integration that is working completly fine for me. Now, my doubt is, how to identify the deal contacts and deal companies [which are in the 1st (same) column in Google spreadsheet] separately without creating a custom property field for company deals and contact deals. And also, I'm following this link for the coding. https://medium.com/how-to-lean-startup/create-a-hubspot-custom-dashboard-with-google-spreadsheet-and.... For reference, i have attached my dummy spreadsheet, so in order to identify the deal companies and contacts just by looking at it, what should i do ? and how can it be done ? Thank you.
Oct 18, 2021 10:19 AM
Probably the simplest method would be to be explicit in the deal name.
Next would probably be a custom property like a dropdown with either contact or company as options and making it a required field
Third would be to check for associations to the deal and maybe create an if statement looking to see if there is a company or contact associated.
@Kevin-C 👋, what do you think?
Oct 18, 2021 10:45 AM
So you're trying separate the deal line items based on their association to a contact or to a company?
@dennisedson suggestion of custom property or naming convention is the absolute least amount work to accomplish this!
The other option is to establish this separation using the other Hubspot APIs. This is rather intensive as I'm not sure the association will come through using the batch read endpoint
Oct 19, 2021 8:31 AM
If you are fetching company deals then maybe they are associated with the company so you can use the company name as a trigger to differentiate between company deal and contact deal.
Hope this will help you out!