Version 2.3.2 · free for 48 hours from the first installationDownload →
AISprintFlow

Connecting Salesforce#

This guide connects AI SprintFlow to a Salesforce org, step by step. When you are done you will have:

  • an integration user that AI SprintFlow signs in as, with only the access it needs;
  • an External Client App in Salesforce that lets AI SprintFlow sign in;
  • the Salesforce connection in AI SprintFlow (Salesforce workspace → Connections → Salesforce), tested;
  • your Salesforce ticket sources: Agile Accelerator, Service Cloud Cases and/or DevOps Center;
  • optionally, Salesforce code validation: a check-only deploy with your Apex tests before every pull request.

Allow 20-30 minutes. You need a Salesforce administrator for the steps in Salesforce, and an AI SprintFlow admin for the steps in AI SprintFlow.

External Client Apps, not Connected Apps. Since Spring '26, Salesforce no longer lets you create new Connected Apps; their successor is the External Client App (Setup → External Client App Manager). This guide uses External Client Apps. An existing Connected App keeps working with AI SprintFlow - the consumer key, secret and certificate are used the same way.


1. Choose the org and its address#

  • Use a sandbox first. Connect a sandbox (Developer or Full) while you try AI SprintFlow out; code validation in particular should always run against a sandbox.
  • Find the org's My Domain URL: Setup → My Domain. It looks like
  • production: https://acme.my.salesforce.com
  • sandbox: https://acme--uat.sandbox.my.salesforce.com

The login URL you enter in AI SprintFlow is one of:

Org Login URL
Production or Developer Edition https://login.salesforce.com or the My Domain URL
Sandbox https://test.salesforce.com or the sandbox's My Domain URL
Client credentials sign-in (any org) the My Domain URL - required for this flow

2. Create the integration user#

AI SprintFlow should sign in as its own user - never as a person - so its access can be limited and audited, and so it keeps working when people leave.

  1. Setup → Users → New User.
  2. User License: Salesforce Integration. Profile: Minimum Access - API Only Integrations. (Enterprise, Unlimited and Performance editions include a few Salesforce Integration licenses. If yours has none left, use a standard Salesforce license with a minimal profile.)
  3. Name it clearly, for example AI SprintFlow Integration, with a username such as sprintflow@acme.com.uat, and an e-mail address your team reads.
  4. Save. On the user, under Permission Set License Assignments, assign Salesforce API Integration.

3. Give it access: a permission set#

Create one permission set, for example AI SprintFlow Integration (Setup → Permission Sets → New), assign it to the integration user, and switch on what you use:

Always

  • System permission API Enabled.
  • The ability to create Salesforce Files: AI SprintFlow attaches the proof video and screenshots to the record as files visible to internal users only. If the user cannot, the run notes it and carries on (the proof stays in AI SprintFlow and the pull request).

Agile Accelerator (managed package, namespace agf__)

  • The package's own user permission set, if your org uses one - or object permissions:
  • Work (agf__ADM_Work__c): Read, Create, Edit (Create is used only when a story is split into smaller ones).
  • Sprint, Scrum Team, Product Tag, Epic: Read.
  • Field-level access (Read and Edit) to Subject, Details, Status, Story Points, Assignee and Sprint.
  • Chatter must be on for the org (comments are Chatter posts on the work record).

Service Cloud Cases

  • Case: Read, Edit. Field access to Subject, Description, Status, Priority, Type.
  • Email Messages: Read (so the customer's e-mails are part of the ticket).
  • If cases come from a queue, add the integration user to that queue.
  • AI SprintFlow only ever writes private case comments and never reads contact details. A comment only counts as approval of a checkpoint when it is private.
  • Case status: a case moves to Working when AI SprintFlow starts on it. Name your own statuses per source (Status when work starts, Status when the pull request is ready - e.g. a status your org added for review), or untick Update the ticket's status to leave case statuses to the support team.

DevOps Center (managed package, namespace sf_devops__)

  • Assign the DevOps Center permission set that comes with the package (it grants access to Work Items).
  • AI SprintFlow's Test on the Salesforce card names any Work Item field it cannot see.

Salesforce code validation (only if you switch it on - and only in a sandbox)

  • Modify Metadata Through Metadata API Functions and Author Apex (to compile the change and run Apex tests).
  • Some metadata types need more. If the validation reports insufficient access, the simplest fix in a sandbox is to give the integration user the System Administrator profile there. Nothing is ever deployed: every check is check-only.

4. Create the External Client App#

  1. Setup → search External Client App Manager → New External Client App.
  2. External Client App Name: AI SprintFlow. Contact Email: your team's address. Distribution State: Local.
  3. Expand API (Enable OAuth Settings) and select Enable OAuth.
  4. Callback URL: - for Sign in with Salesforce (section 5c): the URL AI SprintFlow shows under the Salesforce card's one-time setup, for the desktop app http://127.0.0.1:8700/api/salesforce/oauth/callback; - for the other sign-ins, any HTTPS URL - it is not used (for example https://login.salesforce.com/services/oauth2/success).
  5. OAuth Scopes: add Manage user data via APIs (api). For Sign in with Salesforce also add Perform requests at any time (refresh_token, offline_access).
  6. Under Flow Enablement, tick the one flow you use (section 5) and Save.

5. Choose how AI SprintFlow signs in#

Sign-in Best for What AI SprintFlow stores
a. JWT bearer (recommended) Production and shared installations consumer key, username, private key
b. Client credentials Simple server-to-server set-up consumer key and secret
c. Sign in with Salesforce Trying it out, a person's own install consumer key (secret optional), refresh token
d. Username + password (legacy) Old orgs that still allow it consumer key and secret, username, password, security token
e. Access token A five-minute trial the token (it expires with the session)

Every secret is stored encrypted and never shown again; the screen shows only its last four characters.

No password and no long-lived token is stored; the private key never leaves AI SprintFlow.

Step 1 - make a key and certificate. On any computer with OpenSSL (on Windows, Git Bash includes it):

openssl req -x509 -sha256 -nodes -days 730 -newkey rsa:2048 -keyout sprintflow.key -out sprintflow.crt -subj "/CN=AI SprintFlow"

sprintflow.key is the private key (keep it secret); sprintflow.crt is the certificate for Salesforce. Set a reminder to renew the certificate before it expires in two years.

Step 2 - give Salesforce the certificate. In the External Client App: Flow Enablement → Enable JWT Bearer Flow, upload sprintflow.crt, save.

Step 3 - pre-authorize the integration user. Policies tab → Edit → OAuth Policies: Permitted Users = Admin approved users are pre-authorized, then under Select Permission Sets add AI SprintFlow Integration (the permission set from section 3). Save.

Step 4 - enter it in AI SprintFlow. Salesforce card: Sign-in JWT bearer, the login URL, the Consumer key (section 6), the integration user's username, and the whole contents of sprintflow.key in Private key (PEM) (from -----BEGIN PRIVATE KEY----- to -----END PRIVATE KEY-----). Keys with a passphrase are not supported.

b. Client credentials#

  1. In the External Client App: Flow Enablement → Enable Client Credentials Flow (confirm the dialog), save.
  2. Policies tab → Edit → OAuth Flows and External Client App Enhancements: make sure Enable Client Credentials Flow is ticked and set Run As to the integration user. Save.
  3. In AI SprintFlow: Sign-in Client credentials, the My Domain URL as the login URL (not login.salesforce.com), the Consumer key and Consumer secret (section 6).

Anyone with the key and secret can sign in as the integration user: keep them in AI SprintFlow only, and rotate the secret from time to time (Settings tab → OAuth Settings → Consumer Key and Secret).

c. Sign in with Salesforce#

  1. In the External Client App: the Callback URL AI SprintFlow shows (section 4), the scopes api and refresh_token, offline_access, and tick Require Proof Key for Code Exchange (PKCE). If you also tick Require secret for Web Server Flow, enter the consumer secret in AI SprintFlow as well.
  2. Policies tab → Refresh Token Policy: Refresh token is valid until revoked. Permitted Users: either self-authorize, or pre-authorize the integration user's permission set.
  3. In AI SprintFlow: Sign-in Sign in with Salesforce, the login URL, the Consumer key, Save, then Sign in with Salesforce - and sign in as the integration user, not as yourself.

d. Username and password (legacy)#

External Client Apps do not support this flow, orgs created since Summer '23 block it, and Salesforce is retiring it. Use it only with an existing Connected App in an org that still allows it (Setup → OAuth and OpenID Connect Settings → Allow OAuth Username-Password Flows). The security token comes from the integration user's Settings → Reset My Security Token. Prefer JWT bearer.

e. Access token (trial only)#

With the Salesforce CLI signed in to the org: sf org display --target-org <alias> --verbose shows an Access Token and the Instance Url. Paste both. The token expires when the session does; switch to JWT bearer for real use.

6. Get the consumer key (and secret)#

In the External Client App: Settings tab → OAuth Settings → Consumer Key and Secret. Salesforce may send you a verification code first. Copy the Consumer Key (and the Consumer Secret for client credentials, and for Sign in with Salesforce if you required it).

7. Connect and test in AI SprintFlow#

  1. Switch to the Salesforce workspace (sidebar, top) → Connections → Salesforce.
  2. Fill in the sign-in you chose, Save, then Test.
  3. Test signs in and reports: - who it is signed in as, and the org; - which of Agile Accelerator, DevOps Center and Service Cloud Cases the integration user can see; - how many API calls are left today.

The Source code host on the same page is this workspace's own: the repository where the Salesforce code lives (an SFDX project) and its token or sign-in. Salesforce tickets are done there; AI SprintFlow tickets use the AI SprintFlow workspace's code host. Until you set it, Salesforce tickets use the AI SprintFlow one - the page says so and offers Use it for Salesforce to take it over as the Salesforce repository. The AI model is shared by both workspaces: set it once.

8. Your Salesforce ticket sources (added for you)#

Nothing to enter by hand: when Test connection succeeds, every ticket type the org has becomes a ticket source by itself - cases for Service Cloud Cases, agile for Agile Accelerator, devops for DevOps Center - with automatic queueing off, so no run starts until you click Run (or turn queueing on). Install Agile Accelerator or DevOps Center later and test the connection again: it is added too.

To narrow one down, open Connections → Salesforce ticket sources and set its scope or queue condition. Add ticket source is only needed for a second source of the same kind (say, two case queues).

Kind Scope (optional) What is queued by default Keys
Agile Accelerator the scrum team's name open work assigned to the integration user W-0001234
Service Cloud Cases a case queue (its API name) open cases owned by the integration user or the queue CASE-00001026
DevOps Center the DevOps Center project open work items assigned to the integration user WI-000123
  • To hand a story to AI SprintFlow, assign it to the integration user (or move the case into the queue).
  • Queue condition (SOQL) replaces the default with your own rule, for example agf__Status__c = 'New' AND agf__Sprint__r.Name = '2026.10a'.
  • Field names are only needed if your org renamed the package's fields: status=My_Status__c, subject=My_Subject__c.
  • The Sprint page of the Salesforce workspace shows the Agile Accelerator team's current sprint.

9. Validate Salesforce code before every pull request (optional)#

For repositories with an SFDX project (sfdx-project.json). On the Salesforce card, tick Validate Salesforce code against this org before the pull request and choose:

  • Apex tests: all local tests (default), the tests of the changed classes, none, or all tests in the org;
  • What to validate: the changed metadata (default) or every package directory;
  • Wait up to: how long a validation may take (60 minutes by default).

After the repository's own tests pass, AI SprintFlow sends a check-only deploy of the change with the Apex tests through the Metadata API - nothing in the org changes, and nothing needs installing (no Salesforce CLI). Compile errors and failing tests go back to the AI to fix, like a failing test. The results appear on the Salesforce dashboard.

10. Browser proof of UI changes (optional)#

Salesforce code runs only inside an org, so there is no app to start on your computer. For tickets that change what people see - Lightning components, Visualforce, pages, layouts - you choose how the change is shown:

Choice What happens
Off (default) Nothing is deployed. The pull request gets Try it in your own org: the commands to deploy the branch to your sandbox or scratch org and look at it yourself.
Record in the proof org AI SprintFlow deploys the branch to the connected org, opens it in the browser and records each acceptance criterion as video and screenshots, attached to the ticket (internal only) and the pull request.

Turn it on with Browser proof of UI changes on the Salesforce card, or choose for a single run in New run (Record it in the proof org / Do not record).

Before you turn it on:

  • Use a sandbox, Developer Edition, Trailhead Playground, scratch or trial org. The deploy is real. AI SprintFlow checks the org type and refuses a production org whatever the setting says. What was deployed stays in that org.
  • Sign in with JWT bearer or "Sign in with Salesforce" - not client credentials: a client-credentials token is for the API only (Salesforce grants it api and ignores web), so it cannot open the org in a browser.
  • Add the scope "Manage user data via Web browsers (web)" to the External Client App (Settings → OAuth Settings). The browser signs in with the connection's session; without this scope Salesforce refuses, and the run says which scopes the token has.
  • Sign in with Salesforce on the desktop app: Salesforce accepts an http:// callback only for localhost - enter http://localhost:<port>/api/salesforce/oauth/callback (the port in AI SprintFlow's address bar, e.g. 8700).
  • New components need no page. A new Lightning web component is on no page until an admin places it, so for the proof AI SprintFlow adds a small app per changed component (/c/SprintFlowProof_<component>.app) - in the org only, never in the repository.
  • The browser tests work signed in to the org: with JWT bearer, a session of their own, revoked when the proof ends; with Sign in with Salesforce, the connection's own session (with refresh-token rotation on, a session of their own would be signed out by the next renewal elsewhere in the app).
  • Test data the proof creates through the API (accounts, cases, opportunities, named SprintFlow proof ...) is deleted when the proof ends, and cases with that name are never picked up as tickets.
  • If the browser still lands on the Salesforce login page, turn off refresh token rotation in the External Client App (Policies → OAuth Policies), or use JWT bearer.

Troubleshooting#

Test says What to do
user hasn't approved this consumer JWT: the integration user is not pre-authorized - Policies → Admin approved users are pre-authorized and add its permission set (section 5a).
invalid assertion / invalid_grant (JWT) The certificate in the app does not match the private key, the username is wrong, or the computer's clock is off by more than a few minutes.
audience is invalid A sandbox is signing in through login.salesforce.com: use https://test.salesforce.com or the sandbox's My Domain URL.
request not supported on this domain Client credentials need the My Domain URL as the login URL.
no client credentials user enabled Set Run As on the app's Policies tab (section 5b).
invalid client credentials Wrong consumer key or secret - copy them again (section 6).
authentication failure Username-password: wrong password or security token, or the org blocks the flow (section 5d).
expired access/refresh token Sign in with Salesforce again; check the refresh token policy (section 5c).
API_DISABLED_FOR_ORG The org's edition has no API access (Professional edition needs the API add-on).
REQUEST_LIMIT_EXCEEDED The org's daily API limit is used up; work continues when calls free up (Setup → Company Information shows the limit).
INSUFFICIENT_ACCESS / INVALID_FIELD The integration user lacks object or field access: Test names the missing fields; add them to the permission set (section 3).
This Salesforce org has no agf__ADM_Work__c object Agile Accelerator is not installed, or the user cannot see it.
Validation: may not deploy metadata Add Modify Metadata Through Metadata API Functions (section 3).

Security checklist#

  • A dedicated integration user, with only the permission set above; never a person's account.
  • JWT bearer for production: no password or long-lived token stored; renew the certificate before it expires.
  • Sandbox for code validation.
  • Optionally restrict the External Client App to your network: Policies → IP Relaxation = Enforce IP restrictions, with your office or server addresses as the user's trusted IP ranges.
  • Review Setup → Login History for the integration user from time to time.
  • In AI SprintFlow, every secret is encrypted at rest, shown only as its last four characters, and never sent to the AI model; the Salesforce token is used only inside AI SprintFlow, never by the repository's scripts.
AI SprintFlow 2.3.2 · Questions? Contact us