How to output test results into the BDD that executed it

I am not sure if this topic is completly relevant to this forum, but I am trying to achieve the following:

I want to excute automation mobile tests with Cucumber where I run:

Then User books a room booking ID:

Where Booking ID is actually returned by the funtion that the BDD itself runs, some people in my company have this functionality but they are using a propertiry platform that I want to avoid using.

My current setup is: Cucumber BDD executing Kotlin script with Appium 2.xx