I have a feeling I've been phrasing this question incorrectly in my searches, so it was time to suck it up and actually ask real people. My apologies if this winds up being in the wrong place.

This is about trigger events for addons on completion of an instance, be it a scenario, dungeon, raid, etc.

I know there is a popup that comes up on the completion of any dungeon, and I know there is an event that I can hook into for completed dungeons via the LFG utility. However if I want to know when any dungeon / scenario finishes, even if the people walked into the doorway manually or manually selected the dungeon, how would I know?

More specifically I've been trying to figure out when a guild group completes a dungeon challenge, is there anything non-hacky for figuring out if say guild group X did it and not guild group Y?

I appreciate any pointing in the right direction, this has been driving me mad for weeks now.