Allocate a lead to a sales representative in HubSpot

In this guide, we will guide you through the process of using the allocate node in Cargo to assign records. Then we will write the allocation data back to selected CRM (HubSpot) to keep systems up to date and allow Sales Representative to their tool as usual.


Pre-requisites

Before you begin

Ensure you have:

  • configured HubSpot connector to import all HubSpot users as members in Cargo's revenue organization.
  • created a territory with members synchronized from HubSpot

Used Features:



Open the node catalog by clicking the "Add Node" icon in the top right of the editor and search for "Allocate." Drag the allocate node into your workflow editor and connect it to the start node.




Set your desired allocation mode, such as territory or capacity. In our example, we will use a previously prepared territory that includes members synchronized from HubSpot. This is an important step because it allows us to use the member ID as the owner ID in HubSpot to update assignments in the CRM.


Regardless of the subsequent configuration of this node, it will require the user to define a Record ID. This is the unique identifier for the record that will be allocated and is required for Cargo to track each record that may be allocated with this action.


The Record ID needs to be a dynamically generated unique identifier, most often it is recommended that you use the ID of the record from the data model using the equivalent of {{nodes.start.id}}.




Once the allocation is configured and tested we will take the allocation node output and use the synchronized member ID to update (using upsert operation in case it doesn't exist) HubSpot contact with the new owner information.

Add a new HubSpot write node and configure following settings:

  • Object type: Standard -> Contact
  • Action: Upsert
  • Matching Value: start.email
  • Hubspot Matching Property Name: contactinformation -> email

Finally, let's set up the mapping which will take the member HubSpot ID and set it as owner on the HubSpot Contact:

  • Hubspot property name: sales_properties -> hubspot_owner_id
  • Value: {{nodes.allocate.member.ids.hubspot}}



  • Run the node: Click the run button to process the allocation based on the configuration.

  • Check the output: After running the node, check the 'OUT' tab to review the results of the allocation.

If there are any errors, a red banner will display at the top of the left panel with an error message indicating the issue.


Outcome

Finish line

By now, you have successfully used the allocate node in Cargo to assign records based on territories, specific members, or matching conditions.