When some custom data/attributes are sent in a WebChat request (customer side/widgets), they will be available in the conversation, as participant attributes, with a "context." prefix.
(ex: sending "subject" in the WebChat request - "context.subject" in the conversation participant's attributes)
Apparently, they have taken into account this "context." prefix, for chat conversations, in the PEF UI.
I have created an Architect Chat flow, where I have set "context.MyTestValue" (Set Participant Data).
In PEF, I have defined "participant.MyTestValue" as interactionDetails for chat and the value appeared properly in the UI.
These aren't context values I'm passing through from the widget, they're participant data I'm setting in the inbound chat flow which are being pulled from the data table lookup. When I set participant data in inbound call flows they have to be prefixed with "participant." in the framework.js
I don't have a problem if this is expected behaviour I'll work with it, I just wanted to make sure if it was expected or not.
What I was trying to say is that engineers, who have created the code for PEF (I am not one of them), probably implemented a default behavior where they are expecting the participant data to start with "context." when it is a chat interaction/conversation.
(as this is what happens to the data sent in the WebChat create - sent by a customer when requesting a new chat via Guest Chat API).
So in your framework.js, you would set participant.BrandColour.
And in your Architect Chat flow, you would use "context.BrandColour" for your Set Participant Data.
You can open a case with Genesys Cloud Care to report this behavior (so they can ask to update the documentation if it is the expected behavior, or change PEF otherwise).