Page 1 of 1

Updating lead information via Non Agent API

PostPosted: Wed Feb 20, 2013 5:27 pm
by jthayne
I have been through the Manager Manual and the forums, and have found no help resolving my issue with the update_lead function.

Our business rules require that on occasion, a lead's primary phone number needs to be updated. I am able to log into VICIDial Admin and update the primary phone number on the admin_modify_lead page. However, I am unable to update phone_number via non_agent_api.php. Is there something that is preventing the update? Is there another script I can use?

My only other option is to delete the lead and re-add it which seems like a bit of overkill.

Thanks,
Joseph

Re: Updating lead information via Non Agent API

PostPosted: Wed Feb 20, 2013 5:30 pm
by mflorell
That is probably because nobody has every requested that option, and because the main phone number is one of the searching options for the update_lead function.

I'm sure it could be added as an update field.

Re: Updating lead information via Non Agent API

PostPosted: Wed Feb 20, 2013 8:53 pm
by williamconley
And if you need something while waiting for the modify_lead api call to change, you should realize that this is easily modified with straight mysql from any sql client. If you have a "system" making the request, that system could instead run the sql command directly. Depends a bit on the trust level of the system placing the api call.

But I do agree that any field should be updatable via api. Just that until someone pays for that ... it likely won't exist! 8-)

Re: Updating lead information via Non Agent API

PostPosted: Wed Feb 20, 2013 8:55 pm
by mflorell
You don't have to pay for it if you can write and post a patch diff file to the Issue Tracker for yourself :)

Re: Updating lead information via Non Agent API

PostPosted: Thu Feb 21, 2013 1:45 pm
by jthayne
I have sent in a patch for the update. Thanks for the help!

Re: Updating lead information via Non Agent API

PostPosted: Thu Feb 21, 2013 6:13 pm
by williamconley
5 posts and already posting a patch! way to go.

it is often customary to post a link to the patch in Vicidial Issues here on this thread for ease of reference for those interested (especially Matt!).

But still, posting a patch after being here for 5 posts. Wow.