The Foxy forums are on the move!

We're in the process of moving our forums over to a new system, and so these forums are now read-only.
If you have a question about your store in the meantime, please don't hesitate to reach out to us via email.

Webflow inventory management integration

Two questions about this:

1. Is it reasonable to expect that this integration will continue to be supported, or is it possible it won't be, given that Webflow is starting up their own ecommerce system? I would prefer to stick with Foxy. :-)

2. I've asked about this before, but not relating to this integration: I have one-of-a-kind products, and I'm looking for a way to keep multiple people from putting the same item in their cart at the same time. Basically, I want an item to be marked unavailable when it's added to someone's cart, and to also expire from the cart after a specified time period. I understand this is possible with Foxy, and I was working with a developer to set it up on a different CMS, but they got stuck on the CMS side of things. A friend recommended Webflow to me, and I noticed there's a Foxy-Webflow integration already that does handle inventory management, but before I put too many hours into testing it out, I was hoping someone could tell me how difficult it would be to modify it to do what I just described. (I'm assuming the way it's set up by default is to decrease stock levels when items are purchased.)

  • brettbrett FoxyCart Team
    Hi @nutmeg.
    Great questions.

    1: We full intend to continue to support this integration. It doesn't rely on anything special from Webflow except their API, and I don't imagine they'd cripple the API in the future to make it break. We're continuing to work on it (particularly as it relates to the OAuth flow with Webflow team accounts, currently), and have some other ideas that'll benefit Webflow users as well that we're working on in 2019.

    2: This comes up occasionally, and our general recommendation is to think about what's most important, and go from there. I'd frame it as levels of possibilities:
    (a) If you don't anticipate this being a huge issue, just rely on the built-in inventory functionality. If somebody orders something that was sold right before they purchased, you say sorry and explain what happened. Good for low-traffic stores, and easy.

    (b) With the pre-payment webhook in Foxy, you could do up some custom code to check the Webflow inventory right before the payment goes through. If it's been sold, you throw an error at that point. Only some serverside code, so easier, but not the best user experience to get all the way to payment and then find out it's out of stock. But this would be my "next step" recommendation.

    (c) Full "Ticketmaster" style approach, where you lock items and prevent them from being added to another cart if they're already present in another cart. Put a timer on the site, too, then clear the lock on the product after X minutes. There are a few ways to accomplish this, and it's certainly doable (we've had users in the past do it). But it's quite a bit more work than (b) above. In the past, this required a bit more work in your own database, but with our newer API you could conceivably rely more on that, but it'd still involve a lot more backend and front-end work, though.

    So my recommendation is to start with (a) or (b) above. (b) would probably be good enough for most one-of-a-kind situations, and would be easier than a full Ticketmaster-style approach.

  • Hi @brett ,

    Thanks for the response! It's certainly a smart idea to question whether I'm trying to solve a problem that doesn't really exist. The Ticketmaster-style approach is my ideal, and I like it particularly because the products I'm selling are sort of emotional. It would avoid getting people's hopes up because something looks available, only to break their hearts when they go to check out and find that it's no longer available. If I go with the other options, I'll probably feel the need to put warnings everywhere telling people that just because a product is in their cart doesn't guarantee it will be theirs, and then they'll feel like they need to rush through their shopping and checkout just to make sure they get the one they fell in love with.

    I'm not quite getting the difference between (a) and (b), actually. Can you explain?
  • brettbrett FoxyCart Team
    Hi @nutmeg. I understand that the possibility of a customer getting their heart broken is big concern, and it's good to know what your ideal is.

    Between (a) and (b), (a) is just manual review and notification. The customer's order/payment would still go through, and you'd have to break their heart and refund, manually. (b) would prevent the order from going through in the first place, so the payment would never go through.

    To get to (c), there'd be a few possibilities, and you could conceivably get by without having your own database or caching layer. (I'm going to assume that's probably the best bet, as with Webflow you don't have much in the way of serverside options.) One possibility would be to have the "add to cart" button change to "check inventory", then you'd dynamically query the Foxy API for a current cart with that product in it. If present, respond with something like "We're sorry, it looks like somebody else currently has that product in their cart, but they have X minutes left to checkout. So try again in just a X+1 minutes and it may be available!"

    That'd still require some custom code, but it wouldn't require you to have a database or caching layer yourself. But, because there's no caching layer, you do sort of need to do that per product add to cart. In other words, you couldn't check inventory on every pageload (and then display a "sale pending" message instead of an "add to cart" button). (You couldn't do it dynamically on every pageload because it'd just be too slow.)

    If you wanted to get a little fancier, you could maybe use Webflow's custom fields as a sort of cache, and update a "pending" field in Webflow when the product is added to the cart. But that'd add yet more complexity. So it depends on what you're after.

    So, to your original question:
    but before I put too many hours into testing it out, I was hoping someone could tell me how difficult it would be to modify it to do what I just described.
    The existing inventory integration would certainly help, but it'd only be a part of the puzzle, and the other pieces certainly would require some programming experience. It wouldn't be an impossible task, but it also wouldn't be a "knock it out in a single afternoon" sort of thing either.
  • Thanks so much! I could certainly work with the "check inventory" button idea. I think I will check back with the developer I was working with before. With the other CMS, it was a much bigger project to set up all of this from the ground up, and it didn't go the way they expected it would. I'm hoping that with some of the bigger building blocks already in place, it might be easier to implement it this way.
  • brettbrett FoxyCart Team
    @nutmeg, feel free to loop your dev in. We're happy to map out exactly how we'd approach it (and/or some alternate options). One perk is that you can sort of rely on Foxy as your "database in the cloud", so you're doing less hacking on the CMS, and more just relying on the Foxy API. But definitely keep us posted. We're happy to help bounce ideas and offer suggestions.
Sign In or Register to comment.