I search a bit and couldn't find anything relating to this exactly.
I saw the https://developers.hubspot.com/docs/methods/owners/owners_overview Owners API documentation - was wondering. If we would like to automate when a user leaves our employ, how can we transfer ownership of all their records? And potentially delete or mark as inactive the user as well?
Original Questions>>"If we would like to automate when a user leaves our employ, how can we transfer ownership of all their records? And potentially delete or mark as inactive the user as well?"
You may use a HubSpot Workflow 'Set Object' action to automatically RE-assign Contact.owner for all contacts currently assigned to a specific Contact.owner, OR you may manually assign a new Contact.owner to a group of contacts (in bulk) directly from the Contact View Filter.
Original Questions>>"If we would like to automate when a user leaves our employ, how can we transfer ownership of all their records? And potentially delete or mark as inactive the user as well?"
You may use a HubSpot Workflow 'Set Object' action to automatically RE-assign Contact.owner for all contacts currently assigned to a specific Contact.owner, OR you may manually assign a new Contact.owner to a group of contacts (in bulk) directly from the Contact View Filter.
@MFrankJohnson is correct that it's not possible to deactivate owners via the API, however you could conceivably poll the Get owners endpoint and check whether any owner IDs have the "isActive": false property value.
Hey @IsaacTakushi, curious. Does that mean, setting hubspot_owner_id to "isActive: false" would make the HubSpot Owner (User) appear inactive in the portal?