Upsert operation for importing Product2 and PriceBookEntry

  • 234Views
  • Last Post 10 November 2017
0
votes
Marina Seredova posted this 30 October 2017

We are trying to import Product2 and PriceBookEntry data from a single table in SQL server. It will be a weekly scheduled job.

The insert operation works fine. But How do we upsert the modified records next week.

Say, we imported 100 records in first week.

next we may have 20 new and 10 modified records. How do we import them without duplicating the modified records.

Order By: Standard | Newest | Votes
0
votes
Marina Seredova posted this 30 October 2017

As it stands Skyvia will not allow upsert operations on related objects. Is there any workaround for this?

0
votes
Marina Seredova posted this 31 October 2017

Can we get some update on this please?

0
votes
Mariia Zaharova posted this 31 October 2017

Yes, Upsert operation is not supported for related objects. We will inform you when it is supported.

The recommended option is to use two separate Upsert tasks for Product2 and PriceBookEntry in one Import package.

 

If you have any further questions, feel free to contact us.

0
votes
Marina Seredova posted this 07 November 2017

We are able to use Upsert for Product2 but it doesnt allow to update/upsert PricebookEntry, the reason being that there is no ExternalId field for same. 

What is the best way to update PricebookEntry records?

0
votes
Marina Seredova posted this 08 November 2017

ANy updates on above question?

When trying to insert again the error says

"This price definition already exists in this price book"

So we need a way to upsert the records

0
votes
Mariia Zaharova posted this 08 November 2017

In case if you do not have ExternalId field and doesn't know ID values in PricebookEntry, you can use Lookup mapping for Id column like it is described here:

https://skyvia.com/resources/docs/index.html?performing_upsert_operation.htm ("What if ID/Primary Key Values Are Unknown?")

 

Did you try this option?

 

0
votes
Marina Seredova posted this 09 November 2017

We tried to follow the steps as provided, the problem is that PriceBookEntry object in Salesforce has a few fields which cannot be updated. So it throws an error.

Is it possible to remove few fields from the import job mappings?

0
votes
Mariia Zaharova posted this 10 November 2017

Please specify the package number and exact fields which cause an error while updating.

In fact, if these fields are not required, you can remove mapping by clicking the 'Clear mapping' button:

Close