Add or Import Marketing List members contacts accounts or leads to a Dynamics CRM Marketing List using Scribe

There are multiple ways to import marketing list members such as contacts, accounts and leads to a marketing list. A common way of doing this is by creating a custom entity that links your contact (or lead or account) record to the marketing list. A plugin then fires every time a new record in this custom entity is created to add the contact to the marketing list. This is detailed in the following Dynamics Community post:

Another simpler way of importing Marketing List members such as contacts to a Dynamics CRM Marketing List is using Scribe Insight. Scribe allows you to access the many to many entity that links contacts, leads and accounts to a marketing list. This entity is called listmember which is in effect a table in the CRM database. Using Scribe, you can read directly from any source such as a text file, CSV file, XML or any other type and then Scribe can insert directly into the list member table in CRM. Once these records are created with type listmember, this will mean they are now members in the marketing list.

To explain more, assume you got a csv file with 2 contact records as follows:

first name, contact unique number, marketing list name, entity type code



* Create a new Scribe workbench dts package and select the CSV file above as your source.

* Connect to your Dynamics CRM organisation using your Scribe Dynamics CRM adaptor. Connect to the listmember table object in your Dyanamics CRM database.

*Next thing to do is to write a formulat that uses the marketing list name and contact unique number to lookup the GUID of the marketing list and the GUID of the contact record.

Your Scribe formulas will need to be applied to the target fields as follows:

ListMember Table, field listid = DBLOOKUP( S3, “CRMOrgConnectn”, “list”, “listname”, “listid” )

ListMember Table, field entityid = DBLOOKUP( S2, “CRMOrgConnectn”, “contact”, “crm_contactuniqueid”, “contactid” )

ListMember Table, field entityidtypecode = S4

Please note that the  field crm_contactuniqueid is a custom field that is used as a unique identifier for your contact records to use for looking up contacts. Any other similar field can be used.

Some Scribe screenshots to help you visualise what needs to happen:


Add Members to Marketing list using Scribe
Add Members to Marketing list using Scribe – Click to enlarge


7 Replies to “Add or Import Marketing List members contacts accounts or leads to a Dynamics CRM Marketing List using Scribe”

  1. OK, so I have had not problem, creating a Campaign, Creating a Marketing List, Adding Contacts/Leads to my marketing list. How do I assign my marketing list to my campaign in Sribe?

    Many thanks in advance


  2. Hi Edd,

    You will need to insert into the DB table that links Campaigns and Marketing Lists. It’s the table created from the many to many relationship that links the two entities.


  3. My apologies, I miss read Edd’s question in relation to this article. Still, let’s avoid suggestions to Insert into SQL Tables..

  4. Hi Jeff,

    I’m not suggesting to write directly to the CRM DB. When I say insert (using Scribe) it means using CRM API which Scribe uses. Scribe does not write directly to the database which is dangerous and not supported as you know.

  5. Hello Mohamed,

    Thanks for this. I created something similar myself today but it doesn’t seem to work. Actually, it works when I test it but not when I run the job. In the test, the lookups work as expected and the step reads as a ‘success’ but every row fails when I run it.

    The error I get reads: ‘The given key was not present in the dictionary.’

    I matched the contact in the spreadsheet to the ‘entityid’ using the email address as a lookup, then the list to the ‘listid’ using the name as a lookup. After reading your post, I also included the ‘entityidtypecode’ but this doesn’t seem to make a difference.

    Any ideas would be gratefully received!



    1. Are you looking up the contact GUID from CRM? You need to get this GUID first before you insert into listmember. Let me know how you get on.

Please comment or leave feedback