Vlocity Facts #55 || Generate Unique Numbers in OmniStudio Using Omni Global Auto Number
Omni Global Auto Number
Omni Global Auto Number enables you to generate unique, consistent numbers for records such as sales orders, cases, loan applications, and other business entities. The numbering system can be customized using attributes such as increment value, padding, minimum length, prefix, and separator.
Once configured, global auto numbers can be referenced in Data Mappers and Integration Procedures using the GLOBALAUTONUMBER function.
Enable Omni Global Auto Number
To use Omni Global Auto Number, you must enable the feature in OmniStudio Settings.Prerequisites
- Your org uses the standard data model.
- The custom object GlobalAutoNumberSetting__c does not exist.
- The Omni Interaction Configurations RollbackIPChanges and RollbackDRChanges are disabled.
- Create, edit, and delete permissions for the Omni Global Auto Number standard object are granted to OmniStudio Admin and User profiles.
----------------------------------------------------------------------------------------------
Example:
In scenarios where Salesforce sends outbound callouts to external systems and expects a callback response, having a reliable unique identifier is critical to correlate requests and responses.
For example, when Salesforce sends a Client Inception request to an external system, once the inception is completed, the external system needs to send an update back to Salesforce. To correctly map this callback to the original request, we must include a unique reference ID in the initial callout.
Earlier approach:
Used a combination of Record Id + Timestamp
Worked, but was harder to read, manage, and standardize across integrations
Improved approach with Omni Global Auto Number:
Use Omni Global Auto Number to generate a clean, sequential, and reusable identifier
Optionally combine it with key record fields for better traceability
Ensures consistency across Data Mappers and Integration Procedures
Makes callback correlation simpler and more reliable
This approach is especially useful for:
Asynchronous callouts expecting callbacks
Long-running external processes (like client onboarding or inception)
Multi-system integration tracking and reconciliation
In scenarios where Salesforce sends outbound callouts to external systems and expects a callback response, having a reliable unique identifier is critical to correlate requests and responses.
For example, when Salesforce sends a Client Inception request to an external system, once the inception is completed, the external system needs to send an update back to Salesforce. To correctly map this callback to the original request, we must include a unique reference ID in the initial callout.
Earlier approach:
Used a combination of Record Id + Timestamp
Worked, but was harder to read, manage, and standardize across integrations
Improved approach with Omni Global Auto Number:
Use Omni Global Auto Number to generate a clean, sequential, and reusable identifier
Optionally combine it with key record fields for better traceability
Ensures consistency across Data Mappers and Integration Procedures
Makes callback correlation simpler and more reliable
This approach is especially useful for:
Asynchronous callouts expecting callbacks
Long-running external processes (like client onboarding or inception)
Multi-system integration tracking and reconciliation
----------------------------------------------------------------------------------------------
Step-by-Step Process implementation:
ImportantSteps
- In Setup, enter OmniStudio Settings in the Quick Find box.
- Enable Omni Global Auto Number.
Set Up Omni Global Auto Numbers
Steps
- From the App Launcher, select Omni Global Auto Number.
- Click New.
- Enter the required details (all fields are mandatory unless noted):
- Name – Unique identifier used by the GLOBALAUTONUMBER function.
- Increment – Value by which the number increases.
- Last Generated Number – Starting number for the sequence (default is 0).
- Left Pad – Character used to pad the number.
- Minimum Length – Minimum length of the generated number.
- Prefix – Text added before the number.
- Separator – Character between the prefix and number.
Example
Configuration
- Name: CaseCallOutAutoNumber
- Increment: 1
- Last Generated Number: 0
- Left Pad: 0
- Minimum Length: 6
- Prefix: Case
- Separator: -
Use Global Auto Numbers
Use the GLOBALAUTONUMBER function in Data Mappers and Integration Procedures to generate numbers dynamically during runtime.
Configure Global Auto Number in a Data Mapper
Use a Data Mapper to generate and map an auto number using the GLOBALAUTONUMBER function.
Steps
-
Open OmniStudio Data Mapper.
-
Open an existing Data Mapper or click New to create one.
-
Navigate to the Formula tab.
-
Click Add Formula and configure the formula:
We need to use GLOBALAUTONUMBER() function
-
Save the formula.
-
Navigate to the Mapping tab.
-
Map the Formula Path Name (CaseCallOutAutoNumberF) to the preferred Output JSON field name.

-
Click Preview to generate and verify the auto number.
Open OmniStudio Data Mapper.
Open an existing Data Mapper or click New to create one.
Navigate to the Formula tab.
Click Add Formula and configure the formula:
We need to use GLOBALAUTONUMBER() function
Save the formula.
Navigate to the Mapping tab.
Map the Formula Path Name (CaseCallOutAutoNumberF) to the preferred Output JSON field name.
Click Preview to generate and verify the auto number.
The generated value appears in the output JSON based on the configured global auto number settings.
Generated Number
- The next generated number is Case-000001.
Comments
Post a Comment