What this is:
Constants are values that you reference in various places your app, so you want to store them somewhere for easy access in case you need to change them. Some examples:
Your app’s support email address The number of days between X thing that happens and Y. How I do it:
Create a “Constants” option set with these attributes:
For each constant, likely only one of those attributes will have any value in it.
Some examples of where you would use this:
Reminder Timing. You want to send a reminder email to finish onboarding 2 days after someone first signs up. Create an option with a display of “Days after signup | Onboarding Reminder Email” & set the number attribute to 2. In your workflow when the user is created, schedule the email send for Current date & time +days [Get an Option > Constants > Days after signup...’s Number] . Benefit of this: Now in the future, if you want to change that number to 3 instead of 2, you don’t have to remember where that workflow is. You go straight to your Constants option set and just change the number. Email Signatures. You’ll probably end up sending a lot of emails from your app. Keeping your signoff signature in a Constant record means that if anything needs to change in that block of text, you can just change it in the Constant option, instead of having to go one by one through all of your emails to make the update. Rebranding. If you know you’ll rebrand some time after you launch, the name and logo you start with are really just placeholders. Create an option with a display of “Logo” and set the image to your current logo. Create an option with a display of “App Name” and set the text to the current app name. Anywhere the logo or app name appears on your site, instead of manually uploading the logo into an image element or typing the app name into a text element, reference the relevant option. Benefit of this: When you rebrand, you don’t have to scour your app for every instance of your old branding. Just update those two options and you’re done. Invitation Expiration You allow users to invite other users to your app using the setup I’ve laid out in this app. You want invitations to expire within a specific period of time (i.e., 3 days). Create an option with the display of “Invitation Expiration (days)” Add the number 3 to the “Number” attribute. When you create the invitation in your backend workflow, set the expiration date on the invite to Current Date & Time + Days [Get an Option > Constants > Invitation Expiration (days)'s Number]