4 min read • Updated 9 days ago

Validate Webflow CMS product pricing with Foxy Automations

Use Foxy Automations to validate Webflow CMS product pricing before allowing an order to go through.


Overview

Note: Foxy Automations is in beta and not publicly linked to from the Foxy admin. You can access it by copying the following URL into your browser: https://store-STORE_ID.automations.foxy.io/ Replace STORE_ID with your Foxy store ID (this is available in the url when you go to the Foxy admin at http://admin.foxy.io/)

The following article will walk you through setting up a pre-checkout webhook to validate product pricing when a customer attempts to place an order.


Create Webflow API Token

  1. 1

    In Webflow, go to Site Settings.

  2. 2

    From the side navigation, click on Apps & Integrations.

  3. 3

    Under the API Access section, click the Generate API token button.

  4. 4

    Enter a name for the API Token (ie: Foxy Pre-checkout Webhook)

  5. 5

    Under Permissions > CMS choose Read-only.

  6. 6

    Click Generate token button

  7. 7

    Copy the API token and store it somewhere safe (this will be used in another step).


Get Webflow CMS Collection ID

  1. 1

    From the Webflow editor, go to the CMS tab.

  2. 2

    If you have product variants, click on the Settings option for your Variants CMS collection. If you do not have product variants, click on the Settings option for your Products CMS collection.

  3. 3

    At the top of the Settings page, copy the Collection ID (this will be used in another step).


Create Foxy Automations Workflow

  1. 1

    Download this file.

  2. 2

    Go to your Foxy Automations link (https://store-STORE_ID.automations.foxy.io/ Replace STORE_ID with your Foxy store ID).

  3. 3

    From the Overview page, click the Create Workflow button at top right of page.

  4. 4

    On the new workflow page, click the (three dots) button at top right of page.

  5. 5

    Choose Import from File… and select the file downloaded from step 1.


Configure Webflow CMS Node

  1. 1

    Double click the Find Matching Webflow CMS Items step to open settings panel.

  2. 2

    In the URL field, replace COLLECTION_ID with the CMS collection ID you copied a moment ago.

  3. 3

    Click on the the Webflow API field and click Create new credential.

  4. 4

    Paste the Webflow API token (generated in the previous section) into the Access Token field and click Save. (Note: You may see a “Couldn’t connect with these settings” error message after saving. This message can be ignored as long as you see the “Credential successfully created” message after saving Access Token.)

  5. 5

    Click to go back to workflow canvas.


Configure Foxy Pre-checkout Webhook Node

  1. 1

    In the workflow, double click the Foxy Pre-Checkout Webhook step.

  2. 2

    Under Webhook URLs, navigate to the Production URL tab

  3. 3

    Copy the Production URL

  4. 4

    In a new browser window/tab, go to the Foxy admin.

  5. 5

    Go to Settings > Payments.

  6. 6

    Choose a payment set that the pre-checkout webhook will be applied to (this will generally be the default payment set).

  7. 7

    Under Fraud protections, click Add fraud protection.

  8. 8

    Choose Pre-Checkout Webhook.

  9. 9

    Enter a description (ie: Pre-Checkout Webhook)

  10. 10

    Ensure the Enabled switch is on.

  11. 11

    In the URL field, paste Production URL (copied in step 3).

  12. 12

    Configure Failure handling setting as desired.

  13. 13

    Click Add fraud protection button.


Activate & Test Workflow

From the Foxy Automations workflow page, you can now active the workflow. We recommend running at least one test order to ensure everything works as expected. You can view the output for each node in your workflow for detailed information.


Need Help?

Did this article answer your questions? Need help with anything? Please click below to contact us.