Page 1 of 1

dispo_move_list.php - doesn't seem to be working.

PostPosted: Mon Apr 11, 2016 1:56 am
by edooze
Hi all,

See build details in sig.

My dispo call URL is as follows:

Code: Select all
VARhttp://192.168.1.2/agc/dispo_move_list.php?lead_id=--A--lead_id--B--&new_list_id=24224204&dispo=--A--dispo--B--&user=--A--user--B--&sale_status=SALE---APPT&reset_dialed=N&log_to_file=1&phone_code=--A--phone_code--B--&phone_number=--A--phone_number--B--&title=--A--title--B--&first_name=--A--first_name--B--&BusinessName=--A--BusinessName--B--&last_name=--A--last_name--B--&address1=--A--address1--B--&address2=--A--address2--B--


As you can see, I'm trying to make it transfer all fields across to the new list, I've not been able to clearly work out how this script works.

The list still has 33 leads in it, the same as yesterday, but my agents have statused 15 more SALEs.

Here's a sample from the log:
Code: Select all
2016-04-11 09:45:43|99|20079||------|DECL|1104|XXXX||1|DONE: dispo is not a sale status: DECL|
2016-04-11 09:48:04|99|19726||------|DECL|1104|XXXX||1|DONE: dispo is not a sale status: DECL|

This seems correct, DECL is not a sale status.

What am I missing?

Thanks for any help.

Re: dispo_move_list.php - doesn't seem to be working.

PostPosted: Mon Apr 11, 2016 7:40 pm
by MJCoate
Hello,

So, there's a couple things wrong with this which is probably why it's not working properly:

1) Most of the fields you've defined are not actually used by the dispo_move_list script. There's no need to pass all of the lead data into the script as it's not supported and it's going to follow the lead anyway.
2) You're missing "pass=--A--pass--B--"

If you open the script up in an editor, you'll find the beginning has an explanation of how the script works and what parameters it takes. I've pasted it below for you to read. Try setting the script up via the info below and see if that fixes your problem.

Code: Select all
# dispo_move_list.php
#
# Copyright (C) 2016  Matt Florell <vicidial@gmail.com>    LICENSE: AGPLv2
#
# This script is designed to be used in the "Dispo URL" field of a campaign
# or in-group. It should take in the lead_id to check for the same lead_id
# in order to change it's list_id to whatever new_list_id is set to. The
# sale_status field is a list of statuses separated by three dashes each '---'
# which contain the statuses for which the process should be run.
#
# This script is part of the API group and any modifications of data are
# logged to the vicidial_api_log table.
#
# This script limits the number of altered leads to 1 per instance and it will
# not run if the search field of the lead is empty.
#
# Example of what to put in the Dispo URL field:
# VARhttp://192.168.1.1/agc/dispo_move_list.php?lead_id=--A--lead_id--B--&dispo=--A--dispo--B--&user=--A--user--B--&pass=--A--pass--B--&new_list_id=10411099&sale_status=SALE---SSALE---XSALE&reset_dialed=Y&log_to_file=1
#
# Another example of what to put in the Dispo URL field(using status exclude with talk trigger):
# VARhttp://192.168.1.1/agc/dispo_move_list.php?lead_id=--A--lead_id--B--&dispo=--A--dispo--B--&talk_time=--A--talk_time--B--&user=--A--user--B--&pass=--A--pass--B--&new_list_id=332&sale_status=DNC---BILLNW---POST&exclude_status=Y&talk_time_trigger=240&log_to_file=1
#
# Example of what to put in the No Agent Call URL field:
# (user needs to be NOAGENTURL and pass needs to be set to the call_id)
# VARhttp://192.168.1.1/agc/dispo_move_list.php?lead_id=--A--lead_id--B--&dispo=--A--dispo--B--&user=NOAGENTURL&pass=--A--call_id--B--&new_list_id=10411099&sale_status=SALE---SSALE---XSALE&reset_dialed=Y&log_to_file=1
#
# Definable Fields: (other fields should be left as they are)
# - log_to_file -       (0,1) if set to 1, will create a log file in the agc directory
# - sale_status -       (SALE---XSALE) a triple-dash "---" delimited list of the statuses that are to be moved
# - exclude_status -    (Y,N) if set to Y, will trigger for all statuses EXCEPT for those listed in sale_status, default is N
# - talk_time_trigger - (0,1,2,3,...) if set to number greater than 0, will only trigger for talk_time at or above set number, default is 0
# - new_list_id -       (999,etc...) the list_id that you want the matching status leads to be moved to
# - reset_dialed -      (Y,N) if set to Y, will reset the called_since_last_reset flag on the lead
#    Multiple sets of statuses:
# - sale_status_1, new_list_id_1, reset_dialed_1, exclude_status_1 - adding an underscore and number(1-99) will allow for another set of statuses to check for and what to do with them
#

Re: dispo_move_list.php - doesn't seem to be working.

PostPosted: Mon Apr 11, 2016 9:10 pm
by edooze
MJCoate wrote:1) Most of the fields you've defined are not actually used by the dispo_move_list script. There's no need to pass all of the lead data into the script as it's not supported and it's going to follow the lead anyway.
2) You're missing "pass=--A--pass--B--"

If you open the script up in an editor, you'll find the beginning has an explanation of how the script works and what parameters it takes. I've pasted it below for you to read. Try setting the script up via the info below and see if that fixes your problem.


Thanks, I'll try that.

The new URL is:
Code: Select all
VARhttp://192.168.1.2/agc/dispo_move_list.php?lead_id=--A--lead_id--B--&dispo=--A--dispo--B--&user=--A--user--B--&pass=--A--pass--B--&new_list_id=24224204&sale_status=SALE---APPT&&log_to_file=1&reset_dialed=N


I've also reset the log.

I couldn't make sense of the instructions, it had an example but no explanation.

I didn't know whether it was passing all the information through the script, I figured the new list might not know all the custom fields, and would have to be told of the ones I wanted transferred. Do they have to be the same fields? Do they have to be in the same order? Do I need to create the list first with a sample from the lead list?
I also didn't realise there needed to be a username or password associated. Does the script log in seperately to make this change? Does it create a new user session when it does so in order to pass the info across? Will this log as a second login for the user when we run reports?

This is a great feature for how we operate our call center, but we rely on the custom fields to make it useful.

I'll post back with how I get on with the change.

Thanks for the help.

Re: dispo_move_list.php - doesn't seem to be working.

PostPosted: Mon Apr 11, 2016 10:58 pm
by mflorell
Custom fields are tied to the original list that the lead was in, so they don't need to be transferred for a lead to keep its original custom field data.

When you move a lead to a new list, all you are doing is changing the "list_id" field for the lead record. No data needs to be exported or imported for this to happen.

The user/pass that are needed are to authenticate that this agent is logged in, and that they handled this lead. This is to prevent abuse of this script.

Re: dispo_move_list.php - doesn't seem to be working.

PostPosted: Tue Apr 19, 2016 9:15 pm
by edooze
Thanks for the help, guys, that seems to have fixed the issue.

Unfortunately, the comments from the previous list don't seem to carry across. I might need to post a new issue as we're having some issues with the comments in general, but is this a known issue, or should they come across fine?

At this stage, when clicking for the history next to the comments box (currently displaying all screens) there is no history unless the lead has been dialed in that list before.

Thanks.

Re: dispo_move_list.php - doesn't seem to be working.

PostPosted: Tue Apr 19, 2016 9:21 pm
by williamconley
1) try updating to the latest (yours isn't that old, but it also ain't that new!)

2) is the entry_list field populated in the lead when it's been moved to a new list? (this is how the system knows where the custom data is ... it may also relate to previous comments ...).

3) Which type of comments do you mean? per call notes? audited comments on lists? ...

Re: dispo_move_list.php - doesn't seem to be working.

PostPosted: Wed Apr 20, 2016 12:24 am
by edooze
1) Thanks, I've been meaning to update, but with so many other things on my plate I've let sleeping dogs lie, as it were. It's on the to-do list.

2) Sorry, I'm not sure where that field is, or even that I've seen it before. The URL I'm using is copied above, if that helps?

3) Per call notes currently don't display in comment history. Comments history I have just enabled, but as discussed it only displays for the last call made by me once the lead had entered that list. Other agents have made the initial calls, so it could be an issue related to different users, but I'd hope not.

Re: dispo_move_list.php - doesn't seem to be working.

PostPosted: Wed Apr 20, 2016 3:25 pm
by williamconley
per call notes and audited comments (which manages comments history) are separate things. which one are you trying to use?

if you have not activated audited comments, then the commend field is ... just a field. there is no history. an agent who deletes the prior comment and then enters his own has deleted the previous data. audited comments (part of the QC module added a few years ago), pulls the comments out of that field and stores them in a separate table (which then becomes visible by pressing the comment history button). but per call notes is not part of this routine and does not share the data.

You may wish to review the manager's manual for how these two completely separate note taking systems work. They each have advantages/disadvantages and have to be activated either per list or per campaign.

entry_list is a field on each lead. Check one of the leads with which you have this problem directly in the vicidial_list table and search for that field. if it's not populated, but you've moved the lead to a new list ... that could be part of your challenge. However, I'm not entirely certain that it would be related. Just a possibility.