Process Versioning
Factorial Code allows you to manage different versions of your processes and modules, so then you may start executions using an specific version source code.
Manage versions
Section titled “Manage versions”You can publish a version from the process pages by clicking Publish version in the three dots menu.
This action will display a form where you should write a tag for the new process version and a comment for the version if desired.
Once you create the version, you can view its code by changing to it in the version selector. It’s important to note that you cannot edit the code of a published version. To continue editing your process, simply return to the current version using the selector and continue coding!
Having a version published, you can select that version source code to be used when you start any process execution.
Run now with version
Section titled “Run now with version”During one on-demand execution, you can select the version source code be used:
Scheduled execution with version
Section titled “Scheduled execution with version”For scheduled executions (cron jobs), you can also select the version source code be used:
Webhook execution with version
Section titled “Webhook execution with version”For webhook executions, pass the Fcode-Version-Tag HTTP header to use one version source code:
If the calling system only lets you configure a URL — as many webhook subscription systems do — use the version_tag query parameter instead:
curl --location --request POST 'https://code.factorialhr.com/platform/api/your-team/webhooks/your-process-slug?version_tag=v1.0.0'The query parameter takes precedence over the header when both are present.
Form execution with version
Section titled “Form execution with version”For embedded forms, add the data-fcode-form-process-version attribute to the embed snippet:
<div data-fcode-form-team="your-team-slug" data-fcode-form-process="your-process-slug" data-fcode-form-process-version="v1.0.0"></div>The process dashboard generates this snippet for you: pick a version in the selector next to the embed code and it is added automatically. See pinning a form to a process version for the Fcode.initForm and React equivalents.
Version aliases
Section titled “Version aliases”To maximize the utility of versions, we introduce version aliases—pointers to a process or module version that you can update with ease.
This feature addresses the need to change the version used by an external service without deploying changes to that service.
Consider a scenario where an external service calls Factorial Code via a webhook, specifying a process version (e.g., v1.0) in the invocation header. When you release a new process version (e.g., v2.0) and want to switch to it, updating the external service can be cumbersome. Instead, by using an alias in the webhook invocation (e.g., stable), initially linked to version v1.0, you can seamlessly transition to version v2.0 by simply updating the alias in the Factorial Code UI.
This approach eliminates the need to modify the external service, making version management more efficient.
Version aliases can be used exactly in the same scenarios where process versions are available: run now, webhooks, embedded forms or scheduled configurations (cron jobs). Anywhere a version tag is accepted, an alias name is accepted too.
Modules versioning and aliases
Section titled “Modules versioning and aliases”Factorial Code Modules also support versions and aliases. See modules docs page to see how one version or alias can be selected during module import.
Workspace versioning
Section titled “Workspace versioning”To publish the same version on every process and module of the workspace at once — and manage
aliases like production across all of them — see
workspace versioning in the team settings.