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

How to access Record Id after Salesforce Create Snap

NAl
Contributor

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.

Screen Shot 2021-04-08 at 2.27.00 PM

1 ACCEPTED SOLUTION

SpiroTaleski
Valued Contributor

@NAl

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

View solution in original post

6 REPLIES 6

dmiller
Admin Admin
Admin

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.


Diane Miller
Community Manager

NAl
Contributor

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

Screen Shot 2021-04-09 at 1.33.12 PM

Is there a way then to preempt the creation of the record id and capture it in a variable?

NAl
Contributor

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.

NAl
Contributor

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:

Screen Shot 2021-04-15 at 9.59.59 AM

Screen Shot 2021-04-15 at 10.00.06 AM

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:

Screen Shot 2021-04-15 at 10.00.35 AM

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?