Skip to content

Commit

Permalink
fix: reciever
Browse files Browse the repository at this point in the history
  • Loading branch information
kaioken committed Jul 19, 2024
1 parent 8bff14b commit 249290e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Domains/Connectors/Zoho/Workflows/ZohoLeadActivity.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ protected function assignAgent(

$defaultLeadSource = $company->get(CustomFieldEnum::ZOHO_DEFAULT_LEAD_SOURCE->value);
if (! empty($defaultLeadSource)) {
$zohoData['Lead_Source'] = $lead->receiver ? $lead->receiver->name : $defaultLeadSource;
$zohoData['Lead_Source'] = $defaultLeadSource; //$lead->receiver ? $lead->receiver->name : $defaultLeadSource;
}

if (is_object($agent)) {
Expand All @@ -144,7 +144,9 @@ protected function assignAgent(
if ($agentInfo && $agentInfo->get('over_write_owner')) {
$zohoData['Owner'] = (int) $agentInfo->get('over_write_owner');
}
$zohoData['Lead_Source'] = $agent->name ?? $agent->Name;
if (empty($defaultLeadSource)) {
$zohoData['Lead_Source'] = $agent->name ?? $agent->Name;
}
} elseif ($agentInfo instanceof Agent) {
$zohoData['Owner'] = (int) $agentInfo->owner_linked_source_id;
if (empty($defaultLeadSource)) {
Expand Down

0 comments on commit 249290e

Please sign in to comment.