Skip to content

Commit dcd3132

Browse files
committed
docs(datastore-integration-webflow): add note on field name conversion in README
1 parent 6a077d3 commit dcd3132

File tree

1 file changed

+12
-0
lines changed
  • src/functions/datastore-integration-webflow

1 file changed

+12
-0
lines changed

src/functions/datastore-integration-webflow/README.md

+12
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,18 @@ The webhook:
147147
- will assume that there is a field named `price` in your Webflow collection.
148148
- will fetch the data from your collection directly, find item with `sku` matching the `code` and compare the `price` field. It will approve the purchase if the price is the same as it is stored in your collection, and the inventory is sufficient.
149149

150+
#### Note on Field Name Conversion
151+
152+
The field name that you see in the CMS Editor (in the designer) might not be the actual name of the field.
153+
154+
When fields are defined in the CMS, their names are automatically normalized in the API. For example, a field named `Product Code` in the CMS is converted to `product-code` in the API response.
155+
156+
Important: Once a field name is set and used in the API, it remains fixed—even if the label in the CMS is later changed.
157+
158+
To ensure proper functionality, configure your environment variables (such as `FOXY_FIELD_CODE`) with the converted field name (e.g., product-code) rather than the original display name.
159+
160+
You can request the schema for that specific collection list using the webflow API and work with the property name presented in the JSON response.
161+
150162
# Deploy your webhook
151163

152164
These are instructions for deploying the webhook to Netlify.

0 commit comments

Comments
 (0)