
System Context Variable ReferrerBotId can be used to check whether the BOT was invoked from BOT to BOT transfer.
To display the BOT Id, use this format {!$System.ReferrerBotId}.
ReferrerBotId will be null if the BOT was not invoked by other BOTs in the Org.
ReferrerBotId will contain a value if the BOT was invoked by another BOT in the Org.
BOT Builder Configuration:

Output:
