-
Notifications
You must be signed in to change notification settings - Fork 99
EDU-16363: Configuring Shopper entity access (My Account B2B) #2311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Preview LinksOpen this URL to set up the portal with this branch changes. You can now access the edited pages with the following URLs:
|
Navigation Preview LinkNo changes detected in the navigation.json file |
Documentation feedback for docs/faststore/components/storefront-features/my-account/overview.mdxOkay, I've reviewed the provided Guide and have identified several areas for improvement based on the given rules. 1. General Feedback: The guide provides a clear explanation of how to enable the experimental My Account feature in a FastStore B2B store. However, it needs some adjustments to fully comply with the specified rules, especially regarding the frontmatter, tone, and structure of instructions. The introduction is a bit verbose and could be more concise. The "Before you begin" section is adequate, but the instructions section is too short and lacks detailed steps. 2. Actionable Feedback:
3. Suggested Revision: ---
title: "Enabling the Experimental My Account Feature"
slug: enabling-the-experimental-my-account-feature
excerpt: "Learn how to enable the experimental My Account feature in your B2B FastStore store."
createdAt: "2024-01-01T00:00:00Z"
updatedAt: "2024-01-01T00:00:00Z"
hidden: false
---
> ⚠️ This is an experimental feature only available for B2B stores. B2C stores should continue using the [previous version](https://developers.vtex.com/docs/guides/faststore/go-live-4-integrating-the-vtex-order-placed-and-my-account).
In this guide, you will learn how to enable the experimental **My Account** feature in your B2B FastStore store. Enabling this feature allows your customers to manage their accounts directly within FastStore.
> ⚠️ Unlike the previous version of My Account, which was based on the [VTEX IO](https://developers.vtex.com/docs/guides/vtex-io-documentation-what-is-vtex-io) platform and accessed through a subdomain configured in the [`discovery.config.js`](https://developers.vtex.com/docs/guides/faststore/project-structure-config-options) file, the new version uses a FastStore-based setup that allows you to enable and manage **My Account** directly within FastStore. This feature is available only for B2B stores. B2C stores should continue using the previous version, [Integrating VTEX Order Placed and My Account](https://developers.vtex.com/docs/guides/faststore/go-live-4-integrating-the-vtex-order-placed-and-my-account). While this article discusses the Order Placed page, the experimental feature covered in this guide is solely related to the My Account section.
## Default My Account pages
My Account includes several default pages that are essential for managing a customer's account.
| Page path | Description |
| --------- | ----------- |
| `src/pages/pvt/account/orders/[id].tsx` | Displays individual order details, including items, quantities, prices, and statuses. |
| `src/pages/pvt/account/user-details.tsx` | Displays the user’s personal information, such as name, email, and contact details. |
| `src/pages/pvt/account/security.tsx` | Displays security settings, including password management. |
| `src/pages/pvt/account/profile.tsx` | Displays editable profile settings, allowing users to update personal information. |
| `src/pages/pvt/account/orders/index.tsx` | Displays a list of all past and current orders placed by the user, including summary details for each. |
## Before you begin
Ensure you are using the latest version of `@faststore/cli`. If not, update it by following the instructions in [Updating the `@faststore/cli` package version](https://developers.vtex.com/docs/guides/faststore/project-structure-updating-the-cli-package-version).
## Instructions
To enable the experimental **My Account** feature, follow these steps:
### Step 1 - Open the `discovery.config.js` file
Open the `discovery.config.js` file in your FastStore project. This file is located in the root directory of your project.
### Step 2 - Set the `enableFaststoreMyAccount` flag to `true`
In the `experimental` object within `discovery.config.js`, set the `enableFaststoreMyAccount` value to `true`.
```js discovery.config.js mark=2
experimental: {
enableFaststoreMyAccount: true,
}
```
### Step 3 - Save and commit your changes
Save the changes you made to the `discovery.config.js` file. Then, commit these changes to your Git repository.
### Step 4 - Push your changes to the main branch
Push your committed changes to the `main` branch of your Git repository. This will deploy the changes to your production environment.
> ⚠️ With the `enableFaststoreMyAccount` flag set to `true`, users accessing the `/pvt/account` path will be redirected to the `/pvt/account/profile` page. The `enableFaststoreMyAccount` flag overrides the URL specified in the [`accountUrl`](https://developers.vtex.com/docs/guides/faststore/project-structure-config-options#accounturl) property of the `discovery.config.js` file. If the flag isn't set or is set to `false`, users will be redirected to the URL configured in the `accountUrl` property.
## Next steps
Now that you have enabled the experimental **My Account** feature, you can:
- **Extend My Account**: Create custom pages or add new sections to the default pages by following the guide [Extending My Account](https://developers.vtex.com/docs/guides/faststore/my-account-extensions).
- **Configure Shopper entity access**: Enable access to Shopper information (such as the "Ordered by" card) by following the guide [Configuring Shopper entity access](https://developers.vtex.com/docs/guides/faststore/my-account-configuring-shopper-entity-access).Was this feedback useful?
|
Documentation feedback for docs/faststore/components/storefront-features/my-account/configuring-shopper-entity-access.mdx{
"General Feedback": "The guide is well-structured and provides clear instructions on configuring Shopper entity access. However, there are some areas where the content can be improved to better align with the guide writing rules, particularly in terms of verb tense, active voice, and imperative verbs in step titles.",
"Actionable Feedback": [
{
"location": "Title",
"feedback": "The title is good, but consider if 'Configuring Access to Shopper Entities' might be more direct.",
"suggestion": "Consider rephrasing the title to 'Configuring Access to Shopper Entities' if it improves clarity."
},
{
"location": "Step 1 title",
"feedback": "The step title is missing the imperative verb.",
"suggestion": "Change to '### Step 1 - Create a Role with Dynamic Storage Permissions'"
},
{
"location": "Step 1, point 1",
"feedback": "Use imperative verb.",
"suggestion": "Change to 'Access the VTEX Admin and go to Account Settings > User Roles.'"
},
{
"location": "Step 2 title",
"feedback": "The step title is missing the imperative verb.",
"suggestion": "Change to '### Step 2 - Generate an API Key'"
},
{
"location": "Step 2, first paragraph",
"feedback": "Use imperative verb.",
"suggestion": "Change to 'After creating the role, generate an API key to authenticate FastStore's server-side requests to VTEX services.'"
},
{
"location": "Step 3 title",
"feedback": "The step title is missing the imperative verb.",
"suggestion": "Change to '### Step 3 - Add Credentials to Your Project'"
},
{
"location": "Step 3, first paragraph",
"feedback": "Use imperative verb.",
"suggestion": "Change to 'Add the API credentials to your project using environment variables.'"
}
],
"Suggested Revision": "````\n---\ntitle: \"Configuring Shopper entity access\"\nhidden: true\nexcerpt: \"Learn how to configure API credentials to enable Shopper entity data in your B2B FastStore My Account pages.\"\n---\n\nTo enable access to shopper information in My Account pages, such as the data displayed in the **Ordered by** card on the order details page, you need to configure the appropriate permissions and API credentials.\n\n## Before you begin\n\nMake sure you have [enabled the My Account feature](https://developers.vtex.com/docs/guides/faststore/my-account-overview) in your B2B FastStore project.\n\n## Instructions\n\n### Step 1 - Create a Role with Dynamic Storage Permissions\n\n1. Access the VTEX Admin and go to **Account Settings > User Roles**.\n2. Create a new role or edit an existing one by adding the **Dynamic Storage** product to the role.\n\n \n\n3. Under **Resources**, select the **Read only documents** permission.\n4. Save the role.\n\n### Step 2 - Generate an API Key\n\nAfter creating the role, generate an API key to authenticate FastStore's server-side requests to VTEX services. This API key will be used by your FastStore project to securely fetch Shopper entity data from Dynamic Storage.\n\n1. In the VTEX Admin, go to **Account > API Keys**.\n2. In the **Generated** tab, click `Generate Key`.\n3. Complete the fields with the following:\n\n | Field name | Description | Value example |\n | ------------------ | --------------------------------------- | -------------------- |\n | Key identification | Name that identifies the key | `FS SHOPPER API KEY` |\n | Roles | Select one or more roles for the key | Select the role created in Step 1, `FS shopper entity` |\n\n4. Click `Generate`.\n\n> ⚠️ After generating the API key, the **App Key** and **App Token** will be displayed only once in the interface. Copy and securely save both credentials immediately, as you'll need them in the next step.\n\n### Step 3 - Add Credentials to Your Project\n\nAdd the API credentials to your project using environment variables. You can add them by [using WebOps secrets](#using-webops-secrets) or, for local development, by [using the `vtex.env` file](#using-env-file-for-local-development).\n\n#### Using WebOps secrets\n\nFollow the [Managing Secrets](https://developers.vtex.com/docs/guides/faststore/security-managing-secrets) guide to securely store your credentials to your project:\n\n| Key | Value |\n| ---------------------- | -------------------- |\n| `FS_DISCOVERY_APP_KEY` | `YOUR_APP_KEY` |\n| `FS_DISCOVERY_APP_TOKEN` | `YOUR_APP_TOKEN` |\n\n> ⚠️ Replace `YOUR_APP_KEY` and `YOUR_APP_TOKEN` with the **App Key** and **App Token** credentials you saved in the [previous step](#step-2-generating-an-api-key).\n\n#### Using `.env` file for local development\n\nFor local testing, you can use the `vtex.env` file as described in the [local development](https://developers.vtex.com/docs/guides/faststore/security-managing-secrets#local-development) guide.\n\n1. Create or open the `vtex.env` file in your project root.\n2. Add the following environment variables using the credentials from Step 2:\n\n ```env\n FS_DISCOVERY_APP_KEY=YOUR_APP_KEY\n FS_DISCOVERY_APP_TOKEN=YOUR_APP_TOKEN\n ```\n\n> ❗ Never commit your `.env` file or expose your API credentials in public repositories.\n\nOnce configured, your My Account pages will have access to Shopper entity data, enabling features like displaying who placed an order and filtering orders by shopper.\n````"
}Was this feedback useful?
|
Grammar review summaryReview for
|
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Grammar review summaryReview for
|
docs/faststore/components/storefront-features/my-account/configuring-shopper-entity-access.mdx
Show resolved
Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
eduardoformiga
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I only left a suggestion regarding the shopper filter that will be removed.
docs/faststore/components/storefront-features/my-account/configuring-shopper-entity-access.mdx
Outdated
Show resolved
Hide resolved
docs/faststore/components/storefront-features/my-account/overview.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: Eduardo Formiga <[email protected]>
| Now that the experimental **My Account** feature is enabled in your project, you can: | ||
|
|
||
| - **Extend My Account**: Create custom pages or add new sections to the default pages by following the guide [Extending My Account](https://developers.vtex.com/docs/guides/faststore/my-account-extensions). | ||
| - **Configure Shopper entity access**: Enable access to Shopper information (such as the "Ordered by" card) by following the guide [Configuring Shopper entity access](https://developers.vtex.com/docs/guides/faststore/my-account-configuring-shopper-entity-access). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[link-check] reported by reviewdog 🐶
🚨 Found a broken link in a Markdown Link (Error 404):
https://developers.vtex.com/docs/guides/faststore/my-account-configuring-shopper-entity-access
👉 Please review this link before merging your Pull Request.
Grammar review summaryReview for
|
| |Field name | Description | Value example | | ||
| | --------- | ----------- | ----- | | ||
| | Key identification | Name that identifies the key | `FS SHOPPER API KEY` | | ||
| | Roles | Select one or more roles for the key | Select the role created in Step 1, `FS shopper entity` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 [Grammar reviewer] reported by reviewdog 🐶
For consistency and clarity, proper nouns or specific role names like 'FS Shopper Entity' should be capitalized, similar to 'FS SHOPPER API KEY' in the same table.
| | Roles | Select one or more roles for the key | Select the role created in Step 1, `FS shopper entity` | | |
| | Roles | Select one or more roles for the key | Select the role created in Step 1, `FS Shopper Entity` | |
|
|
||
| ### Using WebOps secrets | ||
|
|
||
| Follow the [Managing Secrets](https://developers.vtex.com/docs/guides/faststore/security-managing-secrets) guide to securely store your credentials to your project: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 [Grammar reviewer] reported by reviewdog 🐶
The preposition 'in' is more appropriate than 'to' when referring to the location where credentials are stored within a project.
| Follow the [Managing Secrets](https://developers.vtex.com/docs/guides/faststore/security-managing-secrets) guide to securely store your credentials to your project: | |
| Follow the [Managing Secrets](https://developers.vtex.com/docs/guides/faststore/security-managing-secrets) guide to securely store your credentials in your project: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 [Grammar reviewer] reported by reviewdog 🐶
Rephrased for better flow and emphasis.
dev-portal-content/docs/faststore/components/storefront-features/my-account/overview.mdx
Line 7 in 7457eb1
| >⚠️ This is an experimental feature only available for B2B stores. B2C stores should continue using the [previous version](https://developers.vtex.com/docs/guides/faststore/go-live-4-integrating-the-vtex-order-placed-and-my-account). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 [Grammar reviewer] reported by reviewdog 🐶
Standardized spelling for 'e-commerce' in technical documentation.
dev-portal-content/docs/faststore/components/storefront-features/my-account/overview.mdx
Line 11 in 7457eb1
| **My Account** is a crucial component for any ecommerce website, as it allows customers to manage their personal information, track order history, update security settings, and perform other account-related actions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 [Grammar reviewer] reported by reviewdog 🐶
- Used 'via' for conciseness and improved readability.
- This information is redundant as it is already stated in the warning box on line 7. Removing it improves conciseness.
- Clarified that 'this article' refers to the linked previous version, not the current guide, for better clarity.
dev-portal-content/docs/faststore/components/storefront-features/my-account/overview.mdx
Line 13 in 7457eb1
| >⚠️ Unlike the previous version of My Account, which was based on the [VTEX IO](https://developers.vtex.com/docs/guides/vtex-io-documentation-what-is-vtex-io) platform and accessed through a subdomain configured in the [`discovery.config.js`](https://developers.vtex.com/docs/guides/faststore/project-structure-config-options) file, the new version uses a FastStore-based setup that allows you to enable and manage **My Account** directly within FastStore. This feature is available only for B2B stores. B2C stores should continue using the previous version, [Integrating VTEX Order Placed and My Account](https://developers.vtex.com/docs/guides/faststore/go-live-4-integrating-the-vtex-order-placed-and-my-account). While this article discusses the Order Placed page, the experimental feature covered in this guide is solely related to the My Account section. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 [Grammar reviewer] reported by reviewdog 🐶
Rephrased for more natural and direct language.
dev-portal-content/docs/faststore/components/storefront-features/my-account/overview.mdx
Line 29 in 7457eb1
| Make sure you're using the latest version of `@faststore/cli`. If the version is not updated, see [Updating the `@faststore/cli` package version](https://developers.vtex.com/docs/guides/faststore/project-structure-updating-the-cli-package-version). |
Types of changes