diff --git a/src/Domains/Connectors/Zoho/DataTransferObject/ZohoLead.php b/src/Domains/Connectors/Zoho/DataTransferObject/ZohoLead.php index 82d7cc1ca..f66681f9a 100644 --- a/src/Domains/Connectors/Zoho/DataTransferObject/ZohoLead.php +++ b/src/Domains/Connectors/Zoho/DataTransferObject/ZohoLead.php @@ -59,8 +59,7 @@ public static function fromLead(Lead $lead): self public function toArray(): array { $data = parent::toArray(); - - unset($data['additionalFields']); + //unset($data['additionalFields']); return $data; } @@ -96,7 +95,9 @@ protected static function mapProperties(array $map, array &$data, array $entity) $value = $creditScore[(int) $value] ?? $value; } - $data[$name] = $value; + if ($value !== null) { + $data[$name] = $value; + } } } diff --git a/src/Domains/Connectors/Zoho/Workflows/ZohoLeadActivity.php b/src/Domains/Connectors/Zoho/Workflows/ZohoLeadActivity.php index 0a3e38c21..41641c370 100644 --- a/src/Domains/Connectors/Zoho/Workflows/ZohoLeadActivity.php +++ b/src/Domains/Connectors/Zoho/Workflows/ZohoLeadActivity.php @@ -19,6 +19,9 @@ use Webleit\ZohoCrmApi\Modules\Leads as ZohoLeadModule; use Workflow\Activity; +/** + * @todo refactor move core logic to SyncLeadWithZohoAction + */ class ZohoLeadActivity extends Activity implements WorkflowActivityInterface { use KanvasJobsTrait;