gesso config
The gesso config
command is used to create or update the necessary Gesso configuration file for your project. The gesso.config.json
file is tailored to different platforms based on initial Gesso project setup.
Usage
To generate or update the configuration, run:
pnpm gesso config [platform]
If no platform is specified, the base configuration will be generated.
Base Configuration
{
"redirectedCheckout": true,
"hasPrimaryAddress": true,
"commercePlatform": "SHOPIFY",
"erpPlatform": "",
"pinnedItemsPages": ["ai", "catalog", "productDetails"]
}
Field Descriptions
- redirectedCheckout: A boolean indicating if the checkout process is redirected.
- hasPrimaryAddress: a Boolean indicating if primary address is supported by the commerce provider.
- commercePlatform: Specifies the commerce platform type. In this example, it is set to
SHOPIFY
. - erpPlatform: Specifies the ERP platform type if applicable.
- pinnedItemsPages: An object whose properties are the page routes where the PinnedItemBar component will be displayed when there are pinned items. Default pages include AI chat (
"ai"
), catalog/search pages ("catalog"
), and product detail pages ("productDetails"
).
Platform-Specific Configurations
Big Commerce
When generating a configuration for the Big Commerce platform, the gesso.config.json
file will include the following fields:
{
"bigCommerceStorefrontUrl": "https://pat-acromedia-test-site.mybigcommerce.com",
"bigCommerceStoreHash": "i81fnkycaa",
"bigCommerceBearerToken": "12345"
}
Field Descriptions
- bigCommerceStorefrontUrl: The URL of your Big Commerce storefront.
- bigCommerceStoreHash: The unique hash for your Big Commerce store.
- bigCommerceBearerToken: The bearer token used for authenticating API requests.
Drupal Commerce
No specific configuration required.
Shopify
When generating a configuration for the Shopify platform, the gesso.config.json
file will include the following fields:
{
"shopifyStoreDomain": "https://gesso-dev-store.myshopify.com",
"shopifyAccessToken": "Access Token from Shopify"
}
Field Descriptions
- shopifyStoreDomain: The domain of your Shopify store.
- shopifyAccessToken: The access token used for authenticating API requests.
Acumatica
For the Acumatica platform, the configuration will look like this:
{
"acumaticaUrl": "https://acumatica.gesso.acrobuild.com/AcumaticaERP",
"acumaticaClientId": "B549CF61-518A-0A01-D369-AB54E7D3B0A3@Company"
}
Field Descriptions
- acumaticaUrl: The URL of your Acumatica site.
- acumaticaClientId: The client ID used for authenticating API requests.
Examples
Generating Base Configuration
To generate the base configuration without specifying a platform:
pnpm gesso config
Generating Big Commerce Platform Configuration
To generate the configuration for the Big Commerce platform:
pnpm gesso config bigcommerce
Generating Drupal Commerce Platform Configuration
To generate the configuration for the Drupal Commerce platform:
pnpm gesso config drupal-commerce
Generating Shopify Platform Configuration
To generate the configuration for the Shopify platform:
pnpm gesso config shopify
Generating Acumatica Platform Configuration
To generate the configuration for the Acumatica platform:
pnpm gesso config acumatica
Configuring pinnedItemsPages
The pinnedItemsPages
configuration allows you to specify which pages should display the PinnedItemBar component when users have pinned items. This setting accepts an array of page route patterns.
Default pinnedItemsPages
If no custom configuration is provided, the following default pages will display the pinned items bar:
"/ai"
- AI chat page"/catalog"
- Catalog listings page"/product/*"
- Product detail pages (wildcard pattern)
For New Projects
When creating a new Gesso project, you can specify custom pinned items pages using the --pinnedItemsPages
option:
pnpm create @acromedia/gesso my-project --pinnedItemsPages='["/ai", "/your-custom-page", "/product/*", "/categories"]'
Complete example with multiple options:
pnpm create @acromedia/gesso my-store \
--commerce=shopify \
--cms=drupal \
--pinnedItemsPages='["/ai", "/catalog", "/product/*", "/checkout", "/account/*"]'
For Existing Projects
You can update the pinned items pages configuration in an existing project using the gesso config
command:
pnpm gesso config --pinnedItemsPages='["/ai", "/your-custom-page", "/product/*"]'
```'
pinnedItemsPages Patterns
The pinnedItemsPages
array supports both exact matches and wildcard patterns:
- Exact match:
"/ai"
- Only matches the/ai
route exactly - Wildcard pattern:
"/product/*"
- Matches any route starting with/product/
(e.g.,/product/123
,/product/shoes/nike
)
Verifying Configuration
After setting up your pinned items pages, you can verify the configuration by checking the generated files:
In gesso.config.json
:
{
"pinnedItemsPages": ["/ai", "/catalog", "/product/*"]
}
In .env
:
GESSO_PINNED_ITEMS_PAGES=["ai", "catalog", "productDetails"]
The pinned items bar will only appear on the specified pages when users actually have items pinned. The component automatically handles showing/hiding based on the current route and pinned items state.