So Iāve got a situation where a client has āmedia contactsā that are a custom module and separate from leads and contacts. The idea is these are newspaper/blog contacts, etc that will be notified of new products, etc.
Theyād like to use campaigns to send newsletters. However, when I create campaigns to a target list comprised of contacts from a custom module it says in wizard āYou cannot send a marketing email until your subscription list has at least one entry. You can populate your list after finishing.ā
Iāve created a many to many relationship between āmedia contactsā and ātarget listsā so adding them to a target list is no problem.
It just keeps telling me there are no targets on the list.
Iām guessing I have to add some code to add āmedia contactsā to ātargetsā
Anyone ever done this and can point me in the right direction. Iāve Googled but not a lot of relevant stuff.
I do see this in the error log (event though Iāve created the relationship)
No luck, the procedure outlined seems to duplicate functionality thatās already there by adding Target List - Custom Module relationship. That already worked.
The problem was when you add the target list to the Campaign, it says there are no Targets in the list. This same problem exists with the solution noted.
Even when you add a custom contact to a target list, even though they are on the list, it counts 0 targets on the list??? Thatās the part thatās driving me crazy.
I guess Iām stuck, everything seems to work like it supposed to for a custom module in terms of target lists and campaigns, except that it doesnāt find any targets on the list (even though there are contacts from a custom module). Is this a bug, or something that required custom coding?
Thought Iād give this one a bump. I have the occasion to do this every once in a while and have never been able to find a solution to make a custom module (persons) be able to work with Campaigns. I can make a relationship between target lists and the custom module, I can add custom module people to th target list. I can add the target list to the campaign. However, the campaign reports no targets in list???
Am I missing a relationship somewhere, or do I have to somewhere designate my custom module of people as targets?
Thanks @pgr !!! Iāll try that out, hope itās as simple as adding the require onceā¦ email interface to the custom module. Iāll do some testing and report back.
Ok tried adding the require once to to the custom module, didnāt crash it , but didnāt work either. The other thing I noticed is the custom module for āpeopleā doesnāt seem to support the concept of āmanage subscriptionsā that contacts, leads and targets do. Hmm, everything else seems to integrate seamlessly except for the Campaign Target lists.
Did you add the implements EmailIInterface to your class declaration?
You would also need to define any functions that the interface requires, but inspecting the interface I see it is empty, so nothing should be required.
Do you have any Emailinterface messages in your logs?
Hey @pgr, yes I added the implementsā¦ and looked for anything else in the leads/contacts/targets that seemed relevant, I tried adding the $campaigns too, but still nothing. I just canāt figure out where or how the campaign module is calculating zero targets either. I tried to hunt that down to see if it would give me a clue.
I was never able to solve this one. Iāve been trying to solve this for like 4 years. Iāve tried a whole bunch of stuff along with the suggestions above but just canāt seem to get the campaigns module to work with a custom module of contacts.
Thanks @pgr for chiming inā¦ I can get the custom module contacts to be added to a target list, no problem. I can add that target list to the campaign, no problem. The problem is that the ācampaignā doesnāt see the targets. It counts ā0ā targets in list and then when you try to send you get an error that there are no targets found in target lists.
There are in fact contacts on the target list. I guess somehow it doesnāt recognize them as ātargetsā.
** by āContactsā I mean my custom module āFreelancersā contacts. I have a relationship between Target Lists and Freelancers. Which allows me to add them to the target list.
Do your target entries get registered in prospect_lists_prospects relationship table, or is it in a different table, due to being a custom module? Have a look in your database.
Cool. Remember that here weāre only battling the warning message when the count fails; but if we solve this one, we will probably hit a bump further ahead - getting the custom āprospectsā added to the queue.
So I think we should look for a solution to make things work everywhere - something like tweaking the freelancers relationship to use the prospect_lists_prospects table too.