Skip to content

Commit 6cc9d92

Browse files
add doc about context change
1 parent 4fba362 commit 6cc9d92

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

content/extensions/ui-extensions.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,31 @@ Example :
309309
```
310310
After receiving this *event*, the PIM will send a PostMessage *event*, similar to the one sent after the iframe loading.
311311

312+
**Product and product model context change**
313+
314+
Using postmessage, the PIM context is propagated within the iframe when it changes. This only applies to the product and product model positions: pim.product-model.header and pim.product.header.
315+
316+
The message contains :
317+
- A `context` object containing the configured `locale` and `channel`.
318+
- A `user` object containing the `uuid`, `username` and `groups` of the connected user.
319+
320+
Example :
321+
```json
322+
{
323+
"context": {
324+
"locale": "en_US",
325+
"channel": "ecommerce"
326+
},
327+
"user": {
328+
"username": "admin",
329+
"groups": [
330+
"IT support",
331+
"All"
332+
]
333+
}
334+
}
335+
```
336+
312337
#### Ensuring security of embedded iframes
313338

314339
To help ensuring the security of iframes we recommand using these two solutions:

0 commit comments

Comments
 (0)