Flags and phantom modules are used primarily in the home control / automation macros in AHP.
However in your example; a flag might be used if you wanted two motion sensors to trigger within a window of time before starting the recording process, and neither motion sensor was in the AHP monitored house code.
You would set a flag when the first sensor tripped, and reset it at the end of your time requirement window. Your record macro would be to start recording when the second sensor tripped AND flag was still set.