Loading
 Experience Cloud – Feature Degradation on Lightning Web Runtime SitesRead More
The Trailblazer Community is now read-only Read More
Set Up Purchase Order Sequencing

Set Up Purchase Order Sequencing

Configure the Sequence Service to automatically assign unique, standardized identifiers to Purchase Orders. This configuration ensures consistent numbering across different business contexts, such as OEM and Distributor Management, and automatically recovers numbers from failed transactions.

Required Editions

Available in: Lightning Experience

Available in: Enterprise, Unlimited, and Developer Editions

User Permissions Needed
To set up Purchase Order Sequencing: Sequence Management

Considerations and Requirements

  • License: Verify that the SequenceServiceAdmin license is active in your org.
  • Enable Preference: Go to Setup > Sequential Numbering and turn on Sequence Service. Records created prior to enablement will not be retroactively sequenced.
  • Permissions: Assign sequence management permissions to administrators.
  • Object Prep: Ensure the Usage Type field is populated on Purchase Order records to drive policy selection.
  • Ensure Community users have Read access to Sequence Policies, or the sequencing will fail during record creation.

To configure Purchase Order Sequencing:

  1. Define Sequence Policies: Create the rules that govern how numbers are formatted for different business units.
    1. Navigate to Sequence Policies in Setup.
    2. Create a new policy for each business context (e.g., OEM_PO_Policy and DMS_PO_Policy).
    3. Define the Sequence Pattern using the {SequenceValue} placeholder. Example: OEM-{SequenceValue}.
  2. Set Up Policy Selection Conditions: Tell the system which policy to apply based on the record's data.
    1. Navigate to Sequence Policy Selection Conditions.
    2. Map policies to specific Usage Types.
      Internal Users: Map to the Distributor Management usage type (System Default). Community Users: Map to the Purchase Order usage type.
    3. Use field-based filters (Field, Operator, Value) to finalize the mapping.
      Selection conditions only evaluate fields on the record itself; they cannot detect the user's role or the specific application context (e.g., Experience Cloud vs. Lightning Experience).
  3. Verify Field Mappings: The system automatically handles the assignment post-insert, but you must ensure the following fields are visible on your layouts if users need to see the breakdown:
    1. PurchaseOrderNumber: The final formatted ID (replaces the Name field).
    2. SequenceValue: The raw incrementing number.
    3. SequencePolicy: The lookup to the applied policy.
Note
Note
  • The Name Field: The standard Auto Number on the Name field must remain active. The Sequencing Service uses this to satisfy initial save requirements before overwriting it with the final formatted sequence number.
  • Gap Reconciliation: You do not need to manually trigger number recovery.
    • Deleted Records: Numbers are released for reuse immediately.
    • Failed Saves: A background job automatically recycles orphaned numbers after 24 hours.
  • Selective Sequencing: If a Purchase Order is created that does not meet any policy conditions, it will default to the standard platform Auto Number, and sequence fields will remain blank.
 
Loading
Salesforce Help | Article