Skip to main content

Salesforce - CSV Header Validator

Overview​

Before you begin, ensure you're equipped with the essentials:

1. Inputs Ready​

To use this blueprint, you'll need:

  • Salesforce Credentials:
    • Access token
    • Consumer key
    • Consumer secret
    • Username
    • Password
    • Security token
    • Domain
  • CSV File: Path to the CSV you want to validate.
  • Object Type: Salesforce object type (e.g., Account, Contact) to validate against.
  • Field Names: List of expected field names.

2. Understanding the Blueprint Flow​

  • After providing the inputs, the blueprint authenticates with Salesforce.
  • It fetches properties of the Salesforce object type.
  • If a CSV is provided, it validates its headers against Salesforce properties. If any mismatches are found, it'll highlight them.
  • Without a CSV, it displays the Salesforce object type's properties.

3. Salesforce Properties Insight​

The blueprint offers insights into Salesforce properties. For each property, you get:

  • Name
  • Label
  • Data type
  • Attributes: Creatable, Updateable, Nillable, Unique status.

4. Error Handling​

The blueprint has built-in error handling. If issues arise (like authentication errors or file not found), it provides clear feedback.

5. Maximizing Blueprint Utility​

While its primary function is CSV header validation, it also helps you understand Salesforce properties. This understanding is key to structuring your CSVs effectively for future transfers.

In short, this blueprint ensures your CSV data aligns with Salesforce, paving the way for smooth data transfers.

Variables​

NameReferenceTypeRequiredDefaultOptionsDescription
Domain URLSALESFORCE_DOMAINAlphanumericβœ…--The domain used to access your Salesforce instance.
Access TokenSALESFORCE_ACCESS_TOKENPasswordβž–--Token provided by Salesforce to securely authenticate and access their API.
Consumer KeySALESFORCE_CONSUMER_KEYAlphanumericβž–--Unique key to identify and authenticate your application's integration.
Consumer SecretSALESFORCE_CONSUMER_SECRETPasswordβž–--Secret key used in tandem with the consumer key to authenticate your application.
UsernameSALESFORCE_USERNAMEAlphanumericβž–--Your Salesforce account's username.
PasswordSALESFORCE_PASSWORDPasswordβž–--Your Salesforce account's password.
Security TokenSALESFORCE_SECURITY_TOKENPasswordβž–--Additional security token provided by Salesforce to enhance protection.
CSV FilenameSALESFORCE_CSV_FILEAlphanumericβž–--The name/path of the CSV file you want to validate against Salesforce properties.
Object TypeSALESFORCE_OBJECT_TYPEAlphanumericβœ…--The specific Salesforce object type (e.g., Account, Customer) you want to validate against. This name must match Salesforce's API Name from their object manager view.

YAML​

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

source:
blueprint: Salesforce - CSV Header Validator
inputs:
SALESFORCE_DOMAIN: null ## REQUIRED
SALESFORCE_ACCESS_TOKEN: null
SALESFORCE_CONSUMER_KEY: null
SALESFORCE_CONSUMER_SECRET: null
SALESFORCE_USERNAME: null
SALESFORCE_PASSWORD: null
SALESFORCE_SECURITY_TOKEN: null
SALESFORCE_CSV_FILE: null
SALESFORCE_OBJECT_TYPE: null ## REQUIRED
type: BLUEPRINT
guardrails:
retry_count: 1
retry_wait: 0h0m0s
runtime_cutoff: 1h0m0s
exclude_exit_code_ranges:
- '102'
- '103'
- '201'
- '202'
- '206'