@KogurA61 - You can get the user id of the person who is using the bot. It depends on the hosting application. If they have the user id and they store it in any cookie or session storage variable you can access it from Pega side.
For the chat history you can refer the work item that is created under "Work-Channel-Chat" class. It should hold all the history related to inbound and outbound messages. Are you using customer service also?