Automation error: Copy photos from service to linked site¶
When Tom goes out to quote a site, he takes photos of the site. When he creates the opportunity and the linked service, he uploads these photos to the service.
The service then appears in the ‘CopyPhotosToSiteRecord’ view in the ‘Services’ table. This triggers the ‘Copy photos from service to linked site’ script within the ‘15-min automation 1’ automation.
Unfortunately, if the service is not linked to a site, this script fails, and every time it fails, it sends me an email to say it failed. And it runs every 15 minutes.
Sometimes the solution is as simple as asking Tom to link the service to a site. Then the script will execute successfully (and the emails will stop).
But in some cases, it won’t be that simple. For example, the most recent time it happened, the error was on Service 3107. I asked Tom to link this service to a site, but it turns out this service was an older service that was linked to the original opportunity for this client. The original opportunity was terminated/lost.
Tom had manually created a new opportunity and linked services. So when I asked him to link the service to a site, he didn’t look for a service with the number I supplied, he looked for a service that was linked to the current opportunity for that client. Although he was technically wrong in doing this, because he didn’t follow my instructions, it was understandable that he would do it the way he did, because he thinks in terms of current opportunities, not IDs.
In any case, he linked a site to the current service, but because that wasn’t the service that was causing the error, doing so didn’t resolve the error.
Eventually I asked him about it, and he told me what he had done, and I manually linked the old service to the same site as the new service, and the error resolved itself.
There are two points to remember/address here:
- If I get this error in future, investigate with there are additional opportunities and services involved, because the same thing may have happened again.
- Tom did not duplicate the original opportunity to create the new one. He manually did it. But even if he had duplicated the opportunity, the photos attached to any of the original opportunity’s linked sites would not have been duplicated. Even though the duplication automation duplicates the services linked to the opportunity, it does not duplicate their linked photos.
- Tom simply forgot to add the photos to the new service. I’ve told him to try to remember to do this, but it’s understandable that he forgot. These things happen.
The real problem in all of this seems to be some sort of intermittent bug with the ‘Add site to service’ Airtable form:
This form is invoked by opening a service linked to an opportunity, then clicking the + button in the {Site} field, then clicking the + button in the dropdown.
Tom says that sometimes/often, the {Primary org} field in this form is disabled. And when it’s disabled, he can’t add the site, so he’s left with no choice but to create a new service and/or a new opportunity.
I can’t see any reason why it would be disabled. There’s nothing in the form setup itself (it’s set to always display the field, and the field is mandatory), and the field in the table has no user permissions associated with it.
I’ve asked Tom to let me know when it happens again, so I can investigate.