Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Forms and collected information

Getting form answers, polls and lead forms out of Exponential into a CRM or another system - how information collection works, collect.ini, the CSV export and bccie, reading new collections from PHP in a cronjob, mail…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/integrators/forms-and-collected-information.md

On this page

Forms and collected information

This page is for integrators who connect the forms of an Exponential site to a CRM, a ticket system or a marketing tool. A form in Exponential is a content object whose class has attributes marked Information collector; each time a visitor sends it, one collection is stored with one value per collector attribute. The administration side is Collected information.

Contents

  1. The ways out
  2. collect.ini: what happens on sending
  3. Reading new collections in a cronjob
  4. Exports
  5. Personal data
  6. Checklist

The ways out

WayWhenEffort
Mail on each sending (collect.ini [EmailSettings])The CRM has a mail-in address; low volumeSettings only
CSV export per object (infocollector/export/<object id>)Occasional hand-overNone
bccie exports on a schedule (CSV or SYLK)A regular file for another teamSettings and cronjob
A cronjob of your extension that reads new collections and calls the CRM's APILeads must arrive within minutes, structuredAn extension

The last one is the robust integration: it is structured, retried and logged. Mail parsing on the CRM side breaks with every template change.

collect.ini: what happens on sending

settings/collect.ini, overridden in settings/override/collect.ini.append.php. Most settings have a default, a list per collection type (form, poll, feedback) and an attribute that lets the object choose:

BlockSettingsMeaning
[InfoSettings]Type, TypeList[], TypeAttribute=collection_typeWhich type a form is
[EmailSettings]SendEmail=enabled, SendEmailList[poll]=disabled, SendEmailAttribute=collection_emailWhether a mail goes out on sending
[DisplaySettings]Display=result, RedirectURL, RedirectURLAttribute=collection_redirectWhat the visitor sees afterwards
[CollectionSettings]CollectAnonymousData, CollectSensitiveData, CollectionUserData=multipleWhether anonymous visitors may send, whether sensitive data is stored, one or many collections per user

Reading new collections in a cronjob

Keep the id of the last collection you sent, read everything after it, send, and store the new last id. The tables are ezinfocollection (one row per sending) and ezinfocollection_attribute; the class is eZInformationCollection (kernel/classes/ezinformationcollection.php).

<?php
/**
 * Sends new collections of one form object to the CRM. $lastID is kept by the caller (a row of your own table).
 */
function myIntegrationSendNewCollections( $formObjectID, $lastID, $crmClient )
{
    $db = eZDB::instance();
    $rows = $db->arrayQuery( 'SELECT id FROM ezinfocollection WHERE contentobject_id = ' . (int)$formObjectID
                           . ' AND id > ' . (int)$lastID . ' ORDER BY id', array( 'limit' => 200 ) );
    foreach ( $rows as $row )
    {
        $collection = eZInformationCollection::fetch( (int)$row['id'] );
        if ( !$collection instanceof eZInformationCollection )
            continue;
        $fields = array();
        foreach ( $collection->dataMap() as $identifier => $attribute )
        {
            $fields[$identifier] = $attribute->attribute( 'data_text' );
        }
        if ( !$crmClient->sendLead( (int)$row['id'], $fields ) )
        {
            return $lastID;               // stop; the next run retries from here
        }
        $lastID = (int)$row['id'];
    }
    return $lastID;
}

dataMap() indexes the collected attributes by their class attribute identifier. Text values are in data_text; numbers in data_int or data_float, depending on the datatype. Send the collection id along, so the CRM can refuse a duplicate when a run is repeated (Idempotent imports).

For whole lists, eZInformationCollection::fetchCollectionsList( $contentObjectID, $creatorID, $userIdentifier, $limitArray, $sortArray ) and fetchCollectionsCount() are the kernel's fetches.

Exports

  • The CSV export at Setup > Collected information downloads infocollector/export/<object id>: UTF-8 with a byte order mark, the collection id, sent and changed times in UTC, the sender's user id, one column per collector attribute; at most 50 000 collections. Values that a spreadsheet would read as a formula start with an apostrophe. Each export is recorded in the audit as data.export.csv.
  • bccie (required as ~1.1.18) exports collected information as CSV or SYLK on demand or by its cronjob parts (bccie).

Personal data

Form answers are usually personal data: names, e-mail addresses, messages.

  • Send only the fields the receiving system needs.
  • Delete collections in Exponential once they are safely in the CRM, if the customer's retention rules allow it (Setup > Collected information, Remove; recorded as data.infocollection.remove).
  • Keep exported files where personal data belongs, and delete them when no longer needed.
  • Write the data flow into the customer's record of processing; this is not legal advice (Protecting customer data).

Checklist

  • To do: Which form objects are integrated, and which fields go where.
  • To do: The mail on sending switched off where the cronjob replaces it, so leads do not arrive twice.
  • To do: The last sent id stored durably; the CRM refuses duplicates by collection id.
  • To do: Failed sends stop the run and are retried; the run is logged and monitored.
  • To do: Retention agreed for collections in Exponential and in the CRM.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x