salesforce-setup

Configure Salesforce API credentials via CLI OAuth and store them in a protected .env file.

1|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/al-stev/field-eng-skills --skill salesforce-setup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: salesforce-setup
Source: https://github.com/al-stev/field-eng-skills/tree/main/.claude/skills/salesforce-setup
Command: npx skills add https://github.com/al-stev/field-eng-skills --skill salesforce-setup

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Many W&B automation skills require Salesforce API access, but W&B uses SSO and OAuth which makes obtaining and securely storing API tokens non-trivial. This Skill documents and automates the one-time process to obtain a valid access token and instance URL and to store them safely so other skills can query and update Salesforce without manual copy-paste.

Core Features & Use Cases

  • Salesforce CLI OAuth: Guides users through using the Salesforce CLI to perform browser-based OAuth for SSO and 2FA environments.
  • Secure credential storage: Instructs how to save SFDC_SESSION_ID and SFDC_INSTANCE into a locked ~/.fe-skills/.env file with correct permissions.
  • Verification & discovery: Provides commands to verify connectivity and discover custom field API names via included Python scripts.
  • Troubleshooting & refresh: Explains common errors (INVALID_SESSION_ID, missing sf CLI) and how to refresh tokens safely.
  • Use Case: Prepare credentials once so the /salesforce and /customer-setup skills can programmatically populate and query account data.

Quick Start

Authenticate with the Salesforce CLI, copy accessToken and instanceUrl from sf org display, and add SFDC_SESSION_ID and SFDC_INSTANCE to ~/.fe-skills/.env with permissions set to 600.

Frequently Asked Questions about salesforce-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Salesforce API credentials for an SSO org?

You can configure Salesforce API access for SSO environments by using the Salesforce CLI for browser-based OAuth, extracting the accessToken and instanceUrl, and saving them to a locked environment file.

Why do I get an INVALID_SESSION_ID error when querying Salesforce?

An INVALID_SESSION_ID error means your Salesforce access token expired or is missing. Refresh your token by re-authenticating with the Salesforce CLI and updating your stored credentials.

Do I need the Salesforce CLI to authenticate with SSO and 2FA?

Yes, the Salesforce CLI is required to handle the browser-based OAuth flow for SSO and 2FA environments, generating the access token needed for programmatic API access.

Where should I securely store SFDC_SESSION_ID and SFDC_INSTANCE credentials?

Store SFDC_SESSION_ID and SFDC_INSTANCE credentials in a locked ~/.fe-skills/.env file with permissions set to 600, ensuring secure access for automated workflows and API queries.

How can I verify Salesforce API connectivity and discover custom field names?

Verify Salesforce API connectivity and discover custom field API names by running the included Python verification scripts after successfully configuring your credentials in the environment file.

What can I do after configuring Salesforce API access for automated workflows?

After configuring Salesforce API access, you can programmatically populate customer registries, query account data, and perform automated updates using compatible automation skills.