Portal Community

opportunity/create

Create a new Opportunity record in Salesforce linked to an Account.

When to Use

Configuration

Connection

FieldTypeRequiredDescription
InstanceUrlstringrequiredSalesforce org URL.
AccessTokenstringrequiredValid OAuth2 access token.

Operation Fields

FieldTypeRequiredDescription
NamestringrequiredOpportunity name, e.g. Acme Corp — Enterprise Q3.
AccountIdstringrequiredSalesforce Account ID to link this opportunity to.
CloseDatestringrequiredExpected close date in YYYY-MM-DD format.
StageNamestringrequiredPipeline stage picklist value, e.g. Prospecting, Proposal/Price Quote, Negotiation/Review.
AmountdecimaloptionalDeal value in your org's currency.
ProbabilityintoptionalWin probability percentage (0–100).
TypestringoptionalOpportunity type, e.g. New Business, Renewal, Upsell.
LeadSourcestringoptionalSource of the opportunity.
DescriptionstringoptionalNotes or context about the opportunity.
OwnerIdstringoptionalSalesforce 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 CodeCondition
CFG_MISSING_INSTANCEInstanceUrl is missing.
CFG_MISSING_TOKENAccessToken is missing.
VAL_MISSING_FIELDName, AccountId, CloseDate, or StageName is missing.
UNEXPECTED_ERRORUnexpected exception.

Output

Success Port

FieldTypeDescription
opportunityIdstring18-character Salesforce Opportunity ID.
createdAtstringISO 8601 creation timestamp.
statusstringAlways created.
resourcestringAlways opportunity.
operationstringAlways create.

Error Port

FieldTypeDescription
errorCodestringMachine-readable error code.
messagestringError description.

Sample Output

{
  "opportunityId": "0065g000005RstUVW",
  "createdAt": "2026-05-26T12:00:00.000Z",
  "status": "created",
  "resource": "opportunity",
  "operation": "create"
}

Expression Reference

ExpressionDescription
{{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

PolicyDetail
Credential storageStore AccessToken in BizFirst Credentials Manager.
CloseDate formatAlways use YYYY-MM-DD format. Invalid date formats will cause a Salesforce API error.
StageName validityValue must match a stage defined in your org's Opportunity Stage picklist.
Error port wiringAlways wire the error port. Validation rules on Amount or Stage can block creation.
Sandbox testingTest 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}}"
}