Page 1 of 1

Agent Email

PostPosted: Tue Mar 18, 2014 12:58 pm
by smead
I'm working on an email script to use with the Dispo URL and can't seem to find the variable for agent email anywhere. I see where to input the email in Admin > Phones, but what do I use to pull this information?

Re: Agent Email

PostPosted: Tue Mar 18, 2014 4:54 pm
by mflorell
The variable is only in the database, it isn't passed anywhere in the agent web interface currently.

Re: Agent Email

PostPosted: Tue Mar 18, 2014 6:20 pm
by williamconley
Syntax for each field is the same as "Scripts". So you can create a fake script and drop in the agent email address to get the exact syntax, then (assuming you understand URLs and GET) you'll have what you need to construct your dispo_url.

Note that you can ALWAYS use the phone/user to extract similar information from the database directly if you want to. Do be cautious as there is now also an "email" field assigned to the Users in addition to the one for Phones. Be sure you get the right one and be sure you test it. 8-)

Re: Agent Email

PostPosted: Tue Mar 18, 2014 10:12 pm
by smead
Wow I didn't even see it there in the user section, lol. How can I differentiate between the lead email and the agent email? Vicidial_users shows the field as 'email', but $_REQUEST('email') yields the lead email

Re: Agent Email

PostPosted: Wed Mar 19, 2014 10:57 am
by williamconley
that would be where you use the script builder's dropdown to find the field names for you.

Re: Agent Email

PostPosted: Wed Mar 19, 2014 11:05 am
by smead
It's not in there. The only email field is 'email', which produces the lead's email. This happens to be the same field name used in the vicidial_users to store the users email. Is there a way to specify the database/table to pull the info from?

Re: Agent Email

PostPosted: Thu Mar 20, 2014 7:52 am
by williamconley
If it's not there, you can use php to grab the value directly from the DB.

Also consider testing by putting a sample page in your web_form or web_form 2 fields and "dumping" the URL to see if the value you seek appears anywhere. These two fields will generate ALL available fields if not specifically told to only generate certain ones. So put in a php page, and use PHP to dump the contents to the screen (or just copy the url generated and paste it into a text editor, split into lines at "&" for ease of reading).

Beware of pushing the web form button when there is no entry, it will push to a sourceforge.net page that you do not own and WILL push the username AND PASSWORD of the agent to that site. 8-)

If not, then you could consider paying to have it added (The Vicidial Group or a 3rd party developer like poundteam) or adding it yourself or ... grab it from the DB directly when you need it. Grabbing from the DB is powerful, as then you can actually grab anything you want. PHP is a marvelous tool.