Hi Bill, you don’t need to generate the channel ID, but the Channel ID will be created when the first user comes on the chatbox of a page. You could then add subsequent users of the same dynamic page to that channel. To accomplish this you could store the user generated chat channels of the different dynamic pages in a database.
I recently posted an example code which is for a different scenario, for business chat and not p2p as in your question. In my example, each who starts a chat, or signs up for your site, is stored in a database. Each entry in the database consists of their user ID and the chat channel that they have created. In the example, I use this to send a message to a specific user.
You have received good replies from Shan and Verbal above, so to proceed…
Make sure that you have a good read of the Wix Chatbox API that Shan already linked too, so that you can get a feeling of the code and an understanding of what it all does etc. https://www.wix.com/corvid/reference/$w.Chatbox.html
If you can’t get it sorted by using the Wix API Reference, Verbal’s code example or the Corvid example, then please come back and post up any issues that you are getting along with the code that you have used (in a code block please) and any screenshots that might help to explain it more too.