Skip to content

Salesforce questions

This page shows how we ask the SRM Salesforce org questions with sfe, without opening Salesforce: which org we are in, what an object looks like, which flows and feature switches exist, how much room the org has left, and what an Apex class looks like. Everything on this page only reads. We never look at student records here, only at how the org is set up.

Video, about three minutes, with narration and captions. It covers the first five steps; the sixth, Apex, is only on this page.

Before you start

  • sfe is installed and our pack is on. If it is not, we do that first: The path at a glance.
  • We are signed in to Salesforce. Sign in to Salesforce shows how, and sfe status says whether it worked.
  • We know that every command below reads from production unless we say otherwise. The red PRODUCTION label at the top of each answer says so. The option -e picks another org for one command, for example qafull or devfull.

Warning

sfe also has sfe sf query, which runs a SOQL query (a Salesforce query written like SQL). We do not use it on this page. Objects such as Contact, Lead and CARE profiles hold students' names, emails and ids, so we describe those objects and read the setup around them instead of reading their records.

Steps

1. Open a terminal

We open the Terminal app on the Mac. It does not matter which folder we are in.

2. Find out which org we are in

An org is one Salesforce system, with its own address and its own data. WGU has several: production, and test copies called DevFull and QAFull. We start by asking which one this machine is signed in to.

sfe sf whoami

The saved login for the production org

The rows say who we are logged in as (username), the address of the org (instanceUrl), and Connected when the saved login still works. The alias srm-prod is the short name sfe uses for the production org.

3. Look at what an object holds

An object in Salesforce is like a table, and a field is one column of it. sfe sf describe lists the fields of an object. Here we look at Opportunity, the object a CARE profile is stored in, and keep only the fields with care in them:

sfe sf describe Opportunity --contains care

The fields of Opportunity that mention care

Each row is one field: its name, its type, its label, whether it can be updated, and the values we may pick from when it is a picklist (a list of choices). This is the shape of the object only. It has no records in it, so it has no people in it.

4. Find a flow

A flow is automation that someone built in Salesforce with clicks instead of code. A record-triggered flow runs by itself when a record is saved. sfe sf flows finds flows by name:

sfe sf flows --contains Fraud

The two flows with Fraud in their name

For each flow we see:

Row What it tells us
type and trigger What kind of flow it is, and when it runs. RecordAfterSave means after a record is saved
on The object it watches
active yes when the flow is live and no when it is switched off
latestIsActive no means someone saved a newer draft that is not live yet
by and at Who changed it last, and when

5. Read the feature switches

A feature switch turns a piece of behaviour on or off without a new release. In SRM they are records of a custom metadata type, which is a kind of setting that travels through Copado like code. sfe sf feature-flags reads them all, and --contains keeps the ones we ask about:

sfe sf feature-flags --contains Kafka

The Kafka feature switches

The On_Off__c row is the switch, yes or no. We read Description__c with it, because it says what the switch does and so what yes and no mean for that one.

6. See how much room the org has left

Every Salesforce org has quotas called limits, because many customers share the same servers. We run:

sfe sf limits

The answer is long, so we scroll up to the top of it. The line we watch is DailyApiRequests: the left number is how many API calls are still left today, and the right number is the most the org gets in a day. When the left number gets close to zero, the integrations that call Salesforce start to fail.

Org limits, with DailyApiRequests

7. Read an Apex class

Apex is the programming language of Salesforce. sfe sf apex and a class name show the class that really runs in the org:

sfe sf apex SSE_RESTSavingStudentBasicInfo

An Apex class as it is in the org

The answer gives the API version, whether the class is active, how long it is, who deployed it and when. Below that, org is the link to the class in Salesforce, and repo is the file in our own clone of the repository, which should match the org after the last Copado deployment. We add --body when we want the source text as well.

What we should see

  • read-only in green on every answer, and the red PRODUCTION label.
  • No record of a student or a person anywhere in the answers.
  • For sfe sf whoami, the word Connected.

Troubleshooting

What we see Likely cause What to do
login needed, and the exit code is 4 The saved Salesforce login has expired Run sfe doctor. It names the org and the exact fix. Passwords and codes are always typed by us
refused by the read-only policy, exit code 3 The command would change something Nothing to fix. We read with sfe, and make changes through the steps in How changes work
sfe sf flows takes seven seconds or more It asks Salesforce twice, once by name and once by label Wait. Both answers appear together
A flow shows latestIsActive no A newer draft was saved and never activated Read the at date. An old draft is history, a new one may be a change in progress
The org is not the one we wanted Every command reads production unless we say otherwise Add -e qafull or -e devfull to the command, and check the label at the top
Nothing comes back for a name The words do not appear in any flow or switch Try fewer letters, or run the command without --contains

Next


Last reviewed: 2026-12-01