cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Data not passing through Salesforce Create Snap

baxterfly
New Contributor

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

Screen Shot 2021-08-12 at 1.22.27 AM

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

3 REPLIES 3

Supratim
Contributor III

@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

baxterfly
New Contributor

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.

Screen Shot 2021-08-12 at 10.55.40 AM

Screen Shot 2021-08-12 at 10.56.18 AM

@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