On this Page

Scenario

I want to insert records into the Salesforce object through SnapLogic. 

Requirements

Snaps Used

For this scenario, the following Snaps are used:

Other Requirements


Configuration

This simplified pipeline reads a file from the SnapLogic Database, creates a base-64 encoded ASCII string of the file and attaches it using the Salesforce Create Snap.

  1. Add a File Reader Snap to read the file you want to attach. In this case, the file we are using is a JSON file with the following format:

    [
      {
        "nodes": {},
        "org": "org_name",
        "SnapPacks": [...],
        "Subscriptions": null,
        "SF_ID": ""
      },
    ...
    ]

    where SF_ID corresponds to the Salesforce ID associated with a customer.

  2. A JSON Parser is added to parse the JSON for use within SnapLogic.
  3. Add a Mapper Snap to base-64 encode the file and supply required fields to Salesforce. Configure the following Expression/Target path pairs:
  4. Add a Salesforce Create.

The pipeline could end here. In this example, we added a JSON Formatter and File Writer to both the output and error views to capture what is written out and save it to a file for troubleshooting purposes.