Help get this topic noticed by sharing it on Twitter, Facebook, or email.

DBamp UPSERT question

Hello, Is there a way to utilize the Salesforce UPSERT function via DBamp to ONLY update values that are null within Salesforce? For example, if I have firstname, lastname populated in Salesforce, as well as a foreign key for the upsert, but have City and state as null, could the upsert function look at a data set, and not update Firstname/lastname, and only update City and state? In addition to creating ALL fields where the key doesn't match - FirstName, LastName, City, State? Or will I need to do a separate update and insert function
1 person has
this question
+1
Reply
  • When it comes to upsert, you have to pass an External Id field that Salesforce uses to see if the record exists or not in the object up on SF. If the record exists (meaning a given External Id field value matches a record up on SF) then it turns into an update for that given record. If not, it turns into an insert.

    Salesforce and DBAmp do not have a way to look at specific fields, see if they are null or not and do different updates/inserts based on that. The way you specify the data in the input table is the way DBAmp will send the data, and the way Salesforce will update/insert that data into the object up on SF. Therefore, you would need to prepare the input table in advance of the upsert the way the data needs to be inserted/updated upon the command being run.

    Let me know if that does not make sense or answer your question.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned

  • Hi Justin - Thanks for the response! So it's safe to assume, that if I want Firsname/Lastname to be created on the insert portion, they are no matter what going to be updated in Salesforce on the update portion, assuming the ExternalID matches?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited

  • Correct, whatever data is for FirstName/LastName in the input table for a given record will be either updated or inserted into that object based on the External Id matching or not.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited