/salesforce-pack:salesforce-deploy-integrationfrom salesforce-pack
Deploys Salesforce-connected Node.js apps to Heroku, Vercel, or Cloud Run with JWT auth and secrets management. Covers Heroku Connect setup, Vercel env config, and Cloud Run deployment.
Ships in salesforce-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Deploy Salesforce-connected Node.js applications to Heroku (native SF integration), Vercel, or Cloud Run with JWT authentication and proper secrets management.
Heroku has native Salesforce integration via Heroku Connect (bi-directional data sync).
# Create Heroku app
heroku create my-sf-app
# Set Salesforce credentials as config vars
heroku config:set SF_LOGIN_URL=https://login.salesforce.com
heroku config:set SF_CLIENT_ID=3MVG9...
heroku config:set [email protected]
heroku config:set SF_JWT_KEY="$(cat server.key)"
# Deploy
git push heroku main
# Optional: Add Heroku Connect for bi-directional sync
heroku addons:create herokuconnect:demo
heroku connect:authorize
# Map sObjects: Account, Contact, Opportunity → Postgres tables
# Add Salesforce secrets
vercel env add SF_LOGIN_URL production
vercel env add SF_CLIENT_ID production
vercel env add SF_USERNAME production
vercel env add SF_JWT_KEY production # Paste private key content
# Deploy
vercel --prod
{
"functions": {
"api/**/*.ts": {
"maxDuration": 30
}
}
}
// api/salesforce/accounts.ts — Vercel serverless function
import jsforce from 'jsforce';
export default async function handler(req, res) {
const conn = new jsforce.Connection({
loginUrl: process.env.SF_LOGIN_URL,
});
// JWT auth — no password needed
await conn.authorize({
grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer',
client_id: process.env.SF_CLIENT_ID!,
username: process.env.SF_USERNAME!,
privateKey: process.env.SF_JWT_KEY!,
});
const accounts = await conn.query(
'SELECT Id, Name, Industry FROM Account ORDER BY CreatedDate DESC LIMIT 10'
);
res.json({ accounts: accounts.records });
}
FROM node:20-slim
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
CMD ["npm", "start"]
# Store JWT key in Secret Manager
echo -n "$(cat server.key)" | gcloud secrets create sf-jwt-key --data-file=-
# Build and deploy
gcloud builds submit --tag gcr.io/$PROJECT_ID/sf-service
gcloud run deploy sf-service \
--image gcr.io/$PROJECT_ID/sf-service \
--region us-central1 \
--platform managed \
--set-env-vars SF_LOGIN_URL=https://login.salesforce.com \
--set-env-vars SF_CLIENT_ID=3MVG9... \
--set-env-vars [email protected] \
--set-secrets=SF_JWT_KEY=sf-jwt-key:latest
// health.ts — include in every deployment
export async function healthCheck() {
const conn = new jsforce.Connection({ loginUrl: process.env.SF_LOGIN_URL });
try {
await conn.authorize({ /* JWT params */ });
const limits = await conn.request('/services/data/v59.0/limits/');
const apiRemaining = limits.DailyApiRequests.Remaining;
return {
status: apiRemaining > 1000 ? 'healthy' : 'degraded',
salesforce: {
connected: true,
instance: conn.instanceUrl,
apiRemaining,
},
};
} catch (error: any) {
return {
status: 'unhealthy',
salesforce: { connected: false, error: error.message },
};
}
}
| Issue | Cause | Solution |
|---|---|---|
INVALID_GRANT on deploy | JWT key format issue | Ensure full private key including headers |
| Cold start timeout | Connection + auth on every request | Cache connection or use connection pooling |
| Health check fails | Wrong SF_LOGIN_URL | login.salesforce.com for prod, test.salesforce.com for sandbox |
| Secret not found | Wrong secret name | Verify with platform-specific secret list command |
For event handling, see salesforce-webhooks-events.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
30 skills in this plugin
/salesforce-advanced-troubleshootingApply Salesforce advanced debugging with debug logs, SOQL query plans, and EventLogFile analysis.
Use when standard troubleshooting fails, investigating SOQL performance issues,
or analyzing Apex governor limit violations.
Trigger with phrases like "salesforce hard bug", "salesforce debug log",
"salesforce governor limit", "salesforce query plan", "salesforce deep debug", "SOQL slow".
/salesforce-architecture-variantsChoose and implement Salesforce integration architecture patterns for different scales.
Use when designing new Salesforce integrations, choosing between polling/event-driven/Heroku Connect,
or planning migration paths for Salesforce applications.
Trigger with phrases like "salesforce architecture", "salesforce integration pattern",
"how to structure salesforce integration", "salesforce event-driven", "salesforce Heroku Connect".
/salesforce-ci-integrationConfigure Salesforce CI/CD with GitHub Actions, SFDX deployments, and Apex testing.
Use when setting up automated testing, configuring CI pipelines for metadata deployment,
or integrating Salesforce tests into your build process.
Trigger with phrases like "salesforce CI", "salesforce GitHub Actions",
"salesforce automated tests", "CI salesforce", "sfdx deploy CI".
/salesforce-common-errorsDiagnose and fix Salesforce common errors, SOQL issues, and API exceptions.
Use when encountering Salesforce errors, debugging failed requests,
or troubleshooting integration issues.
Trigger with phrases like "salesforce error", "fix salesforce",
"salesforce not working", "debug salesforce", "SOQL error", "salesforce exception".
/salesforce-core-workflow-aExecute Salesforce CRUD operations on standard sObjects with SOQL and REST API.
Use when creating, reading, updating, or deleting Accounts, Contacts, Leads,
or Opportunities via the Salesforce API.
Trigger with phrases like "salesforce CRUD", "salesforce create record",
"salesforce update account", "salesforce SOQL query", "salesforce REST API".
/salesforce-core-workflow-bExecute Salesforce Bulk API 2.0 and Composite API operations for high-volume data.
Use when importing/exporting large datasets, performing multi-object transactions,
or chaining dependent API calls.
Trigger with phrases like "salesforce bulk API", "salesforce composite",
"salesforce batch", "salesforce mass import", "salesforce large data".
npx claudepluginhub flight505/skill-forge --plugin salesforce-packOther plugins' skills for the same job