How to Link Deals to Line Items While Copying Values between Them
Your sales team captures valuable details in HubSpot as new deals develop. Knowing what a prospect is looking for is crucial for estimating revenue, and your reps manually enter this line item information. Since the data you need is already in the deal, you're seeking a more efficient way to automatically populate the line items.
With Insycle's Associate app, you can set rules to automatically link deals to line items and then copy key details into those line items. Alternatively, if your deals and line items are already linked, you can simply run an operation to copy values over. Both of these processes can be automated to run on a schedule or triggered by a HubSpot workflow.
Understanding Deal and Line Item Associations in HubSpot
In HubSpot, a line item refers to an individual product or service linked to a particular record, such as a deal, quote, invoice, or payment link. A product or service can exist independently in your product library, but a line item refers to a specific instance of that product linked to a single parent object.
For instance, while a deal can be associated with multiple line items, each line item can only be associated with one deal at a time. This is a structural constraint in HubSpot—when a line item is associated with a new deal, HubSpot automatically removes its previous deal association and creates a new one.
What this means for bulk associations:
When using Insycle to associate line items with deals, if a line item is already associated with a different deal, the existing association will be replaced with the new one. In bulk operations involving multiple deals, Insycle will maintain the final association processed—typically the last record in your list.
For example, if Line Item A is currently associated with Deal 1, and you use Insycle to associate Line Item A with Deal 2, HubSpot will automatically remove the Deal 1 association and create the new association with Deal 2.
Associate Deals to Line Items and Copy Values Between Them
Process Summary
- Filter deals down to those you want to associate.
- Set rules for making the associations.
- Set rules to copy values between the associated deals and line items.
- Preview and apply the changes to the CRM.
Step-by-Step Instructions
Step 1: Select and Filter Records
Navigate to RevOps Acceleration > Associate. Select the HubSpot database and Deals record type in the top menu. Then, explore the default templates for a pre-built solution. The built-in, Copy "Amount" from Deal to Line Item "Quantity" template could be a good place to start.
Each row in Step 1 is for a field you want to look at to determine whether to include or exclude a record from this association task. With this filter, you're specifying which records you would like to update in Insycle.
In the example below, only deals that have an Amount value and a Pipeline value of "Sales Pipeline" will be included in this operation.
When you click Search, Insycle will list records in the Record Viewer at the bottom of the page. If you make changes to the filter, you need to click the Search button again to refresh the viewer.
Step 2: Configure Rules That Will Create the Relationship
Under Step 2, define the rules for bulk matching the two record types to create the relationship:
- Action tells Insycle what to do with records surfaced in Step 1. You can Add associations or use the Replace action to remove existing associations and create new ones in one step.
- Association specifies the type of record you want to create the relationship with. In the example above, Deals will be associated to Line Items.
- You can select a Label to identify the relationship.
- Use the Line Items Filter to narrow down the line items to those that would be a good fit for this relationship.
- Click the Selection button to define rules for picking the line item if there are multiple matches found.
- Select the Deals Field you want to try and match with the line items. In the example above, Amount from the deals record will be used.
- Select the Line Items Field with the value that should match the deals field. In the example above, the Unit Price field will be used. The two matching fields are often the same for both records, though they may have different labels.
- The Comparison Rule tells Insycle whether the values between the deals and line items must be an Exact Match or Similar Match. In most cases, you'd select Exact Match, but you can learn more about these Comparison Rules in the Advanced How-Tos below.
- In the Ignored field, you can select parts of a field value to ignore, such as specific text, whitespace, or characters.
- The Match Parts field tells Insycle whether to match the entire field or just part of it—such as the first or last few words, first and last characters, or semicolon-separated values.
Step 3: Copy a Value between the Associated Deals and Line Items
After setting the association rules in Step 2, you can create rules to copy values between the records. If one record type consistently has values that would be helpful in the associated record, you can execute that copy in bulk.
Under Step 3, select the field from the source record type (in this example, deals), and the relevant field on the target records (line items). You can choose to copy values from the source record to the target, or target record to the source, and add multiple rows to copy more than one field set.
The Copy Rule gives you three options:
- Only when [the record you're linking to] field is empty
- Only when [the record you're linking from] field is not empty
- Always copy
The preview CSV will include these fields and specify if the value was copied for each record.
Step 4: Preview and Apply Changes in Your CRM
Preview Changes in a CSV Report
Now with the filters and association actions in place, you can preview the changes you are making to your data. That way, you can check to ensure the relationships are being created as expected before those changes are made in your live database.
First, under Step 4, click the Review button.
In the Bulk Associate popup, select Preview and click Next.
On the Notify tab, add any additional recipients who should receive the CSV (and make sure to hit Enter after each address). You can add colleagues and additional context here.
On the When tab, click the Run Now tab and select which records to apply the change to (in most cases this will be All, but if you have a large number of records, you may just want to do a chunk for your preview), then click the Run Now button.
Open the CSV file from your email in a spreadsheet application and review the columns. For each deal record, Insycle tried to match it with line items using the Amount and Quantity values. Each row in the CSV includes the Result of the association step, the deal info, the associated line item info, and the result of the copy operation.
Apply Changes to the CRM
If everything in your CSV preview looks correct, return to Insycle and move forward with applying the changes to the live CRM data.
Under Step 4, click the Review button; this time, select Update mode.
On the When tab, click Run Now and select which records to apply the change to (in most cases this will be All), then click the Run Now button.
Save Templates and Setup Automation to Maintain Formatting
After you've seen the results in the CRM and you are satisfied with how the operation runs, you can save all of the configurations as a template, and set up automation so this association operation runs on a set schedule.
Create a template for each segment and association configuration, then you can create a Recipe to automatically run them together. You can also integrate Insycle Recipes into HubSpot Workflows.
Copy Values between Already Associated Deals and Line Items
Process Summary
- Filter deals down to only those that have associated line items.
- Set rules to identify the associations.
- Set rules to copy values between the associated deals and line items.
- Preview and apply the changes to the CRM.
Step-by-Step Instructions
Step 1: Set Up the Filter to Find Deals with Associated Line Items
Navigate to RevOps Acceleration > Associate. Select the HubSpot database and Deals record type in the top menu. Then explore the default templates for a pre-built solution.
To find deals that already have line items associated with them, use the filter to include only deals that have one or more related line items.
When you click Search, Insycle will list records in the Record Viewer at the bottom of the page. If you make changes to the filter, you need to click the Search button again to refresh the viewer.
Step 2: Configure Rules to Find the Related Deals and Line Items
Under Step 2, define the rules to find the previously linked records:
- Action tells Insycle what to do to the records surfaced in Step 1. Use the Add action to find existing associations.
- Association specifies the type of record you want to create the relationship with. Select Deal to Line Item.
- You can leave the Label Unlabeled.
- Click the Line Items Filter button to narrow the line items down to only those where the Associated Deal ID exists. Note that the Line Items Filter will not update the results in the Record Viewer, only in your final Review steps.
- Click the Selection button to define rules for picking the line item if there are multiple matches found.
- Select the Record ID field for the Deals Field.
- Select the Associated Deal ID for the Line Items Field.
- Use the Exact Match Comparison Rule.
- You can leave the Ignored field blank.
- Select Entire Value from the Match Parts field.
Step 3: Copy a Value between the Associated Records
Create the rules to copy values between the records.
Under Step 3, select the field from the source record type (in this example, deals), and the relevant field on the target records (line items). You can choose to copy values from the source record to the target, or target record to the source, and can add multiple rows to copy more than one field set.
The Copy Rule gives you three options:
- Only when [the record you're linking to] field is empty
- Only when [the record you're linking from] field is not empty
- Always copy
The preview CSV will include these fields and specify if the value was copied for each record.
Step 4: Preview and Apply Changes in Your CRM
Preview Changes in a CSV Report
Now with the filters and association actions in place, you can preview the changes you are making to your data. That way, you can check to ensure the relationships are being created as expected before those changes are made in your live database.
First, under Step 4, click the Review button.
In the Bulk Associate popup, select Preview and click Next.
On the Notify tab, add any additional recipients who should receive the CSV (and make sure to hit Enter after each address). You can add colleagues and additional context here.
On the When tab, click the Run Now tab and select which records to apply the change to (in most cases, this will be All, but if you have a large number of records, you may just want to do a chunk for your preview), then click the Run Now button.
Open the CSV file from your email in a spreadsheet application and review the columns. Each row in the CSV includes the deal info, the associated line item info, and the result of the copy operation.
Apply Changes to the CRM
If everything in your CSV preview looks correct, return to Insycle and move forward with applying the changes to the live CRM data.
Under Step 4, click the Review button; this time, select Update mode.
On the When tab, click Run Now and select which records to apply the change to (in most cases this will be All), then click the Run Now button.
Save Templates and Setup Automation to Maintain Formatting
After you've seen the results in the CRM and you are satisfied with how the operation runs, you can save all of the configurations as a template, and set up automation so this copy operation runs on a set schedule.
Create a template for each segment and association configuration. Additionally, you can create a Recipe, a template bundle that can then be inserted into HubSpot Workflows.
Advanced How-Tos
Step 2: Using Related Fields to Identify Matches
You can specify more than one matching field when making associations in the Associate app.
For example, maybe you want to compare a deal Amount against a line item's Unit Price or Unit Cost.
To do this, select the Advanced tab under Step 2. There, you'll be able to add Related Match Fields to catch more associations.
Step 2: Match from Fields Containing Multiple Values
If you need to create relationships between records based on one of several values in a field, you can use the "Semicolon Separated" Match Parts parameter.
For example, you need to link contacts to companies based on specific locations using Postal Code. You have a custom field, “Allowed Post Codes,” that contains several codes that cover a region. Since the values are separated by semicolons, Insycle can look at each value in the field for a match.
You can also use the Semicolon Separated parameter to search for matching values in a Related Match Field.
Step 2: Using Exact Match vs. Similar Match
The Comparison Rule defines what kind of likeness to look for when deciding if field values should be considered a match.
It's a good idea to start with Exact Match for the straightforward matches, then use Similar Match to broaden the search and look for edge cases.
Exact Match looks for values that match exactly, with no differences from one record to the next. Any unique identifying fields should use Exact Match.
Similar Match looks for values that may be close but with a one-character difference (like a typo, extra character, or missing character) and broadens the search. This search behaves like when Google shows results for a slightly different term or says, “Did you mean...”
For example, if a Deal Name of “Acme 64” is found, it could include records with the Deal Name values “Akme 64," "acm 64," or "Acma 64,” as matches.
Similar Match uses looser criteria that cast a wider net for what can be considered matches. Make sure to carefully review the results to ensure the relationships being created are what you're expecting.
If using ID fields to match, note that they will only work with Exact Match, not Similar Match.
Create a Recipe and Integrate with HubSpot Workflows
When you have a reliable set of templates, you can put them together into a longer, ordered sequence as a Recipe. Then, you can schedule that Recipe to run on a consistent, set schedule. Your templates will run one after another in the order that you set.
To add your Recipe to a HubSpot Workflow, it must be automated and set to Execute as HubSpot Workflow Action.
Learn more about associating records in HubSpot Workflows.
Flag Unmatched Records in Your Inbox
When using the Associate app, you can opt to be alerted when records aren’t matched. This may be helpful if you want to investigate and address any records where a relationship has not been created.
Under Step 2, check the Count unmatched records as Failed box.
Then in the Step 4 popup on the Notify tab, you can select the email delivery option “Always send,” or “Send when errors.”
When checked, any record where there is no match to create the association will be counted as “Failed.” This will be reflected by a “with Failures” suffix on the report email subject line…
…and a "Failed, no matching record found (use 'Grid Edit' to troubleshoot)" message in the Result column of the CSV report.
When you save this associate configuration as a template and set up automation, the report emails will let you know when a relationship has not been created for a record so you can address it as needed.
Tips for Creating Associations between Records
- To create associations between records, you need a field with a similar value in both records. For example, "Amount" on the deal and "Unit Price" on the line item. Then, you can pick those fields to match the records and establish the association.
- You can make associations in both directions: Deal to line items, or line items to deals.
Additional Resources
Related Help Articles
- Associate App Troubleshooting
- Associate App FAQs
- Associate Records in HubSpot Workflows
- HubSpot Associate App Overview
- HubSpot Multiple Associations and Labels
Related Blog Posts