Easy.
- Create an option set called env.
- Create the following parameters;
- display (default)
- prefix (text)
- Create two options:
- dev (prefix = “version-test/”)
- live (prefix = BLANK)
blank = do not enter anything.
Now, in your apis, use this parameter within the url like so:
https://yourappname.com/[envPrefix]/api/1.1/wf
Now, whenever you use the api call to initialize at first, use “version-test/” as your first “envPrefix” data source, and when you use it on a workflow, use this:
Isn't live version:formatted as text [yes = OPTION: dev's prefix, no = OPTION: live's prefix]
.
You’ll have to do this for every API you use within your site, but it beats needing to use different API’s for test mode/production mode.
Bam!