To export leads from MetaLocator, click Leads and Export as shown below:
Leads in MetaLocator are stored in an encrypted database. The resulting CSV is unencrypted and ready for import, analysis or backup.
Id - The Internal ID of the lead
Subject - The subject of the lead email as configured by the Lead Email Subject Interface setting.
Body - The entire HTML content of the lead
Name - The (optional) name field of the lead
From - The email address of the lead
To - The recipient email address
CC - Any email 'carbon copies' as configured by the Lead Admin Notifications Interface setting.
Received - The time the lead was sent.
mltable - Always 'locations'
sender_ipaddr - The IP address of the lead
viewed - If lead acknowledgement is enabled, the timestamp at which acknowledgement occurred.
spam_action - Any spam blocking or delaying actions
action - The reported bounce type, if any
diagnosticcode - The code associated with any reported bounce.
item_id - The interface from which the lead was initiated
location_id - The location at which the lead was directed
location_name - The value of the location name field
deactivated - If the email was deactivated due to failed email validation.
<externalkey> - The value of an external key, if configured
message - The contents of the message field, as written by the lead.
visitor_id - The Analytics visitor id of the lead
lead_response_time - The amount of time hh:mm:ss between the lead received and viewed times. Lead acknowledgement only.
expired - If the lead is no longer valid due to reassignment.
custom1...custom40 - The values of any custom fields gathered in the lead capture form.
The values above are recorded at the time the lead is generated. For example, if the Lead Email Subject changes, this will not affect past leads.
Automated Email Export
For Enterprise users, MetaLocator allows for the scheduled export of lead data by email using the Export Lead background process.
Manage your account's background & scheduled processes by clicking the Process icon in the upper right toolbar as shown below:
Click New and select ExportLead as the job type.
Options should be configured as follows:
Days: The number of days in the past to query for leads. This determines the size of the export.
Seconds between job executions: The number of seconds to wait between each export. Configure days to 1 and seconds to 86400 to receive a daily report of the prior day's leads.
ccList: A list of email addresses, separated by semi-colons to which the link to the export file should be delivered. This list should not end in a semi-colon.
subject: The subject of the lead export email
tld: An two-letter country code to filter the results to leads directed at locations in a specific country.
Click "Save" and in the list of processes, you will find a ExportLead job configured as shown below.
Click the blue toggle to enable and disable the job, or click the job title (ExportLead) to view and manage options.
To force the job to run immediately, check the box next to the ExportLead link and click Force in the top toolbar.
Email address recipients are configured by the ccList attribute above, and the account owner also receives the email notifications. Email address recipients must also be users, and users must be logged in to download the file. To add a user, click User Manager, then add a user. Admins, SubAdmins, Lead and Lead Download users can download these files. Lead Download users can only download the lead file. They have no other access.
The email notification is also added as a User Notification as shown here:
The CSV results of the ExportLead job can also be published to a SFTP endpoint. The setup requires two jobs, the ExportLead job as described above, and a ExportSFTP job. The ExportLead must be configured to trigger the ExportSFTP as described below.
The steps to configure this setup are:
Configure the ExportLead job to produce the email output as described above.
Create a new ExportSFTP job with the following options
Configure the ExportLead job with the ID of the ExportSFTP job.
Export SFTP Options
host: The SFTP hostname of the remote server. sftp.yourhost.com
username: The SFTP username
password: The SFTP password, if required
key: The SFTP key, if required
remote_dir: The remote directory to change into after connecting. E.g. /var/uploads
local_file: This option will be automatically set by the ExportLead job.
Save the new SFTP job and note the resulting ID number.
Update the ExportLead to include an option named
Set that to the value of the new ExportSFTP job id.
This will trigger the ExportSFTP job with the results of the ExportLead process.
Bulk Export plugins can be authored by MetaLocator developers. If a custom leadExport plugin has been authored, it will be triggered during this execution. Provide a MLDataCombinator::leadExport override in ul/<user-id>/import/import.php. Plugins can also be executed each time a lead is generated by authoring a MLDataCombinator::leadExport plugin.