CSV to hubspot import

  • 153Views
  • Last Post 06 December 2019
0
votes
Jonas Hagberg posted this 05 December 2019

Hello,

 

I have made a import from a CSV file to hubspot package.

Using the UPSERT command to import and update companies and contacts.

The package runs successfully and should create 31 companies and 31 contacts in hubspot.

So i get an success status on the package after it has run. With 62 success rows.

But when i log in to hubspot the companies or contacs are not imported.

What could be the issue?

 

Order By: Standard | Newest | Votes
0
votes
Mariia Zaharova posted this 05 December 2019

Hello Jonas!

We have checked your package. You are using the UPSERT operation for your scenario. The UPSERT operation updates a record if it exists or inserts a new record. This allows you to avoid inserting duplicate data. You need to map the target ID/Primary key columns for performing UPSERT.

In Skyvia, UPSERT determines what action to perform in the following way: if a Null value is specified for the ID or primary key, UPSERT operation inserts the record, and if a non-null value is specified, UPSERT operation tries to update the record with the specified ID or primary key. Skyvia does not actually check if such record exists, and providing invalid ID/PK values results in failed records. For target Id mapping it is better to use Lookup mapping. To use the Lookup mapping, you need to have a column (or a set of columns) that uniquely identifies a record, other than the primary key. 

For example:

JIC: When using lookup mapping for ID or PK columns in UPSERT, don't forget to select the Set null when no match found checkbox in Lookup Options. Otherwise, the lookup will produce errors if no such record found, and there would be failed records instead of inserted new ones.

The lookup above will try to find CompanyId where Customer = id (CustomerId) and update it; if no record is found - the new Company will be inserted.

Thus, please change your mapping and try again.

 

Best regards,

Mariia

0
votes
Jonas Hagberg posted this 05 December 2019

Thank you for answer.

This creates the companies in hubspot that is true.

But if they are not found and then inserted they get a company ID from hubspot and not the company ID I want them to have from the file. 

If the company cannot be found I want them to be inserted with the company id (customer id) that I have in the CSV file and not a new number set by hubspot.

I guess im probably missing something

 

0
votes
Jonas Hagberg posted this 05 December 2019

I also get an error during an import that is hard to interpret.

The value of the column AssociatedCompanyIds has incorrect JSON format.

 

The value in the cell is: 1108

Same package but another CSV file.

0
votes
Mariia Zaharova posted this 06 December 2019

Hello Jonas!

 

But if they are not found and then inserted they get a company ID from hubspot and not the company ID I want them to have from the file. 

This is the expected behavior. Company ID cannot be set manually, its value is automatically generated in HubSpot when a new record is created. This is HubSpot API peculiarity, not Skyvia.

 

The value of the column AssociatedCompanyIds has an incorrect JSON format.

This field stores values in this format:

[596640216]

[596640216,596640200]

 

If you have any further questions, feel free to contact us. We will be glad to answer all your further questions.

 

Best regards,

Mariia

Close