salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.52k stars 2.09k forks source link

Prospects and ProspectLists not available through the V8 modules API #9049

Open shaung999 opened 3 years ago

shaung999 commented 3 years ago

Issue

I need to query a target (Prospect) by email as a response to a campaign, however, it seems there is no access to Prospects or ProspectList API, when I issue a {suite.url}/V8/meta/modules request neither Prospects (Targets) nor ProspectLists (Target lists) are returned in the available modules.

Expected Behavior

I should be able to interact with Prospects in the same way I can with Leads or Contacts.

Actual Behavior

Nothing as the modules are not available

Possible Fix

My first assumption was that the this was an ACL issue as the module appeared in the $moduleList, however, after step by step debugging through the whole process I found that that actual issue was the $modInvisList (also in globals) contained both Prospects and ProspectLists (and a number of other modules), which implies at some point it was decided not to include these, by removing both of these from the $modInvisList they became available and during my testing (mainly create, search and get) they seem to function exactly as Leads and Contacts.

I am raising this bug report so that I can provide a hot-fix for review but also (as I am very new to this product) to ensure that I have not missed something fundamental.

Steps to Reproduce

Any call to {suite.url}/V8/meta/modules.

Please see this link for the full commentary on the issue

Context

I am using my workaround until this is updated as I have an extremely complex target management process that runs across a number of different systems, so for me personally this was a V. HIGH requirement, but for the general use I guess this would be MEDIUM

Your Environment

rmetcalf9 commented 11 months ago

I want to be able to add a lead to a target list via the api as well.

chris001 commented 11 months ago

Normally, when a Prospect responds to a Campaign, you convert (upgrade) that Prospect to a Lead.

rmetcalf9 commented 11 months ago

Yes, after bashing my head against a brick wall looking for an API I found that I could use SuiteCRM workflow to automatically add new leads to target lists. I was able to put descriptions into the lead record and have the workflow trigger on the description and add to the right target list. Very annoying but it forced me to learn the suiteCRM workflow feature which is very powerful and easy to use. Still, the functionality should be in an API.