opportunity/create
Create a new Opportunity record in Salesforce linked to an Account.
When to Use
- Create an opportunity after a lead is converted and a discovery call is confirmed.
- Generate an opportunity from an inbound RFP submission.
- Create a renewal opportunity automatically 90 days before a contract expires.
- Generate an upsell opportunity when a product usage signal exceeds a threshold.
Configuration
Connection
| Field | Type | Required | Description |
InstanceUrl | string | required | Salesforce org URL. |
AccessToken | string | required | Valid OAuth2 access token. |
Operation Fields
| Field | Type | Required | Description |
Name | string | required | Opportunity name, e.g. Acme Corp — Enterprise Q3. |
AccountId | string | required | Salesforce Account ID to link this opportunity to. |
CloseDate | string | required | Expected close date in YYYY-MM-DD format. |
StageName | string | required | Pipeline stage picklist value, e.g. Prospecting, Proposal/Price Quote, Negotiation/Review. |
Amount | decimal | optional | Deal value in your org's currency. |
Probability | int | optional | Win probability percentage (0–100). |
Type | string | optional | Opportunity type, e.g. New Business, Renewal, Upsell. |
LeadSource | string | optional | Source of the opportunity. |
Description | string | optional | Notes or context about the opportunity. |
OwnerId | string | optional | Salesforce User ID of the opportunity owner. |
Sample Configuration
{
"Resource": "opportunity",
"Operation": "create",
"InstanceUrl": "https://myorg.my.salesforce.com",
"AccessToken": "{{credentials.salesforce.accessToken}}",
"Name": "{{nodes.GetAccount.Name}} — Enterprise Q3 2026",
"AccountId": "{{nodes.ConvertLead.accountId}}",
"CloseDate": "2026-09-30",
"StageName": "Prospecting",
"Amount": 120000,
"Type": "New Business",
"LeadSource": "Web"
}
Validation Errors
| Error Code | Condition |
CFG_MISSING_INSTANCE | InstanceUrl is missing. |
CFG_MISSING_TOKEN | AccessToken is missing. |
VAL_MISSING_FIELD | Name, AccountId, CloseDate, or StageName is missing. |
UNEXPECTED_ERROR | Unexpected exception. |
Output
Success Port
| Field | Type | Description |
opportunityId | string | 18-character Salesforce Opportunity ID. |
createdAt | string | ISO 8601 creation timestamp. |
status | string | Always created. |
resource | string | Always opportunity. |
operation | string | Always create. |
Error Port
| Field | Type | Description |
errorCode | string | Machine-readable error code. |
message | string | Error description. |
Sample Output
{
"opportunityId": "0065g000005RstUVW",
"createdAt": "2026-05-26T12:00:00.000Z",
"status": "created",
"resource": "opportunity",
"operation": "create"
}
Expression Reference
| Expression | Description |
{{nodes.CreateOpportunity.opportunityId}} | The new Opportunity's Salesforce ID. |
{{nodes.CreateOpportunity.createdAt}} | Creation timestamp. |
{{nodes.CreateOpportunity.errorCode}} | Error code from error port. |
Node Policies & GuardRails
| Policy | Detail |
| Credential storage | Store AccessToken in BizFirst Credentials Manager. |
| CloseDate format | Always use YYYY-MM-DD format. Invalid date formats will cause a Salesforce API error. |
| StageName validity | Value must match a stage defined in your org's Opportunity Stage picklist. |
| Error port wiring | Always wire the error port. Validation rules on Amount or Stage can block creation. |
| Sandbox testing | Test in sandbox before production. |
Examples
Create Opportunity After Lead Convert
{
"Name": "{{nodes.GetLead.Company}} — New Business",
"AccountId": "{{nodes.ConvertLead.accountId}}",
"CloseDate": "2026-09-30",
"StageName": "Prospecting",
"Type": "New Business"
}
Renewal Opportunity 90 Days Before Expiry
{
"Name": "{{trigger.accountName}} — Renewal {{trigger.renewalYear}}",
"AccountId": "{{trigger.accountId}}",
"CloseDate": "{{trigger.contractExpiryDate}}",
"StageName": "Needs Analysis",
"Amount": "{{trigger.contractValue}}",
"Type": "Renewal"
}
Upsell from Product Usage Signal
{
"Name": "{{trigger.accountName}} — Enterprise Upgrade",
"AccountId": "{{trigger.accountId}}",
"CloseDate": "{{trigger.targetCloseDate}}",
"StageName": "Value Proposition",
"Amount": "{{trigger.upsellValue}}",
"Type": "Upsell",
"Description": "Triggered by usage threshold breach on {{trigger.eventDate}}"
}