04-08-2021 08:56 AM
Hi there,
I am trying to access the newly created record Id by in a Mapper Snap based on the information that is collected in a Salesforce Poller Snap. Unfortunately when I try to stipulate Id it refers to a previous variable used to map some data. I’ve even added a File Reaser and CSV Parser Snap to get access but this doesn’t seem to do the trick.
Solved! Go to Solution.
04-15-2021 07:40 AM
Are you using Salesforce Create Snap with Bulk API or REST API?
If you are using the Bulk API then you should place Salesforce Poller Snap after the Salesforce Create Snap. The Salesforce Poller Snap will read the job submitted to Salesforce, and will return the details(id,name etc) of the created records. Then you can place Mapper Snap and get the required fields($Id,$Name etc).
If you are using Salesforce Create with REST API, then you will get the details for each of the created record at the output. Using the Mapper Snap you can get the required fields as well($Id,$Name).
Regards,
Spiro Taleski
04-08-2021 09:06 AM
File reader would read the information in an uploaded file so I’m not sure it would be any vaulue to you here.
If the pipeline is validated and you are in the Mapper, you should see the input schema and be able to review the schema to see what it is called. The name may have changed from Id if you are joining it with an additional dataset through the Union Snap.
04-09-2021 05:49 AM
The input schema for the output file does not appear as the pipeline hasn’t been executed. See reference on the Salesforce Poller documentation: https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1439214/Salesforce+Poller
Is there a way then to preempt the creation of the record id and capture it in a variable?
04-14-2021 04:47 AM
So I know this is possible because I’ve seen a view SnapLogic youtube videos where a Mapper snap is used to capture output data from Salesforce Create Snaps but unfortunately the demos never explain or expose the Mapper details.
I just want to be able to grab the newly created record Id generated by a Salesforce Create Snap so I can relate it to the creation of child records.
04-15-2021 02:07 AM
So I’m persisting here!
I’ve gone down the route of adding a Salesforce Lookup Snap after a Salesforce Create one and although they are validated, the Lookup Snap isn’t passing the returned Id through to the Mapper:
Instead all I get is the URL, JobId and BatchId which is the output of the Salesforce Create Snap.
I know the Salesforce Lookup Snap works because I’ve been able to successfully return and map Id’s in previous Snaps:
The ‘Map Content’ Snap is to take the newly created record Id (a Parent record) and relate it to 6 documents (x6 Child records).
Any ideas?