using API.php insert new leads in Vicidial via vtiger CRm

Any and all non-support discussions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

using API.php insert new leads in Vicidial via vtiger CRm

Postby derbyjozef » Wed Feb 10, 2010 12:13 am

hello there,

i want to insert my new leads which are coming from vtiger CRM,

can anyone suggest me how can i insert that lead data in vicidial using api.php? i have check all of it there is only lead updation option in API.php but i want to insert my new leads in vicidial using api.php, is that possible???? ..

don't suggest me to change in api.php because vicidial service is provided by third party so i cann't do that :)
derbyjozef
 
Posts: 2
Joined: Tue Feb 09, 2010 11:42 pm

Postby ramesh » Wed Feb 10, 2010 12:21 am

Hello

You have to do changes in api.php to get ur desired output....
or
You have to use "new_listloader_superL.php" to upload new lead.....
ramesh
 
Posts: 2
Joined: Wed Feb 10, 2010 12:18 am

Postby ramesh » Wed Feb 10, 2010 12:22 am

ramesh wrote:Hello

You have to do changes in api.php to get ur desired output....
or
You have to use "new_listloader_superL.php" to upload new lead.....

Good It will useful to me
ramesh
 
Posts: 2
Joined: Wed Feb 10, 2010 12:18 am

Postby derbyjozef » Wed Feb 10, 2010 12:24 am

ramesh wrote:
ramesh wrote:Hello

You have to do changes in api.php to get ur desired output....
or
You have to use "new_listloader_superL.php" to upload new lead.....

Good It will useful to me


Thanks but i don't need to do that
derbyjozef
 
Posts: 2
Joined: Tue Feb 09, 2010 11:42 pm

Postby mflorell » Wed Feb 10, 2010 9:36 am

There are two APIs, the Agent-API and the non-agent-API

The agent API allows you to update a lead that an agent has active on their screen.

The non-agent-API has an add_lead function that allows you to add a new lead.

Documentation on both are available in the docs directory.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Postby aouyar » Wed Feb 10, 2010 11:23 am

A client needed to do Click2Dial calls from custom CRM application. The Agent API permits pausing agent session (external_pause method) and launching the call (external_dial method) and the Non-Agent API method add_lead permits inserting a new lead, but the add_lead method is not so easy to use, because the list_id must be passed on to the method.

I ended up doing some changes to Agent API to add a new method (external_dial_lead) to insert a lead and generate a call in one step. You can check the following issue in Mantis for more details on the implementation:
http://www.vicidial.org/VICIDIALmantis/view.php?id=241

There have been many changes in api.php since I implemented this feature, so the code is quite outdated now. I am planning to update the patch in a few weeks time, and who knows maybe we can still get it into 2.2. A client is actively using this feature, and I would implement it a bit differently after observing the actual usage patterns. I would keep the steps for inserting leads and dialing separate, so that an option to repeat a call to the same lead could be implemented in the external applications.

I would just implement an alternative add_lead method that does not require the list_id argument. (The original add_lead method requires the list_id and this piece of information is not readily available to external applications. It seems more sensible to me to avoid giving direct access to vicidial tables from external applications, in an ideal world all accesses should be through controlled API calls.) The alternative method can receive the agent_user as an argument and check Manual Dial List of the actual campaign of the agent_user and add the lead to this list so that it does not require that the external application pass the list_id.
aouyar
 
Posts: 124
Joined: Fri Jan 30, 2009 12:49 pm

Postby aouyar » Fri Mar 19, 2010 2:59 pm

I've re-implemented this feature. I left out the changes for reorganizing the code to eliminate the deep nested if statements, so that to patch would blend in more easily with the existing Agent API code in api.php. The new patch does not touch existing code at all; the only changes that are included are for introducing the new external_add_lead method.

The external_add_lead method checks in which campaign the agent_user is logged in and adds a new lead in the Manual Dial List of the campaign. When the external application invokes the external_dial method the information for the new lead is pulled from the list.

You can check Mantis for the patch:
http://www.vicidial.org/VICIDIALmantis/view.php?id=241
aouyar
 
Posts: 124
Joined: Fri Jan 30, 2009 12:49 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 36 guests