OMS Pro: Quote Converter
The process of converting a quote into a site visit is done via a Python script which is stored externally on AWS Lambda. The script itself will not fail: if for some reason the quote has not successfully converted to a Site Visit, the problem is usually that the quote is large, and running through the Python script took longer than the 15 minutes AWS allows. In these cases, the Python script will need to be downloaded into VS Code and run locally. It is available below, and it is also saved to the systems@locdoc.net Google Drive.
The script communicates with TrackVia via API, so the only thing you need to do is replace the asterisks in event = {"API_ID": ****} on line 609 with the API_ID that corresponds to the quote you are converting.
To run the script, open a bash window in a machine which has Python installed and type:
>> python3 quote2.py If you choose to save the python file as something other than "quote2", change the command you input into bash accordingly.
The code may take a while to run for larger quotes, but once it has finished, exit Python and check the Site Visit table in TrackVia to make sure the new Site Visit has been successfully created.
Troubleshooting:
If a Site Visit exists but is incomplete or otherwise incorrect, find the Location/Facility record associated with the Quote and then locate the new Site Visit (confirming that the Creation Date matches the day the Quote Converter tried to run). Delete all of the child records associated with the Site Visit, then delete the Site Visit, and then run the script locally.
Use systems@locdoc.net to log in to AWS Lambda, and read through the Cloudwatch logs to see what error is being output by the Quote as it runs through the script.
Check for a Comm Note that is shared by both the original Quote and the new Site Visit, which simply says "Quote converted to Site Visit". This would have been created during the final step of the Quote Converter Script. If it exists, the script likely finished successfully.