Setting up Sales App extensions
Learn how to set up extensions for Sales App in your store.
This feature is in beta, and we're working to improve it. If you have any questions, please contact our Support.
VTEX Sales App Extensibility lets you customize the default assisted-sales journey with features that support your business requirements.
By using predefined extension points, you can integrate external APIs, use VTEX data, and add custom experiences to areas such as cart and checkout, the side menu, and the product details page.
In this guide, you'll learn how to set up Sales App extensions for your stores.
Before you begin
-
Set up your FastStore monorepo. The monorepo uses a
faststore.jsonfile at the repository root to define module settings such aspathsandportsfor local development and production. -
Install the VTEX Sales App on your account, complete the onboarding in VTEX Admin, and add a sales associate linked to a store. For detailed instructions, see the guide VTEX Sales App - Basic settings.
Instructions
Step 1 - Installing the Sales App package
Add the Sales App modules to your monorepo:
_10yarn add @vtex/sales-app -D -W
_10npm add @vtex/sales-app -D
Step 2 - Creating a Sales App project
Ensure the following information is available:
- The store account name for which you're creating extensions.
- The module you want to initialize a project. In this case, it's
sales-app. - The path where you want to initialize the project.
Run the following commands in your terminal:
_10yarn fsp create
_10npx fsp create
As an example, consider the account store-a and the path ./store-a/sales-app. Remember to fill in the prompts according to your project requirements:
_10> ? What's the account name? store-a_10> ? Which module do you want to initialize? sales-app_10> ? What should be the path to initialize sales-app? ./store-a/sales-app
After running the command, the folder is created at the root of your monorepo based on the path you provided. Your monorepo structure should look similar to this:
_11📂 account-monorepo_11│_11├──📂 store-a_11│ └──📂 sales-app_11│ └──📂 src_11│ └── 📂 components_11│ │ └──📄 Example.tsx_11│ ├──📄 Example.css_11│ ├──📄 index.tsx_11│ └──📄 package.json_11└──📄faststore.json
Project structure
The src/index.tsx file at the root of your project is the entry point for all VTEX Sales App extensions you create. It looks like this:
The defineExtensions function connects the extensions you create to the extension point where they should appear. You can create your extensions in separate files and then import them into index.tsx to keep your project organized.
This function also helps during development by showing available extension points with autocomplete and type-checking, making the setup easier and less error-prone. To build your extension, use the hooks, types, and helper functions available in the @vtex/sales-app package. For more information, see the Sales App extension hooks and types guide.
The src/components/Example.tsx file includes a sample extension point. You can import CSS files, such as Example.css, to define classes and make them available globally. Organize your code however best fits your project, either by separating implementation and styling into different files or by keeping everything in a single file. For additional information about CSS, refer to CSS styling in VTEX Sales App Extensibility
The faststore.json file should include a sales-app entry like the following:
_10{_10 "store-a": {_10 "sales-app": {_10 "path": "./store-a/sales-app",_10 "port": 3002_10 }_10 }_10}
The
fsp createcommand updatesfaststore.jsonautomatically. Review the generated values to make sure the account name,path, andportmatch your project.
Step 3 - Configuring the project as a workspace
Register the new project as a workspace in the root package.json file so the package manager can discover it and install dependencies correctly.
For example, if you're using Yarn, your package.json should include:
_10{_10 "workspaces": [_10 "store-a/sales-app"_10 ]_10}
After a workspace is declared, run the install command at the root of the monorepo:
_10yarn install
_10npm install
Step 4 - Previewing extensions in development
After installing the dependencies, start your storefront development environment with the CLI:
_10yarn fsp dev store-a
_10npx fsp dev store-a
The VTEX Sales App is available at the /sales-app/checkout/cart path on the URL provided by the FastStore CLI. You should see a screen similar to this:

You can also access the VTEX Sales App locally using the path and port values defined in faststore.json. For example, if the file specifies port 3002, open http://localhost:3002/sales-app/checkout/cart.