Skip to content

Useful Database Fields

Paul Reinheimer Apr 19, 2017 Tools

We've been running WonderProxy for a while, over time our rather skinny contracts table has been expanded with a few new columns, and joined data. Here's what we're happy with:

  • managed

Contracts that have this flag set are not deactivated by any of our automated systems. This is helpful for our larger contracts where we wouldn't want a delayed payment or accounting mistake on our end to result in their usage to be cut off completely. We use it sparingly, generally for high dollar value contracts.

  • suspended

Suspended contracts can log into our site, but they do not receive access to our proxies and VPNs. We use this on contracts where we suspect fraud, or there's a big overage bill pending we want to talk about. It doesn't interact with any of our subscription or recurring systems, allowing us to manage a situation without requiring a bunch of effort to resubscribe. It also prevents a user from sending another payment to get past a block.

  • expire_warn_days

By default we send warnings to users to let them know their account is expiring 7 days in advance. For people who pay yearly and have long PO processes, this isn't nearly long enough. So we can bump it up to 30 or 60 (or for the Fortune 500: 90).

  • custom_contract

This isn't for people with customized plans, but instead for customers with a non-standard contract (different than our regular terms of service, or privacy policy). Some segment of our users want NDAs, or want their lawyers to bike-shed the ToS for a while. It's worth calling attention to these users, and tracking that documentation.

  • contract_comments

This is a separate table joined against contracts. We use this to track notes on the contract, changes to their pricing plan, why they were suspended, or anything unique about them. Contract comments can be pinned or hidden, so important things show up at the top, and out of date information goes away (but is still available if we want it). Rendering on the contract page includes markdown support, which was surprisingly helpful.

Here's some sample comments:

Craigslist Spammer

Deactivated since they've not paid for the last two months

Contract migrated to Recurly

Upped seattle to 5gb on their request.

Support Instructions: if the lovely folks of $company ask for another country/server, give it to them! Then, ask them how much traffic they expect, and let Will know so he can make sure we have enough capacity and he can adjust their bill for the next month.

Final Thoughts

These developed over time, but they've all paid for themselves. As we approach new projects we look to see what things here might work elsewhere. We'll probably add all of these fields to as it gets going, just because they've been so helpful on WonderProxy.

Paul Reinheimer

Developer, support engineer, and occasional manager. I enjoy working on new products, listening to customers, and forgetting to bill them. Also: co-founder.