-1

I've loaded opportunity data using the data loader, but I'd like to load new records directly from the REST API. When I load the data from the data loader application step 2b allows me to select lookup fields on related objects such as the name from the campaign object.

The challenge I'm facing is that when I review the Object Reference in the REST API I don't see a documented way to implement a similar lookup. Am I limited to creating a relationship from an opportunity to a campaign using IDs?

1

1 Answer 1

1

You'll want to read the Insert or Update (Upsert) a Record Using an External ID documentation.

Here's a minimum viable payload:

{ "Name": "Test",
  "CloseDate": "2024-03-01",
  "StageName": "Prospecting",
  "Campaign": {
    "Name": "The Campaign to End All Campaigns"
  },
  "Account": {
    "Name": "salesforce.com"
  }
}

You simply specify the relationship name, and provide a valid external ID.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .