Skip to content

Export Builders

We can setup exports using the Evergiving Export Builders. These can be configured to automatically send pledge record data to your CRM and they are clever enough to only send data based on certain conditions; and either immediately or by a schedule you determine.

Export Builders have almost unlimited capability to draw from anywhere within an account and output perfectly clean data in a simple flat table structure.

Key Features

Feature Description
Scheduling Immediate or scheduled exports
Custom Data Selection Select and filter account data
#Data Transformations Format data with built-in tools
#Multi-Row CSV Exports Create multiple rows per record
#XML Exports Transform XML with custom stylesheets

Use Cases

Use Case Description
CRM Integration Send pledge and donor data automatically
Reporting Export to Google Data Studio or dashboards
Data Backup Schedule regular data backups

Data Transformations

Export Builders offer flexibility in data export timing and conditions, providing efficient and reliable management of data exports. They require no specialized IT support, as they handle underlying complexities and infrastructure requirements. XML exports can be customized using XSLT stylesheets, and tools like xsltproc can assist with transformations. Data transformations, such as regular expressions and complex calculations, are also supported for more precise export formatting.

Multi-Row CSV Exports

You can generate more than one row per record in CSV exports. Set the "sub row index" for each column to the sub-row that you want the column to appear on. In each sub-row, columns will be ordered in the same order they would appear if the output was a single row, with columns omitted that go on a different sub-row.

For example, if your table has four columns apple with sub-row "first", pear and banana with sub-row "second", and blueberry again with sub-row "first", then for each record, the resulting CSV file will have two sub-rows:

  • The first row with apple and blueberry (in that order.)
  • The second row with pear and banana (in that order.)

You can cause sub-rows to be omitted from the output by making sure that all values in the sub-row are null or undefined. Empty values (i.e. empty strings), on the other hand, won't cause a sub-row to be omitted.

If you choose to include a header in a multi-row CSV export, only the first sub-row will be used for the header.

XML Exports

XML exports use an intermediate XML format that is then transformed to the final XML format using an XSLT stylesheet.

Let's take a simple export with only two columns named FirstName and LastName. The intermediate format would look as follows:

<?xml version="1.0" encoding="utf-8"?>
<export>
  <row id="123">
    <FirstName type="string">Eloise</LastName>
    <LastName type="string">Berens</LastName>
  </row>
  <row id="456">
    <FirstName type="string">Roger</LastName>
    <LastName type="string">Pierce</LastName>
  </row>
</export>

The default stylesheet, which can be edited in the XML section of the export builder configuration, simply copies the intermediate format without changes.

Let's say we would like the resulting document to look as follows instead:

<?xml version="1.0" encoding="utf-8"?>
<all-donors>
  <donor>
    <personal-details>
      <first-name>Eloise</first-name>
      <last-name>Berens</last-name>
    </personal-details>
  </donor>
  <donor>
    <personal-details>
      <first-name>Roger</first-name>
      <last-name>Pierce</last-name>
    </personal-details>
  </donor>
</all-donors>

This can be achieved with the following stylesheet:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="/">
    <all-donors>
      <xsl:for-each select="/export/row">
        <donor>
          <personal-details>
            <first-name><xsl:value-of select="FirstName" /></first-name>
            <last-name><xsl:value-of select="LastName" /></last-name>
          </personal-details>
        </donor>
      </xsl:for-each>
    </all-donors>
  </xsl:template>
</xsl:stylesheet>

Or, if we wanted it to look like so:

<?xml version="1.0" encoding="utf-8"?>
<File>
  <Donor firstName="Eloise" lastName="Berens" />
  <Donor firstName="Roger" lastName="Pierce" />
</File>

Then this could be done using the following stylesheet:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:template match="/">
    <File>
      <xsl:for-each select="/export/row">
        <Donor>
          <xsl:attribute name="firstName">
            <xsl:value-of select="FirstName" />
          </xsl-attribute>
          <xsl:attribute name="lastName">
            <xsl:value-of select="LastName" />
          </xsl-attribute>
        </Donor>
      </xsl:for-each>
    </File>
  </xsl:template>
</xsl:stylesheet>

If you find editing the stylesheet cumbersome inside the browser, you can also consider using tools such as xsltproc(preinstalled in macOS).

You can copy the intermediate XML into a file, use a text editor to work on the stylesheet and run xsltproc to see results. Once happy with results, you can copy the stylesheet into the export builder configuration.