Dev Agent Workflows

Workflows allow you to define a series of steps to guide Dev Agent through repetitive Salesforce development tasks, such as deploying components, running tests, or creating releases. To invoke a workflow in your workspace, type /[workflow-name.md] in the chat. Workflows transform how you handle repetitive Salesforce development tasks by creating reusable, automated sequences. Instead of manually performing the same steps repeatedly, you can define workflows once and trigger them with a simple command.

Key benefits:

  • Automate repetitive tasks: Deploy components, run tests, create releases with one command
  • Ensure consistency: Follow the same process every time
  • Reduce errors: Eliminate manual steps that can be forgotten or done incorrectly
  • Save time: Turn multi-step processes into single commands
  • Share processes: Team members can use the same proven workflows

Common Salesforce workflow types:

  • Deployment workflows: Deploy and validate components across orgs
  • Testing workflows: Run comprehensive test suites and analyze results
  • Release workflows: Package and deploy releases with proper validation
  • Component workflows: Create, test, and deploy new Lightning components
  • Integration workflows: Set up and validate external integrations

Quickly create workflows through Dev Agent's built-in interface.

  1. Access Workflow Tab: Click Rules & Workflows (justice icon) in the Dev Agent chat interface.
  2. Choose Workflow Type: Select either Global Workflows or Workspace Workflows.
  3. Create New Workflow: Click + to create a new workflow.

Workspace workflows are stored in your project's .a4drules/workflows folder. The location of global workflows varies based on your operating system.

Dev Agent provides a convenient popover interface that allows you to:

  • View Active Workflows: See which global and workspace workflows are currently active.
  • Toggle Workflows: Enable or disable specific workflows with a single click.
  • Add or Delete Workflows: Quickly create or delete workflows.

The real power comes from how you structure your workflow files. You can:

  • Leverage Dev Agent's built-in tools like ask_followup_question, read_file, search_files, and new_task.
  • Use command-line tools you already have installed like sf (Salesforce CLI) or git.
  • Reference external MCP tool calls for integrations.
  • Chain multiple actions together in a specific sequence.

Create a file called salesforce-deploy.md and paste this content:


1. Gather Deployment Information

Ask the user which components to deploy and which org to target:

Validate the target org connection:


2. Pre-Deployment Validation

Check for local changes and potential conflicts:

Run local tests if deploying Apex:

Validate deployment without actually deploying:


3. Analyze and Confirm

Review validation results and ask for confirmation:


4. Execute Deployment

Deploy to the target org:

Monitor deployment status:


5. Post-Deployment Validation

Run tests in the target org:

Verify deployment success and provide summary:

Workflows are completely customizable to your Salesforce development needs. You can create workflows for all kinds of repetitive tasks.

WorkflowStep / Action
Release ManagementGrab all merged changes from your feature branches
Build a changelog from commit messages and Jira tickets
Handle version bumps in your sfdx-project.json file
Create release packages and validate them across environments
New Component SetupCreate the component folder structure
Generate boilerplate HTML, JS, and CSS files
Set up Jest test files with basic test cases
Configure component metadata and permissions
Deploy to development org for initial testing
Integration TestingValidate Named Credentials and Connected Apps
Test API endpoints with sample data
Check error handling and retry logic
Generate integration test reports
Update monitoring dashboards
Code QualityRun PMD static analysis on Apex classes
Check Lightning component accessibility compliance
Validate naming conventions across metadata
Generate code quality reports
Create tickets for issues found
Basic Org CommandsCommand
List authorized orgssf org list
Display org informationsf org display --target-org <org-alias>
Set default orgsf config set target-org <org-alias>
Deployment CommandsCommand
Deploy source to orgsf project deploy start --target-org <org-alias>
Deploy with validation onlysf project deploy start --dry-run --target-org <org-alias>
Check deployment statussf project deploy report --target-org <org-alias>
Retrieve metadata from orgsf project retrieve start --target-org <org-alias>
Testing CommandsCommand
Run all Apex testssf apex test run --target-org <org-alias> --code-coverage --result-format human
Run specific test classessf apex test run --class-names "AccountTest,ContactTest" --target-org <org-alias>
Get test resultssf apex test report --target-org <org-alias>
Data CommandsCommand
Query datasf data query --query "SELECT Id, Name FROM Account LIMIT 10" --target-org <org-alias>
Import datasf data import tree --plan data/sample-data-plan.json --target-org <org-alias>
Export datasf data export tree --query "SELECT Id, Name FROM Account" --target-org <org-alias>