Skip to content

Commit 4a24b1a

Browse files
authored
Merge pull request #2099 from vtexdocs/EDU-15731
EDU-15731 - Delivery Promise FastStore (segunda fase)
2 parents a0fc3ed + 85b58b4 commit 4a24b1a

File tree

1 file changed

+9
-42
lines changed

1 file changed

+9
-42
lines changed

docs/faststore/components/features/delivery-promise.mdx renamed to docs/faststore/components/features/delivery-promise/implementation.mdx

Lines changed: 9 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
11
---
2-
title: "Delivery Promise"
2+
title: "Implementing Delivery Promise"
3+
updatedAt: "2025-08-15T14:36:33.694Z"
34
---
45

56
>ℹ This feature is in closed beta, which means that only selected customers can access it. If you are interested in implementing it in the future, please contact our [Support](https://support.vtex.com/hc/en-us) team.
67
78
In this guide, you’ll learn how to configure Delivery Promise in your FastStore project.
89

9-
**Delivery Promise** is a feature that provides accurate and reliable delivery estimations for available products based on the customer location. It ensures that customers only see products that are in stock and can be delivered to their address or picked up at nearby locations.
10-
11-
This solution continuously updates product availability throughout the buying journey by responding to changes in catalog, pricing, inventory, or shipping settings. These updates are then sent to [Checkout](https://developers.vtex.com/docs/guides/checkout-overview) and [Intelligent Search](https://help.vtex.com/tracks/vtex-intelligent-search), ensuring customers see up-to-date options based on their region.
12-
13-
This feature introduces new hooks as part of the regionalization and location workflow:
14-
15-
- `useRegion`: Accesses or updates the user's region information, such as postal code or location.
16-
- `useRegionModal`: Handles modal display logic for region selection, especially when the location input is required.
17-
- `useGeoLocation`: Uses the browser’s geolocation API or other client-side methods to attempt to auto-detect the user's location.
10+
To understand how Delivery Promise operates, see the guide [Delivery Promise (Beta)](https://developers.vtex.com/docs/guides/faststore/features-delivery-promise-overview).
1811

1912
## Default settings
2013

@@ -29,8 +22,8 @@ deliveryPromise: {
2922
},
3023
```
3124

32-
- `enabled`: When set to **true**, Delivery Promise activates, allowing the store to provide delivery estimates based on the user’s location.
33-
- `mandatory`: When set to **false**, providing a postal code is optional for the user. Users can browse and add items to the cart without entering their postal code, though the accuracy of delivery information may be limited.
25+
* `enabled`: When set to **true**, Delivery Promise activates, allowing the store to provide delivery estimates based on the user’s location.
26+
* `mandatory`: When set to **false**, providing a postal code is optional for the user. Users can browse and add items to the cart without entering their postal code, though the accuracy of delivery information may be limited.
3427

3528
## Before you begin
3629

@@ -111,11 +104,11 @@ Run the `faststore cms-sync` command to sync the `cms` folder of your FastStore
111104

112105
The expected response is that you receive the message `CMS synced successfully...`. The native regionalization components and sections will be automatically updated. You can check them in the VTEX Admin:
113106

114-
- **Regionalization component:** Go to *Storefronts > Headless CMS > Global Sections > NavBar > Navigation > Regionalization*.
107+
- **Regionalization component:** Go to **Storefronts > Headless CMS > Global Sections > NavBar > Navigation > Regionalization**.
115108

116-
- **Region Bar section:** Go to *Storefronts > Headless CMS > Global Sections > Region Bar*.
109+
- **Region Bar section:** Go to **Storefronts > Headless CMS > Global Sections > Region Bar**.
117110

118-
- **Region Modal section:** Go to *Storefronts > Headless CMS > Global Sections > Region Modal*.
111+
- **Region Modal section:** Go to **Storefronts > Headless CMS > Global Sections > Region Modal**.
119112

120113
You only need to [add a new section](#step-3-adding-region-popover-section), the `Region Popover`.
121114

@@ -316,7 +309,7 @@ Follow the steps below to add the `RegionPopover` section to the Headless CMS.
316309

317310
Learn more in [Adding Sections to the Headless CMS](https://developers.vtex.com/docs/guides/faststore/headless-cms-3-adding-content-types-and-sections#step-3-adding-sections-to-the-headless-cms)
318311

319-
### Step 4 - [Optional] Defining a default postal code
312+
### Step 4 - (Optional) Defining a default postal code
320313

321314
The default postal code is a fallback mechanism when the user doesn't provide a location, isn't logged in, or has no saved address.
322315

@@ -343,29 +336,3 @@ To set a default postal code for your store, follow the steps below:
343336
person: null,
344337
},
345338
```
346-
347-
## Understanding location priority
348-
349-
To provide accurate Delivery Promise estimates, FastStore projects determine user location based on the following priority:
350-
351-
1. **User-provided location:** If the user provided their location, such as postal code, this information is used.
352-
2. **Logged-in user’s address:** If the user hasn’t provided a postal code, we attempt to identify the location using the logged-in user's address.
353-
3. **Default postal code:** If the user hasn't provided a location, isn’t logged in, or has no saved address, we check if the merchant has configured a default postal code for all buyers. Learn to do so in [Defining a default postal code](#step-4-optional-defining-a-default-postal-code).
354-
4. **No postal code (not required):** If no postal code is provided and not required, products are displayed without using Delivery Promise.
355-
5. **No postal code (required)**: If no postal code is provided when it's required, a modal is displayed that the buyer can't close until a postal code is entered. To make the postal code required, open your `discovery.config.js` file and change the `mandatory` field in the `deliveryPromise` object to `true`, as shown in the [Default settings](#default-settings) section.
356-
357-
To better understand how this flow works, see the following diagram.
358-
359-
```mermaid
360-
graph LR
361-
A{"User provided location?"} -- Yes --> B(["Use the provided location"])
362-
A -- No --> C{"Logged-in user's address available?"}
363-
C -- Yes --> D(["Use the logged-in user's address"])
364-
C -- No --> E{"Default postal code configured?"}
365-
E -- Yes --> F(["Use the default postal code"])
366-
E -- No --> H{"Postal code mandatory?"}
367-
H -- Yes --> K(["Display mandatory postal code modal"])
368-
K --> L["User inputs postal code"]
369-
L --> M(["Use the provided postal code"])
370-
H -- No --> N(["Display products without using Delivery Promise"])
371-
```

0 commit comments

Comments
 (0)