Hi, there is an old unanswered topic Not able to map user to opportunity through API
It seems that it’s still actual. I’m trying to assign an owner to a newly-created opportunity using the latest PHP SDK to no avail.
$opportunity = $client->opportunities()->create([
'opportunity_title' => $data['opportunityTitle'],
'opportunity_notes' => $data['opportunityNotes'],
'contact' => [
'id' => $data['contactId'],
'email' => $data['email'],
'phone_number' => $data['phone']
],
'stage' => [
'id' => 123
]
]);
// so far so good
$opportunity->user = [
'id' => 123456
]; // does nothing
$opportunity->setAttribute('user', [
'id' => 12345
]); // still no luck
$opportunity->save();
So the question is, do we have a way to assign opportunity owners by API? PHP SKD docs are a bit thin. Am I missing something?