Breadcrumbs

Salesforce - Upload Data

Overview

## Preparation: 1. **Salesforce Credentials:** Ensure you have your Salesforce login details at hand, including the access token, domain, username, password, security token, consumer key, and consumer secret. These are essential for securely connecting to your Salesforce account. 2. **Identify Your Data Files:** Know the exact location and names of the files you wish to transfer. These could be in formats like CSV or Excel. 3. **Choose Your Action:** Decide whether you're looking to add new entries to Salesforce or update existing ones. If updating, take note of the unique ID field for the records, which ensures the right data gets updated. 4. **Specify a Salesforce Object:** Identify the type of Salesforce object (e.g., "Account") you aim to populate or update with your data.

Variables

Name

Reference

Type

Required

Default

Options

Description

Access Token

SALESFORCE_ACCESS_TOKEN

Password

-

-

The token used to authenticate with Salesforce.

Domain URL

SALESFORCE_DOMAIN

Alphanumeric

-

-

Your Salesforce domain URL. Typically is before .my.salesforce.com

Username

SALESFORCE_USERNAME

Alphanumeric

-

-

Your Salesforce login username.

Password

SALESFORCE_PASSWORD

Password

-

-

Your Salesforce account password.

Security Token

SALESFORCE_SECURITY_TOKEN

Password

-

-

Additional security token for Salesforce access.

Consumer Key

SALESFORCE_CONSUMER_KEY

Alphanumeric

-

-

Key from your Salesforce connected app.

Consumer Secret

SALESFORCE_CONSUMER_SECRET

Password

-

-

Secret associated with the consumer key.

Object Type

SALESFORCE_OBJECT_TYPE

Alphanumeric

Account

-

The type of Salesforce record you're updating. For example Account, Opportunity, Customer, etc. This name must match Salesforce's API Name from their object manager view.

Search Type

SALESFORCE_SOURCE_MATCH_TYPE

Select

exact_match

Exact: exact_match

REGEX: regex_match

Method for matching the source file name. Choose 'Exact' for exact names or 'Regex' for regular expression patterns.

Data File Location

SALESFORCE_SOURCE_FOLDER_NAME

Alphanumeric

.

-

Directory where your data files are stored.

Data Filename or Pattern

SALESFORCE_SOURCE_FILE_NAME

Alphanumeric

-

-

Exact name or pattern to identify files for import.

Action

SALESFORCE_IMPORT_OPERATION

Select

insert

Insert: insert

Upsert: upsert

Update: update

Delete: delete

Choose to add new data or update existing data.

Unique ID Field (if updating)

SALESFORCE_ID_FIELD

Alphanumeric

-

-

The field that uniquely identifies a record for updates.

YAML

Below is the YAML template

YAML

source:
  template: Salesforce - Upload Data
  inputs:
    SALESFORCE_ACCESS_TOKEN:
    SALESFORCE_DOMAIN:
    SALESFORCE_USERNAME:
    SALESFORCE_PASSWORD:
    SALESFORCE_SECURITY_TOKEN:
    SALESFORCE_CONSUMER_KEY:
    SALESFORCE_CONSUMER_SECRET:
    SALESFORCE_OBJECT_TYPE: Account
    SALESFORCE_SOURCE_MATCH_TYPE: exact_match
    SALESFORCE_SOURCE_FOLDER_NAME: .
    SALESFORCE_SOURCE_FILE_NAME:
    SALESFORCE_IMPORT_OPERATION: insert
    SALESFORCE_ID_FIELD:
  type: TEMPLATE
guardrails:
  retry_count: 1
  retry_wait: 0h0m0s
  runtime_cutoff: 1h0m0s
  exclude_exit_code_ranges:
    - 102
    - 103
    - 106
    - 201
    - 202
    - 206