Data not passing through Salesforce Create Snap

I am trying to build part of a pipeline here which checks salesforce to see if a reqestor (contact) is created. If it is not in Salesforce, it routes to a branch to create the contact. I then want this new contact id inserted back into the pipeline for it to continaue along.

However after the Salesforce Create Snap, it will not pass through the original data, just the data of the new record. So when I use a union snap the original data from this piece of data is blank. I just have the requestor ID, but not any of the original data (see screenshot)

Screen Shot 2021-08-12 at 1.22.20 AM

Any idea how I can easily plug in a new id back to the original pipeline and continue![Screen Shot

@baxterfly I believe you select pass through option in SFDC create snap. In your store request id mapper you can write that expression - $.extend($.get(“original”)).filter((value, key) => key != “original”) . And in target mapper use $.

image

Thanks for the reply Supratim,

However when I select pass through the snap fails. All the extra fields which I want to pass through the snap looks like it is trying to use them (see error). I have not mapped any of these extra fields.

@baxterfly

The “pass through” option will pass the input document of the Salesforce Create Snap to the output view under the original object. And that should resolve your question. But, the Salesforce Create Snap will try to use all the fields that you have in the “Map Requestor” mapper, and it looks like the Contact object in Salesforce does not have the “episodeTitle” field.

If you want to use those extra fields(that currently does not exist in Contact Salesforce object), one workaround can be:

  • Add a Copy Snap before the Salesforce Create Snap. On the first branch of the Copy Snap, in the “Map Requestor” mapper keep only the fields(that exists in Salesforce object) that you need for creating the Contact within the Salesforce.

  • On the second branch of the Copy Snap map the extra fields that actually does not exist in the Salesforce object. After the Salesforce Create Snap you can then join the data, and you will have all the necessary data that you need.

Regards,
Spiro Taleski