Record Matching - Assign a fund to a transaction

Creating and Updating a Kindful Transaction

A Transaction record in Kindful is also related to a Contact, a Campaign and a Fund.

This is important to minimize confusion with the nonprofit users. Imports that specify update for everything can get into situations where they are continually overriding data. update_exceptions can be used to minimize this issue. If the fund and fund_id are specified, those details will be assigned directly to the transaction. This allows for nonprofit users to edit the campaign's fund in the app without reassigning money.

When you import a "contact_with_transaction" using "action_type": "create" you are potentially creating a Transaction, Contact, a Campaign and a Fund. In this case, Kindful will not create a new record if an existing record is found.

When you import a "contact_with_transaction" using "action_type": "update" you are potentially creating OR updating a Transaction, Contact, a Campaign and a Fund. In this case, Kindful will not create a new record if an existing record is found, but it will update that record if there are different values than what's in Kindful.

If specific tables need to be excluded from update this can be specified with the update_exceptions below.


Examples

In the import example below, "Fruit" fund will be applied to transaction "t2", even though Campaign "Orange" was specified to belong to the "Round" fund in the preceding transaction.

This assumes that the Funds and Campaigns didn't already exist. In which case they would continue to be assigned to what they were assigned to before the import.

COPY
{
  "data_format": "contact_with_transaction",
  "data_type": "json",
  "action_type": "create",
  "data": [
    {
	    "id": "c1",
	    "first_name": "Frank",
	    "last_name": "Wilson",
	    "email":"frank@kindful.com",
	    "created_at": "2016-10-13 18:56:12 UTC",
	    "campaign": "Orange",
	    "campaign_id":"o1",
	    "fund": "Round",
	    "fund_id":"a1",
	    "transaction_id": "t1",
	    "amount_in_cents": "20000",
	    "currency": "usd",
	    "transaction_time": "2016-10-13 18:56:12 UTC"
    },
    {
	    "id": "c1",
	    "first_name": "Frank",
	    "last_name": "Wilson",
	    "email":"frank@kindful.com",
	    "created_at": "2016-10-13 18:56:12 UTC",
	    "campaign": "Orange",
	    "campaign_id":"o1",
	    "fund": "Fruit",
	    "fund_id":"p1",
	    "transaction_id": "t2",
	    "amount_in_cents": "34400",
	    "currency": "usd",
	    "transaction_time": "2016-10-13 18:56:12 UTC"
    }
    ]
}

Another scenario: if you want to assign a transaction to a specific fund without changing the campaign's relationship to a fund, specify "update_exceptions": { "campaign": "create" }

This scenario assumes that the Orange Campaign had already been created through a previous import and was assigned to a different Fund.

COPY
{
  "data_format": "contact_with_transaction",
  "data_type": "json",
  "action_type": "update",
  "update_exceptions": 
    { "campaign": "create" },
  "data": [
    {
	    "id": "c1",
	    "first_name": "Frank",
	    "last_name": "Wilson",
	    "email":"frank@kindful.com",
	    "created_at": "2016-10-13 18:56:12 UTC",
	    "campaign": "Orange",
	    "campaign_id":"o1",
	    "fund": "Fruit",
	    "fund_id":"b1",
	    "transaction_id": "t2",
	    "amount_in_cents": "34400",
	    "currency": "usd",
	    "transaction_time": "2016-10-13 18:56:12 UTC"
    }
  ]  
}