Integration/RandomIntegration.php
public function doEnhancement(Lead $lead)
    {
        if (!empty($lead)) {
            $settings = $this->getIntegrationSettings()->getFeatureSettings();

            if (!$lead->getFieldValue($settings['random_field_name'])) {
                $lead->addUpdatedField($settings['random_field_name'], rand(1, 100));

                return true;
            }
        }

        return false;
    }
public function doEnhancement(Lead $lead)
    {
        if (!empty($lead)) {
            $settings = $this->getIntegrationSettings()->getFeatureSettings();

            if (!$lead->getFieldValue($settings['random_field_name'])) {
                $lead->addUpdatedField($settings['random_field_name'], rand(1, 100));

                return true;
            }
        }

        return false;
    }
@param Lead $lead

@return bool