1

I have an object, Financial Account, that exists in Salesforce. The object is updated twice every week from our accounting system so that Salesforce reflects up-to-date balances for the accounts. Every account must be linked to a Client record in Salesforce, but this connection does not exist in the accounting system. Right now I bring the data from the accounting system into Excel and run a macro that creates two CSV files, one for updating existing accounts and one for inserting new accounts, then use the data loader to import the data in two separate imports (an update and an insert).

I would like to replace these two steps with a single Upsert step, however, I'm stuck on one point. Currently, my 'update' CSV and my 'insert' CSV have different fields b/c while 'update' only needs the record ID and the current account value, in order to insert a new record it is also necessary to provide the account's name and the Client to which the account is linked (both of these are already in the system for the updates). Can I run an upsert where the new records have these fields populated but the existing records do not (and the updates' fields are not overwritten with blank values)? I know that I can just populate all of the existing records' 'Account Name' fields from the accounting system, however, the related Client information does not exist in the accounting system, only in Salesforce.

I'm not sure if I'm asking my question clearly, but what I'm really trying to get at is: Can I include existing and new records in an Upsert where the new records include more field data than the existing records, and those fields on the existing records are not over-written with blank values?

Thanks!

1
  • I'm in the same situation. I get an error: Opportunity ID; id value of incorrect type. This is for the records I want to insert. Based on my external id, these records don't exist in Salesforce.
    – JeffO
    Commented Dec 3, 2015 at 17:09

2 Answers 2

2

I haven't tried this, but according to this site: http://www.interactiveties.com/b_bulk_api_nulls.php

If you use blank values (not #N/A) for the fields in the spread sheet pertaining to updates, then the fields should not get updated for the update records.

If you use this in conjunction with an upsert based on either the id or an external id, then that should help you out.

3
  • Should add, there's also a setting in LexiLoader for "Insert Null Values", so make sure that is unchecked Commented Sep 20, 2012 at 14:30
  • I have used the data loader to intentionally insert blank values in the past (without knowing what the above article said about #N/A) and it did insert blank values, so I'm not sure that what he said in that article is accurate. Commented Sep 20, 2012 at 17:10
  • The linked article only refers to the Bulk API, not the standard API. I don't know, but you could both be right. Commented Sep 20, 2012 at 18:48
0

Have a look at the (free) starter edition of Skyvva this takes a little bit of time to get used to but has some fantastic functionality including

  1. IF statements (we use an if statement that does the lookup and if found use the data in salesforce otherwise use the data in the file to solve the same problem you have).
  2. VLOOKUPS (very similar to Excel)
  3. Chained Interfaces (Upsert Accounts and Contacts using the same file and single load)
  4. Error Handling via Message Board

If you then want to upgrade to their advanced version to be able to schedule it via a small java application then it is easy to reuse the manual load templates.

To get the FREE Starter Edition Now, Just register in the SKYVVA Customer Portal.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .