I need to copy deals from a given pipeline who match some criteria into a new pipeline.
Criteria will be something like this:
- Deals who are on a specific stage, OR
- Deals who has certain custom_properties
Is there any easy way to do this using the API?
I was thinking about:
1- Get all the deals from the given pipeline
2- Filter the deals - keep only those who match the criteria
3- For each deal obtained from #2:
3.1 Create a new deal into the new pipeline with the same properties
Question
- What is the best way to solve points 1 and 2?
- Is there any way to filter the deals using this endpoint? Accounts Dashboard | HubSpot
Thanks!