safety-net

Data Generation for Dev Environments

In the context of this article, I’m going to discuss development environments, not sandbox environments. What’s the difference? Development instances have account numbers that start with TSTDRV and are typically geared to SDN application developers.

When you become an SDN partner, you can receive one or more instances with different features enabled. You may have one environment with One World and a different environment with SuiteTax. This allows you to test your application in different environments before releasing it.

These environments come either empty, or with some sample data and they cannot be refreshed from another account like sandboxes can.

Because of this, the data in these environments can become very stale, very quickly.

Here’s how I address that in my developer environments.

Customizations

I use my development environment for testing all kinds of scenarios. Mockup ideas for my current employer, customizations to answer questions on StackOverflow or NetSuiteProfessionals.com, or any things I see on Twitter or Reddit.

I don’t like having a lot of customizations in my dev environment. It can get cluttered so I regularly remove customizations just to keep things tidy. Usually, I’ll manage this manually, removing customizations I no longer need.

I maintain an Account Customization project for the customizations which become permanent in my environment. I can use SDF to import all customizations and see which have been added and need to be considered for removal.

Data

Years ago, I might have gone months without using my development environment. And one of the things I struggled with was having current data for whatever project or customization I was working on. I finally sat down to ensure I had new data all the time.

  • I searched the internet for public data sources that I could use to represent items in my environment. I eventually settled a list of top selling books from Amazon with some MetaData that might make sense in an environment selling books.
  • I created some custom item fields to store some of this meta data, like Author, Rating, Description, and Category then imported about 3000 of those books as items in NetSuite.
  • I wanted real data for orders and related transactions with some history so I first created a script intended to be run once which created sales orders every day for the last 4 years. It’s a random number of sales order every day for a random selection of customers buying a random number of items.
  • In order to represent growth over time, the max on each of these random numbers is increased by three after each year. So in 2020, it would create up to 10 SOs for 10 items for 10 customers per day. In 2025, it could create up to 25 SOs for 25 items for 25 customers per day.
  • Next, I create a recurring script which runs daily with the same logic. Create an ever growing number of sales orders. Each script automatically bills the sales order when it’s created to give us invoices for AR.
  • Next, I created a recurring script which runs daily to create customer payments for a percentage of invoices older than 30 days. This simulates actual customer payments so A/R isn’t running wild, but gives me pretty realistic data for orders and invoices which is updated every day.
  • I didn’t like the payments building up in Undeposited Funds, so I created one more script which runs every day which deposits all of those payments

I even have some nice data for my dashboard so every time I log in, I can see how my fake company is performing. 🙂

Accounting Periods

Yes. Every 2 or 3 months, I’ll use the “Close Multiple Periods” feature to ensure that my current data reflects a relatively current Accounting picture.

Summary

Hopefully you can use some of these strategies to keep your development environments updated with data that’s useful to your projects.

You can see all of my scripts here.