Discussion posts and replies are publicly visible
Assuming you have access to the Content Tools plug-in, you should be able to pass a constant name and grab its UUID and then its Object ID using a combination of rules. I'd suggest you encapsulate this in an expression rule for the sake of error handling, but here it is at its core:
extract( getcontentdetailsbyuuid( getconstantorruleuuidbyname("TEST_CONSTANT_NAME") ), "Id: ", ", Parent:" )
Thanks a lot