Introduction


For many organisations Chimpegration Classic is a case of exporting constituent emails and merge data to MailChimp making use of a query or an export. However there are a few more complex scenarios one of which involves exporting organisation contacts. This article takes you through the steps required to export a combination of constituents, organisation constituent contacts and organisation non-constituent contacts.


This solution assumes some knowledge of the Chimpegration Classic export module. It also assumes that your list is set up to accept both constituent and relationships. 



Background

In our made up scenario, our organisation is having an event. We want to send out an invite newsletter to various groups of people. Some will be individual constituents. Others will be contacts that belong to organisations that we want to invite. We are not able to determine exactly which individuals from those organisations to send to but we just want to send to the primary contacts. Some primary contacts will be constituents and other primary contacts will be non-constituents.


To summarise we want to include three types of records:

1. Individual constituents

2. Organisation contacts that are constituents

3. Organisation contacts that are non-constituent relationships.


For the first two we will be using the regular constituent process in Chimpegration. With the third we will process using the relationship methods in Chimpegration Classic.


For each of them we will create queries and exports. Depending on what you are going to be exporting you may be able to get away with just using a query. However this is normally problematic when a constituent or a relationship has multiple emails on their record.




1 Individual Constituents

Here is the first query which is a constituent query. Each of our queries will need to have the criteria for selecting the constituents. In our case we have an attribute category of "Q1" and a value of "Invite" but your criteria could be much more complex. We want to exclude any organisation records by ensuring that the key indicator is individual.




Now let's look at the export that we are going to be using. We select the records from the query we just created.


Here is the output for this first group. In our case we have very few merge variables; email, constituent id, primary addressee and surname (last name). 




For the phone, we use the following criteria



We are only interested in the phone type of Email. We ignore any emails where they should not be contacted. We also sort our phones by the primary and, because we are only selecting one phone, we should pick up the primary assuming it is set.




2. Organisation contacts that are constituents


This time we want to create a relationship query. The reason for this is that we want a list of all the relationship records that are contacts associated with the organisation. We use the same criteria for the constituent, in this case that the constituent has the "Q1" attribute with a description of "Invite". We also say that the constituent should be organisations only so that we do not include the individual constituents from the other query.


We need to be careful that we select our criteria from the correct branches. So far we have been selecting from the constituent branch. This selects criteria on our organisation. The remainder of the criteria will be taken from the individual branch of the query. This selects criteria from our individual contact i.e. the relationship.



On the contact we add criteria to only select contact types that we are interested in. In our case we only want primary contact types. We also select the criteria "This Individual is a Constituent" to "Yes". That way we only select the constituent contacts. This is shown below:




Our export is also a relationship export. We select our previously created query and select our four output fields. We need to make sure that we select them from the top level of fields i.e. those fields with the black border and not the constituent branch (crossed out below). The constituent branch refers to our organisation. Whereas we want the contacts i.e. relationships associated with our organisation.


Here are our selected fields. 



3. Organisation contacts that are non-constituent relationships.

For the final group of records we also create a relationship query and export. The query is very similar to the previous query. However this time the criteria "This Individual is a Constituent" should be "No" in order to select the non-constituent relationships.



For the export this is almost identical to the previous export. We use our query for the selected records and choose the fields, again from the main part of the available fields area. The main difference with the previous export is that we do not select constituent id (there would not be one for non-constituents). Instead we select the import id. This is what we use for unique id when we work with relationship records.




The Chimpegration Classic Export Process


With these three different sets of Raiser's Edge exports we now need to run them through the Chimpegration Classic export process. The first two are sent as regular constituent. With the last group we export the records to the list as relationship records. There is not a great difference other than we should select the option "Add to MailChimp as relationship". If this option is still greyed out then that means that the lits has not been set up to accept relationships. (This is done on the list tab of the main settings).