Model/Importer.php
public function _processContactImportReportFaults($id, $websiteId)
    {
        $client = $this->helper->getWebsiteApiClient($websiteId);
        $report = $client->getContactImportReportFaults($id);

        if ($report) {
            $reportData = explode(PHP_EOL, $this->_removeUtf8Bom($report));
            //unset header
            unset($reportData[0]);
            //no data in report
            if (! empty($reportData)) {
                $contacts = [];
                foreach ($reportData as $row) {
                    $row = explode(',', $row);
                    //reason
                    if (in_array($row[0], $this->reasons)) {
                        //email
                        $contacts[] = $row[1];
                    }
                }

                //unsubscribe from email contact and newsletter subscriber tables
                $this->helper->contactResource->unsubscribe($contacts);
            }
        }
    }
public function _processContactImportReportFaults($id, $websiteId)
    {
        $client = $this->helper->getWebsiteApiClient($websiteId);
        $report = $client->getContactImportReportFaults($id);

        if ($report) {
            $reportData = explode(PHP_EOL, $this->_removeUtf8Bom($report));
            //unset header
            unset($reportData[0]);
            //no data in report
            if (! empty($reportData)) {
                $contacts = [];
                foreach ($reportData as $row) {
                    $row = explode(',', $row);
                    //reason
                    if (in_array($row[0], $this->reasons)) {
                        //email
                        $contacts[] = $row[1];
                    }
                }

                //unsubscribe from email contact and newsletter subscriber tables
                $this->helper->contactResource->unsubscribe($contacts);
            }
        }
    }
public function _processContactImportReportFaults ( $ id , $ websiteId ) { $ client = $ this -> helper -> getWebsiteApiClient ( $ websiteId ) ; $ report = $ client -> getContactImportReportFaults ( $ id ) ; if ( $ report ) { $ reportData = explode ( PHP_EOL , $ this -> _removeUtf8Bom ( $ report ) ) ; //unset header unset ( $ reportData [ 0 ] ) ; //no data in report if ( ! empty ( $ reportData ) ) { $ contacts = [ ] ; foreach ( $ reportData as $ row ) { $ row = explode ( ',' , $ row ) ; //reason if ( in_array ( $ row [ 0 ] , $ this -> reasons ) ) { //email $ contacts [ ] = $ row [ 1 ] ; } } //unsubscribe from email contact and newsletter subscriber tables $ this -> helper -> contactResource -> unsubscribe ( $ contacts ) ; } } }
Get report info for contacts sync.

@param int $id
@param int $websiteId

@throws \Magento\Framework\Exception\LocalizedException

@return null
Get report info for contacts sync .