Skip to main content

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​

NameReferenceTypeRequiredDefaultOptionsDescription
Access TokenSALESFORCE_ACCESS_TOKENPasswordβž–--The token used to authenticate with Salesforce.
Domain URLSALESFORCE_DOMAINAlphanumericβœ…--Your Salesforce domain URL. Typically is before .my.salesforce.com
UsernameSALESFORCE_USERNAMEAlphanumericβž–--Your Salesforce login username.
PasswordSALESFORCE_PASSWORDPasswordβž–--Your Salesforce account password.
Security TokenSALESFORCE_SECURITY_TOKENPasswordβž–--Additional security token for Salesforce access.
Consumer KeySALESFORCE_CONSUMER_KEYAlphanumericβž–--Key from your Salesforce connected app.
Consumer SecretSALESFORCE_CONSUMER_SECRETPasswordβž–--Secret associated with the consumer key.
Object TypeSALESFORCE_OBJECT_TYPEAlphanumericβœ…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 TypeSALESFORCE_SOURCE_MATCH_TYPESelectβœ…exact_matchExact: 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 LocationSALESFORCE_SOURCE_FOLDER_NAMEAlphanumericβœ….-Directory where your data files are stored.
Data Filename or PatternSALESFORCE_SOURCE_FILE_NAMEAlphanumericβœ…--Exact name or pattern to identify files for import.
ActionSALESFORCE_IMPORT_OPERATIONSelectβœ…insertInsert: insert

Upsert: upsert

Update: update

Delete: delete

Choose to add new data or update existing data.
Unique ID Field (if updating)SALESFORCE_ID_FIELDAlphanumericβž–--The field that uniquely identifies a record for updates.

YAML​

Below is the YAML template for this Blueprint and can be used in the Fleet YAML Editor.

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