Contacts & CRM Commands
Full CRM management from the command line — create and update contacts, move them through pipeline stages, define custom fields, and pull analytics.
contacts list
List contacts for your organization with search, filtering, sorting, and cursor-based pagination.
smallforce contacts list [options]
Options
| Flag | Type | Default | Description |
|---|---|---|---|
--search <text> | string | — | Search by name, email, or phone |
--stage <id> | string | — | Filter by pipeline stage ID |
--source <source> | string | — | Filter by source |
--tag <tag> | string | — | Filter by tag |
--created-after <date> | string | — | Filter contacts created after this date (ISO 8601) |
--created-before <date> | string | — | Filter contacts created before this date (ISO 8601) |
--sort-by <field> | string | created_at | Sort by: created_at, updated_at, first_name |
--sort-order <order> | string | desc | Sort order: asc, desc |
--cursor <cursor> | string | — | Pagination cursor from a previous response |
--limit <n> | number | — | Number of contacts to return (1–100) |
List all contacts
smallforce contacts list
Search by name
smallforce contacts list --search "John"
Filter by pipeline stage
smallforce contacts list --stage stg_abc123 --sort-by first_name --sort-order asc
Filter by date range
smallforce contacts list --created-after "2026-01-01" --created-before "2026-03-14"
Paginate through results
# First page
smallforce contacts list --limit 25
# Use the cursor from the response for the next page
smallforce contacts list --limit 25 --cursor "eyJpZCI6Imxhc3RfaWQifQ"
contacts get
Get full details for a specific contact, including custom field values.
smallforce contacts get <contact-id>
Example
smallforce contacts get cnt_abc123
Example output
{
"id": "cnt_abc123",
"firstName": "Sarah",
"lastName": "Chen",
"email": "sarah@example.com",
"mobilePhone": "+1-555-0123",
"company": "Acme Corp",
"jobTitle": "Marketing Director",
"source": "website",
"tags": ["vip", "enterprise"],
"pipelineStage": {
"id": "stg_abc123",
"name": "Qualified Lead"
},
"customFields": {
"Annual Revenue": "$2.5M",
"Industry": "SaaS"
},
"createdAt": "2026-02-15T09:30:00Z"
}
contacts create
Create a new contact. First name is required; all other fields are optional.
smallforce contacts create --first-name <name> [options]
Options
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--first-name <name> | string | Yes | — | Contact’s first name |
--last-name <name> | string | No | — | Last name |
--email <email> | string | No | — | Email address |
--mobile-phone <phone> | string | No | — | Mobile phone number |
--company <company> | string | No | — | Company name |
--job-title <title> | string | No | — | Job title |
--source <source> | string | No | — | How you acquired this contact |
--tags <tags> | string | No | — | Comma-separated tags |
--notes <notes> | string | No | — | Free-text notes |
--stage <id> | string | No | — | Pipeline stage ID |
Create a basic contact
smallforce contacts create --first-name "Sarah" --last-name "Chen" --email "sarah@example.com"
Create a contact with full details
smallforce contacts create \
--first-name "Marcus" \
--last-name "Johnson" \
--email "marcus@acme.com" \
--mobile-phone "+1-555-0456" \
--company "Acme Corp" \
--job-title "CEO" \
--source "referral" \
--tags "vip,enterprise" \
--stage stg_abc123
contacts update
Update an existing contact. Only include the fields you want to change.
smallforce contacts update <contact-id> [options]
Options
| Flag | Type | Description |
|---|---|---|
--first-name <name> | string | First name |
--last-name <name> | string | Last name |
--email <email> | string | Email address |
--mobile-phone <phone> | string | Mobile phone number |
--company <company> | string | Company name |
--job-title <title> | string | Job title |
--source <source> | string | Contact source |
--tags <tags> | string | Comma-separated tags |
--notes <notes> | string | Free-text notes |
Update email and company
smallforce contacts update cnt_abc123 --email "sarah.new@company.com" --company "New Company Inc"
Update tags
smallforce contacts update cnt_abc123 --tags "vip,enterprise,q1-lead"
contacts move-stage
Move a contact to a specific pipeline stage.
smallforce contacts move-stage <contact-id> --stage <stage-id>
Options
| Flag | Type | Required | Description |
|---|---|---|---|
--stage <id> | string | Yes | Target pipeline stage ID |
Example
smallforce contacts move-stage cnt_abc123 --stage stg_qualified
Use
smallforce contacts pipelineto list available stages and their IDs.
contacts pipeline
List all pipeline stages defined for your organization.
smallforce contacts pipeline
Example output
{
"stages": [
{ "id": "stg_new", "name": "New Lead", "order": 0 },
{ "id": "stg_qualified", "name": "Qualified", "order": 1 },
{ "id": "stg_proposal", "name": "Proposal Sent", "order": 2 },
{ "id": "stg_closed", "name": "Closed Won", "order": 3 }
]
}
contacts custom-fields
List custom field definitions configured for your organization.
smallforce contacts custom-fields
Example output
{
"fields": [
{ "id": "cf_revenue", "label": "Annual Revenue", "type": "text" },
{ "id": "cf_industry", "label": "Industry", "type": "dropdown", "options": ["SaaS", "E-commerce", "Services"] },
{ "id": "cf_score", "label": "Lead Score", "type": "number" }
]
}
Custom fields are defined in the SmallForce app under Settings → Custom Fields. The CLI provides read access to these definitions and their values appear on contact details.
contacts analytics
Get CRM analytics including total contacts, pipeline distribution, and source breakdown.
smallforce contacts analytics
Example output
{
"totals": {
"contacts": 342,
"thisMonth": 28
},
"pipeline": {
"New Lead": 45,
"Qualified": 67,
"Proposal Sent": 23,
"Closed Won": 207
},
"sources": {
"website": 120,
"referral": 89,
"social": 68,
"manual": 65
}
}