Add Omnimmembergroup load functions

Authored by Eileenmcnaughton on Jul 17 2017, 3:59 AM.


Add Omnimmembergroup load functions

Perhaps I'm just Silverpopped out but this felt a bit harder to keep generic &
keep the lines between what should do what. I've cut a few corners, trying to do more
wmf-like handling in the main load function. Hopefully I've mitigated that somewhat
with tests & comments.

This should allow us to get our group of contacts with no id & to create into our DB with

drush cvapi 'Omnigroupmember', 'load', array('mail_provider' => 'Silverpop', 'group_identifier' => 18468760, 'group_id' => 777);

Whre group_identifier is the id in the phab & group_id is the id of an as-yet-to-be-created
group in CiviCRM.

Data brought in is

  • email
  • language (if we can figure out what it is)
  • country (if matching DB countries)
  • source is a combo of the fact it is silverpop + the source in the rml form + the submit date

I thought about putting submit date in created_date but it's arguable whether that is a good idea as there are 2 separate events. That can't be done through the api on create if we do wish to.

  • is_opt_out - see notes below

Is OPT out
in the data set I got some contacts were already opted out. I need to dig a little
more here as there is opt in and opt out and I'm not sure if opt in is the absence of opt
out or an active opt in. There are some flags that can be set when fetching data that
can manipulate what is fetched to I need to answer that here.

Also, although I was purposely not setting the 'skip ones already downloaded' some of
my later downloads seemed a little light - I need to do a little more testing to check that

I think clarifying these opt-out questions is probably the last step in the silverpop chunk of

Bug T160949

Change-Id: Ia0dc97b84603ca3cd32aba17094593cfad95900f


EileenmcnaughtonJul 17 2017, 3:59 AM
rWFCG6c25d13fa16f: Update Omnimail GET to add rml fields