{"schemaVersion":1,"resourceType":"connector","slug":"salesforce","name":"Salesforce","catalog":"salesforce","description":"Salesforce CRM as SQL: SOQL pushdown, Bulk API 2.0, describe-typed objects and a free ID toolkit","language":"TypeScript","categories":["business"],"repository":"https://github.com/Query-farm/vgi-salesforce","license":"0BSD","generatedAt":"2026-12-01T18:22:16+00:00","runtime":{"engineVersion":"2.0.1","protocolVersion":"3.4"},"release":{"tag":"v0.2.0","publishedAt":"2026-11-25T18:19:52Z","url":"https://github.com/Query-farm/vgi-salesforce/releases/tag/v0.2.0"},"links":{"html":"https://query.farm/products/orchard/connectors/salesforce/","llms":"https://query.farm/products/orchard/connectors/salesforce/llms.txt","markdown":"https://query.farm/products/orchard/connectors/salesforce/index.md","json":"https://query.farm/products/orchard/api/v1/connectors/salesforce.json","objects":"https://query.farm/products/orchard/api/v1/connectors/salesforce/objects.json","search":"https://query.farm/products/orchard/api/v1/search.json?kind=object&connector=salesforce&q={query}"},"authentication":{"mode":"required","guidance":"Supply your own service credentials or required connection options before querying protected data.","interpretation":"Secret parameter required flags describe the upstream declaration; they do not override the service-level mode above. Keep secrets in environment variables or the deployment secret store. SQL values in angle brackets are placeholders, not automatic environment lookups. Native DuckDB and Haybarn 2.0.1 do not provide a SQL getenv() function, even when worker-supplied snippets mention it. Read environment variables in your application and pass credential values through client parameter bindings (for example, Python con.execute(\"CREATE SECRET stripe (TYPE stripe, api_key ?)\", [os.environ[\"STRIPE_API_KEY\"]]) after attaching the connector. Omit unused optional parameters and keep real values out of saved SQL and logs.","secrets":[{"type":"salesforce","description":"Salesforce org (instance_url) plus OAuth: JWT bearer (client_id + username + private_key), client credentials (client_id + client_secret), refresh token, or a pre-issued access_token. Username/password is not supported.","documentation":"https://github.com/Query-farm/vgi-salesforce#connect-an-org","parameters":[{"name":"instance_url","type":"VARCHAR","required":false,"redact":false,"description":"The org's My Domain URL, e.g. https://acme.my.salesforce.com (http:// only for 127.0.0.1/localhost)."},{"name":"login_url","type":"VARCHAR","required":false,"redact":false,"description":"OAuth host for JWT bearer / refresh token: https://login.salesforce.com (default) or https://test.salesforce.com for sandboxes."},{"name":"api_version","type":"VARCHAR","required":false,"redact":false,"description":"REST API version to pin, e.g. '64.0' (the default)."},{"name":"client_id","type":"VARCHAR","required":false,"redact":false,"description":"Connected app consumer key."},{"name":"username","type":"VARCHAR","required":false,"redact":false,"description":"JWT bearer: the Salesforce username to act as (the integration user)."},{"name":"private_key","type":"VARCHAR","required":false,"redact":true,"description":"JWT bearer: the connected app certificate's RSA private key (PEM)."},{"name":"client_secret","type":"VARCHAR","required":false,"redact":true,"description":"Client credentials (or refresh token) flow: the consumer secret."},{"name":"refresh_token","type":"VARCHAR","required":false,"redact":true,"description":"Refresh token flow: an OAuth refresh token for the connected app."},{"name":"access_token","type":"VARCHAR","required":false,"redact":true,"description":"A pre-issued session/access token (not refreshed; for quick tests)."}],"requiredBy":["soql","query_object","describe_fields","updated_ids","deleted_ids","record","lookup","picklist_values"],"createSql":"CREATE SECRET salesforce (\n    TYPE salesforce,\n    instance_url  '<instance_url>',\n    login_url     '<login_url>',\n    api_version   '<api_version>',\n    client_id     '<client_id>',\n    username      '<username>',\n    private_key   '<PRIVATE_KEY>',  -- secret\n    client_secret '<SALESFORCE_CLIENT_SECRET>',  -- secret\n    refresh_token '<REFRESH_TOKEN>',  -- secret\n    access_token  '<ACCESS_TOKEN>'  -- secret\n);"}]},"deployment":{"local":{"methods":[{"id":"github","label":"From GitHub","icon":"simple-icons:github","steps":[{"title":"Attach the release directly","description":"Downloads the latest release for your platform and caches it locally.","lang":"sql","code":"ATTACH 'salesforce' AS salesforce (\n  TYPE vgi,\n  LOCATION 'github-auto://Query-farm/vgi-salesforce'\n);"}]},{"id":"docker","label":"Docker","icon":"simple-icons:docker","steps":[{"title":"Attach the signed image","description":"Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.","lang":"sql","code":"ATTACH 'salesforce' AS salesforce (\n  TYPE vgi,\n  LOCATION 'oci://ghcr.io/query-farm/vgi-salesforce:0.2.0'\n);"}]}],"pinnedMethods":[{"id":"github","label":"From GitHub","icon":"simple-icons:github","steps":[{"title":"Attach the release directly","description":"Uses the verified release each time you attach the connector.","lang":"sql","code":"ATTACH 'salesforce' AS salesforce (\n  TYPE vgi,\n  LOCATION 'github-auto://Query-farm/vgi-salesforce@v0.2.0'\n);"}]},{"id":"docker","label":"Docker","icon":"simple-icons:docker","steps":[{"title":"Attach the signed image","description":"Needs Docker, Podman or another OCI runtime. The extension runs the container and talks to it over stdio.","lang":"sql","code":"ATTACH 'salesforce' AS salesforce (\n  TYPE vgi,\n  LOCATION 'oci://ghcr.io/query-farm/vgi-salesforce:0.2.0'\n);"}]}]},"selfHost":{"instructions":"https://github.com/Query-farm/vgi-salesforce","connectionGuide":"https://query.farm/vgi/connect-to-a-worker/","guidance":"Deploy using the connector repository instructions and use its supported HTTP or SSH transport. Replace example URLs with your actual deployment; configure its authentication."},"queryFarm":{"available":true,"console":"https://auth.queryfarm.cloud/console/new?worker=salesforce","organizationMonthlyMinimumUsd":10,"pricing":"https://query.farm/products/orchard/hosted/"},"publicDemo":null},"setup":{"extensions":{"duckdb":"SET allow_extension_repositories = 'allowed';\n\nCREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm\n    WITH PREFIX 'https://duckdb-extensions.query.farm';\n\nINSTALL vgi FROM query_farm;\nLOAD vgi FROM query_farm;","haybarn":"INSTALL vgi FROM community;\nLOAD vgi;"},"attachSql":"ATTACH 'salesforce' AS salesforce (\n  TYPE vgi,\n  LOCATION 'github-auto://Query-farm/vgi-salesforce'\n);","attachOptions":[{"name":"objects","type":"VARCHAR","description":"Comma-separated object API names to expose as sobjects.<Object> views, e.g. 'Account,Contact,Opportunity,Invoice__c'. Empty (the default) gives the functions and meta tables only; browse meta.objects, then re-attach.","required":false,"default":""},{"name":"quota_guard_pct","type":"INTEGER","description":"Fail a scan before an API call once the org's daily API usage (Sforce-Limit-Info) reaches this percentage (1-100).","required":false,"default":"80"},{"name":"state_dir","type":"VARCHAR","description":"Directory for the Bulk/REST scan journal used by resume := true and meta.jobs (default $XDG_STATE_HOME/vgi-salesforce).","required":false,"default":""}],"note":"Install and load VGI, attach the connector using the catalog alias shown here, then create required secrets. Replace placeholders and omit unused optional secret parameters. Satisfy file, network and credential prerequisites before executing a query."},"example":{"title":"Compare sales pipeline value by stage","sql":"SELECT stage_name, deals, total FROM salesforce.main.soql('SELECT StageName, COUNT(Id) deals, SUM(Amount) total FROM Opportunity GROUP BY StageName') WHERE deals > 1 ORDER BY total DESC","requiresCredentials":true,"note":null,"objects":[{"name":"salesforce.main.soql","kind":"table_function","links":{"html":"https://query.farm/products/orchard/connectors/salesforce/#obj-main-soql","markdown":"https://query.farm/products/orchard/connectors/salesforce/objects/table_function.bWFpbg.c29xbA.md","json":"https://query.farm/products/orchard/api/v1/connectors/salesforce/objects/table_function.bWFpbg.c29xbA.json"}}],"evidence":{"status":"not_captured","note":"No executed result is recorded for this exact example. Catalog verification does not establish that this query ran."},"artifact":null},"objects":{"total":24,"index":"https://query.farm/products/orchard/api/v1/connectors/salesforce/objects.json","search":"https://query.farm/products/orchard/api/v1/search.json?kind=object&connector=salesforce&q={query}"},"agentTasks":["Using the salesforce worker, convert the 15-character Salesforce id 001Dn00000AbCdE to its 18-character case-safe form.","Using the salesforce worker, which of these values are valid Salesforce ids: '001Dn00000AbCdEIAV', '001Dn00000AbCdEAAA', 'n/a'? Return each value with true or false.","Using the salesforce worker, which standard Salesforce object does the id 00QDn000001aBcD belong to, and what is its key prefix and 15-character form?","Using the salesforce worker, build a SOQL condition LastName = <value> for the last name O'Brien, quoted safely.","What is the total open (not closed) opportunity amount per stage in the connected Salesforce org?","Using SOQL through the salesforce worker, count the won opportunities and their total amount.","For each Salesforce task whose WhatId is an opportunity, list the task subject with the opportunity's name, and also give the raw record JSON's StageName.","List the picklist values of the Opportunity StageName field, both from the per-field function and from the attached objects' metadata table."],"provenance":{"generatedAt":"2026-12-01T18:22:16+00:00","repository":"https://github.com/Query-farm/vgi-salesforce","harvest":{"status":"ok","method":"github-auto","error":null,"vgi_version":"9773130dde"},"catalogVerification":{"verified":true,"status":"passed","total":6,"passed":6,"failed":0,"needs_credentials":0,"location":"github-auto://Query-farm/vgi-salesforce@v0.2.0","transport":"github-auto","environment":{"vgi_extension_version":"9773130dde","haybarn_version":"2.0.1rc3","engine_version":"v2.0.1","python":"3.12.4","platform":"darwin_arm64","protocol_version":"3.4.0"},"checked_at":"2026-12-01T06:17:04+00:00"},"interpretation":"Catalog verification records the harvest environment. It is not proof that every query or current live API call succeeds. Only an example with captured_result has a saved result for that exact SQL."},"interpretation":["Missing, null, or undeclared metadata means unknown; do not invent defaults, credential scope, platform support or endpoint URLs.","Search is keyword retrieval, not proof of a capability. Read the exact object declaration before generating SQL.","A table and a table function can have the same name. Preserve parentheses and use the matching overload and schema.","Service credentials, external data availability and deployment authentication are separate requirements."]}