You've not supplied any details on this UPS - other than a link to a web page that says the unit is discontinued. The best source of information for your question is probably the manufacturer. The mfr. does have a Q&A section on their page which seems to be supported, as someone (you maybe) have asked this question today.
One thing that might help is to consider the fact that the RPi has its own power supply specifications. These specifications include a Power Supply Warning at 4.63 V. And so one criteria to consider would be to monitor this warning signal, and use it to safely shut down. And so - if your UPSHAT can monitor its own output voltage - that might be the way to do it.
Another approach would be to monitor the system's Low Voltage Warning. I've not done this myself, but I understand that GPIO 35 can be read. A couple of references that may help: ref 1, ref 2. Note that this approach is by no means a "proven path" (GPIO35 is not even "pinned out" to the header), and its availability and function are subject to firmware changes by The Foundation - i.e. it may be a "loosey-goosey" arrangement.