Skip to content

SecureGive Import Block

Nick Airdo edited this page Dec 22, 2015 · 4 revisions

Summary

This utility takes a given SecureGive export and imports the transactions into a Rock batch and ties the contributions to a matched person record. There are block properties that allow some flexibility in how the tool behaves (such as which PersonAliasId to use for anonymous donations).

The tool also requires that the person's Rock PersonAlias be stored in the person's record in SecureGive. If a match can't be found, it will not import that transaction.

TIP: To be able to view a person's alias we added an HTML block to the person profile page with the following HTML & Lava and made it only visible to the Finanace team: <small>Alias Id: {{ Context.Person.PrimaryAlias.AliasPersonId }}</small>

Export/Import File Format

I believe the XML file format we get from SecureGive is based on the "F1 export". These are the fields that make up a record in the XML import file:

  • IndividualID - this should match an AliasPersonId of a Person in Rock. Thankfully in Rock a person will always have that Id -- even after a merge happens (Yay!). So once you've stitched a person's alias id to their SecureGive record you'll never need to worry about it again.
  • FundCode - this should match the ID of a FinancialAccount in Rock (or be mapped using the Fund Mapping described in the block settings below).
  • Amount - this is the Amount for the FinancialTransactionDetail record in Rock.
  • ReceivedDate - this is the TransactionDateTime for the FinancialTransaction record in Rock.
  • TransactionID - this is the TransactionCode for the FinancialTransaction record in Rock.
  • ReferenceNumber - store this in the Summary field of the FinancialTransactionDetail record in Rock.
  • ContributionType - this must match one of the "Tender Type" values in your Rock DefinedTypes list. You can use the Tender Type Mapping described below to ensure matching.
  • ContributorName - combine with Amount and ReceivedDate and put into the Summary field of the FinancialTransaction record in Rock.
    <?xml version="1.0" encoding="UTF-8"?>
    <Donation>
        <Gift>
            <ChurchCode></ChurchCode>
            <IndividualID></IndividualID>
            <ContributorName></ContributorName>
            <FundName>General Offering</FundName>
            <FundCode>1</FundCode>
            <ReceivedDate>2010-12-14T15:37:36</ReceivedDate>
            <Amount>0.01</Amount>
            <TransactionID>223435</TransactionID>
            <ReferenceNumber>6054211</ReferenceNumber>
            <ContributionType>Credit Card</ContributionType>
            <ContributionSource>Mobile</ContributionSource>
        </Gift>
        <Gift>
            <ChurchCode></ChurchCode>
            <IndividualID>9399</IndividualID>
            <ContributorName>John Smith</ContributorName>
            <FundName>General Offering</FundName>
            <FundCode>1</FundCode>
            <ReceivedDate>2010-12-16T12:09:24</ReceivedDate>
            <Amount>1.00</Amount>
            <TransactionID>223849</TransactionID>
            <ReferenceNumber>6061363</ReferenceNumber>
            <ContributionType>Credit Card</ContributionType>
            <ContributionSource>Kiosk</ContributionSource>
        </Gift>
        ...
    </Donation>

##Block Info

###Block Attributes

Batch Name
The name that should be used for the batches created.

Anonymous Giver PersonAliasID
While Rock requires a PersonAliasID for each transaction, sometimes people wish to give anonymously via SecureGive. This is the PersonAliasID of a record in your Rock system that will receive credit for the contribution in these cases.

TransactionType
The type of transaction this is. Set to "Contribution".

Default Transaction Source
This is the default value that will be used if a matching Contribution Source cannot be found in Rock.

Default Tender Type Value
This is the default tender type that will be used if a matching value cannot be found in Rock.

Use negative Foreign Keys
Whether Rock uses the negative of the SecureGive ReferenceId for the contribution record's foreign key.

Tender Mappings When importing transactions from SecureGive to Rock, the SecureGive tender types may not always match up to those in Rock. You may be worrying that you'll have to clutter up your Defined Type with new tender types in Rock in order to import your financial transactions. Never Fear! Mapping is here!

With Mapping, you no longer have to clutter up your Tender Type Defined Type! Instead, for each Securegive tender type, just assign it to an equivalent Rock tender type in the following format:

SecureGive name = Rock name

Be sure to split up the different tender types with either commas or semicolons. Happy mapping!

Fund Code Mapping If the SecureGive Fund Codes do not match those in Rock, you can map a SecureGive FundCode to a Rock Account ID. Delimit each pair with a comma or semicolon and write them in the format 'SecureGive_value=Rock_value'.

Example 3=7,2=6,4=8,32=27,24=21

Source Mapping Held in SecureGive's ContributionSource field, these correspond to Rock's TransactionSource (DefinedType). If you don't want to rename your current transaction source types, just map them here. Delimit them with commas or semicolons, and write them in the format 'SecureGive_value=Rock_value'.

Example Mobile=Mobile Application,Online=Website,Recurring=Website

Batch Detail Page
The page used to display the contributions for a specific batch.

Contribution Detail Page
The page used to display the transaction details.

Clone this wiki locally