Skip to content

Commit

Permalink
Merge pull request #129 from vtex-apps/docs/session_watcher_intro
Browse files Browse the repository at this point in the history
docs: Add Session Watcher intro
  • Loading branch information
fredppm authored Feb 26, 2024
2 parents c5d47a8 + ed402a1 commit 8191cde
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Changed
- Add intro description about Session Watcher

## [1.39.1] - 2024-02-09

### Fixed
Expand Down
7 changes: 6 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ If you would like to develop your own app and integrate it with **Storefront Per

Once you are done developing and installing your own app, if you have [Storefront Permissions UI](https://developers.vtex.com/vtex-developer-docs/docs/vtex-storefront-permissions-ui), the features of your app associated with each role will be automatically loaded on the **Storefront Permissions** page. For more details on this, read our documentation on the [Storefront Permissions UI](https://developers.vtex.com/vtex-developer-docs/docs/vtex-storefront-permissions-ui) app.

### Session Watcher

The session watcher is based in the [session transformation feature](https://developers.vtex.com/docs/guides/vtex-io-documentation-collecting-user-session-data#configuring-vtexsession) to update the cart fields with Buyer [Organization data](https://github.com/vtex-apps/b2b-organizations): `Shipping Address`, `Profile` and `Marketdata` ( `utmCampaign` with `organization.id` and `utmMedium` with `costCenter.id` )

To activate it, [use the mutation](#setSessionWatcher).

### GraphQL queries

Expand Down Expand Up @@ -288,7 +293,7 @@ mutation impersonateUser($userId: ID)
}
```

#### setSessionWatcher
#### <a href="#setSessionWatcher"></a> setSessionWatcher

If your account is not using `vtex.b2b-organizations` you may want to disable the Session Watcher to avoid unnecessary operations. To do so, set the `active` property to `false` in the mutation exemplified below.

Expand Down

0 comments on commit 8191cde

Please sign in to comment.