Best practices for loading customer info on inbound call
Posted: Thu Dec 21, 2023 4:27 pm
Hello all
I hope this is the right forum. I searched for similar posts and they were kind of all over the place. Anyway, new cluster is up and running (specs in my footer I hope) and now being tasked with starting customizations.
This first one the higher-ups want done yesterday
Goal: When an inbound call comes in (which is 95%+ of our calls) have the agent screen populate with information about the customer loaded via API.
To start, I just want to get Name, Address, and maybe a custom field or two filled in so I'm pretty sure I can just stick with the agent screen and not necessarily use a script. Proof of concept.
I have seen methods regarding adding lists and using CIDLOOKUP, but unfortunately that won't work in this scenario. There are data we need pulled from third-party sources that can change by the minute regarding our existing customers.
Here are the ways I can currently think to do this, but as I am somewhat new to Vicidial customization (but not PHP nor customizing other systems) I would appreciate any feedback about existing best practices for this, working implementations, or anything to especially avoid doing.
1) Start Call URL to send Phone to a handler script, have that script do the API calls by searching via Phone, and then use the agent api update_fields to fill in the fields on the agent screen. Will this work for custom fields? I may have missed it here https://vicidial.org/docs/AGENT_API.txt but I'm not sure. Also, is a reload necessary after sending data? Like formreload? I assume a form is something different than the main agent screen page.
Most importantly, will this (meaning the Vicidial part of it) work like I'm thinking it will to be able to load that information to the screen?
2) Modify the page directly to pull in the information. This worries me because that page seems to be integrated into a lot of things, but also seems to be the most direct way and avoids a few extra requests.
3) Build it into a script/iframe using the same general process as option 1 but then returning the data to the frame using my own method. I assume I still need a handler to capture the Start Call URL and that it can't be sent directly, and I also assume that the script can't be set to load by default, so if those are true I'm not sure what advantage this would have initially. Eventually it may be useful if a lot more fields need to be loaded that I can't shoehorn into the fields on the main screen.
A few other things I'm unclear about after reading the manuals and forum posts:
Any guidance, feedback, etc., is very appreciated. Happy to provide more information if needed. Thanks!
I hope this is the right forum. I searched for similar posts and they were kind of all over the place. Anyway, new cluster is up and running (specs in my footer I hope) and now being tasked with starting customizations.
This first one the higher-ups want done yesterday
Goal: When an inbound call comes in (which is 95%+ of our calls) have the agent screen populate with information about the customer loaded via API.
To start, I just want to get Name, Address, and maybe a custom field or two filled in so I'm pretty sure I can just stick with the agent screen and not necessarily use a script. Proof of concept.
I have seen methods regarding adding lists and using CIDLOOKUP, but unfortunately that won't work in this scenario. There are data we need pulled from third-party sources that can change by the minute regarding our existing customers.
Here are the ways I can currently think to do this, but as I am somewhat new to Vicidial customization (but not PHP nor customizing other systems) I would appreciate any feedback about existing best practices for this, working implementations, or anything to especially avoid doing.
1) Start Call URL to send Phone to a handler script, have that script do the API calls by searching via Phone, and then use the agent api update_fields to fill in the fields on the agent screen. Will this work for custom fields? I may have missed it here https://vicidial.org/docs/AGENT_API.txt but I'm not sure. Also, is a reload necessary after sending data? Like formreload? I assume a form is something different than the main agent screen page.
Most importantly, will this (meaning the Vicidial part of it) work like I'm thinking it will to be able to load that information to the screen?
2) Modify the page directly to pull in the information. This worries me because that page seems to be integrated into a lot of things, but also seems to be the most direct way and avoids a few extra requests.
3) Build it into a script/iframe using the same general process as option 1 but then returning the data to the frame using my own method. I assume I still need a handler to capture the Start Call URL and that it can't be sent directly, and I also assume that the script can't be set to load by default, so if those are true I'm not sure what advantage this would have initially. Eventually it may be useful if a lot more fields need to be loaded that I can't shoehorn into the fields on the main screen.
A few other things I'm unclear about after reading the manuals and forum posts:
- For an inbound call from a caller that has never called this new system before, is a lead automatically created?
- Is a lead actually necessary to update these fields? For example, if I'm not using CIDLOOKUP and therefore no lead is pulled. (Unless it is automatically created as asked above)
- Sometimes it seems like a lead will be tied to multiple customer phone numbers, and I'm unclear why, so would this present problems?
Any guidance, feedback, etc., is very appreciated. Happy to provide more information if needed. Thanks!