Page MenuHomePhabricator

Convert offline2civicrm to a CiviCRM extension
Open, MediumPublic

Description

This one probably wants us to split out the wrangling into apis & integrate with the core civicrm import or a generally available approach like Saurabh's csvimporter - a bit bigger & might need splitting up a bit

Related Objects

Event Timeline

Quick note to remember a thought on this: Let's maybe document the import logic and related code as we go? Thanks!!

Ejegg renamed this task from Convert offline2civicrm to a drupal module to Convert offline2civicrm to a CiviCRM extension.May 26 2022, 12:41 AM

Just noting we have got a lot of functionality into the Core CiviCRM import framework now - some interventions we might need to do

What the Benevity import doesCore import approach
1 set required columnsCore code does require sufficient colums to meet requirements - in the case of benevity these seem covered - see further down
Set gift course to Benefactor Gift if > 1000 & Community Gift if lessNeed a mapped fields hook
replace 'not shared by Donor' with ''Need a mapped fields hook
organization name logicMapped fields hook - see below

Organization name logic

  1. try nick name first, then try organization name
  2. otherwise error

Individual name logic

  • use anonymous donor if first name, last name & email are empty
  • check if there is an individual match on first_name, last_name, email - if ONE match and that contact is employed by the org OR there is an email it's a match
  • if more than one match look for one already employed by the import employer

Note employed by is defined as

  1. existing employee relationship or
  2. existing soft credit - 2 might be obsolete as it reflected the system being introduced when the soft credit relationships were not there

Required columns

Benevity nameCiviCRM nameCiviCRM required
Companyorganization_nameyes- for soft credit match
Donor First Namefirst_nameYes - for individual import or required soft credit match
Donor Last Namelast_nameYes - for individual import or required soft credit match
Emailemaildedupe-rule dependent, yes
Total Donation to be Acknowledgedtotal_amountyes
Match Amountsoft credit amountyet
Transaction IDtrxn_idnot so much
Currencyoriginal_currencywe need to map
datereceive_dateyes

Benevity - do in Mapping

  • 'original_currency' - map to original currency - this can be a default for the whole import
  • fee - map to fee amount