Use Cases
Customize Autonumbering Schemes
12 min
overview autonumbering schemes let you control how nue generates human readable identifiers (like invoice numbers) for key billing objects based on your business needs you can define a single org level autonumbering scheme that applies across all records for a field define entity level autonumbering schemes so that different entities (for example, legal entities or business units) use different number patterns for the same field this helps you meet compliance requirements, align with downstream systems, and keep your billing records easy to track and reconcile supported objects you can customize the organization level autonumbering scheme for the name field of the following billing objects invoice invoice item invoice item detail credit memo credit memo item credit memo item detail debit memo debit memo item payment application payment application item entity level autonumbering schemes are currently supported for the name field of these transaction objects invoice invoice item invoice item detail credit memo credit memo item credit memo item detail debit memo debit memo item how autonumbering works organization level scheme each supported field can have a default (org level) autonumbering scheme, which nue uses when no entity specific scheme applies you customize the format using a combination of static text (like prefixes) and dynamic components (like year, month, sequential number) entity level scheme you can also define additional autonumbering schemes scoped to specific entities when a record (for example, an invoice or credit memo) is associated with an entity that has its own scheme, nue uses that entity level scheme to generate the number if the associated entity does not have its own scheme, nue falls back to the org level scheme for that field each entity can be linked to only one autonumbering scheme for a given field at a time, ensuring numbering consistency and avoiding conflicts configure autonumbering in the ui you can manage autonumbering schemes directly in the nue ui for fields of type auto number take the invoice number (name) field as an example open the field’s autonumber settings navigate to nue system setting → business objects → invoice > fields in the list of fields, locate the invoice number whose type is auto number the type value auto number appears as a link click the link to open the autonumber scheme setting modal configure the schemes by default, you will see the organization level scheme, and you can edit its format when needed click the new auto number button to add a custom scheme for one or more entities once the configured schemes are saved, the invoice number for new invoices will be generated based on the configured schemes important behavioral rules a custom scheme must have at least one entity associated; nue will prevent you from saving a scheme with no entities one entity can only be linked to one scheme for that field at a time if you try to assign an entity that is already associated with another scheme, you’ll need to adjust associations first a custom scheme can be deleted after deletion records created for the previously associated entities will use the org level scheme going forward those entities can then be associated with a different scheme if needed configure autonumbering through nue api users can also use the docid\ wskf9au7 yfzc01hwpsl3 api to create custom auto numbering schemes to replace the default schemes this is useful for automation or for provisioning schemes across multiple environments note about startvalue it is important to note that startvalue can only be set or updated using the api if there are no existing invoices or records attempting to set or update the startvalue when records already exist will result in an error important startvalue can only be set or updated using the api if there are no existing invoices or records attempting to set or update the startvalue when records already exist will result in an error auto number components please refer to the following table about different types of autonumbering scheme components component format description example object type prefix the object type prefix invoice inv order o credit memo cm payment application pa year {yyyy} or {yy} the year the record was created often formatted as yyyy yyyy 2024 yy 24 month {mm} the month the record was created mm 06 (june) day {dd} the day of the month the record was created dd 08 hour {hh} the hour the record was created often formatted as hh 14(2pm) minute {mm} the minute the record was created often formatted as mm 30 second {ss} the second the record was created often formatted as ss 45 sequential number {0000} a unique sequential number that increases with each new record the number of 0 indicates the minimum number of digits in the sequential number an optional start value (startvalue) may be provided {0000} with a start value 222 api example you can use docid\ wskf9au7 yfzc01hwpsl3 to update the auto numbering scheme of a specific field update the org level scheme here is an api example that sets up an org level custom scheme for the auto numbering of invoice numbers in the invoice's name field curl location request patch 'https //api perftest nue io/metadata/objects/invoice/fields/name' \\ \ header 'content type application/json' \\ \ header 'nue api key;' \\ \ data '{ "name" "name", "autonumbersetting" { "displayformat" "inv {yyyy} {mm} {dd} {0000}", "startvalue" 2000 } }' once this custom scheme is established, the invoice numbers in the subsequent billing job will follow this format inv 2024 07 11 2001 add entity level schemes to set up an entity level custom scheme, you can include the entitysettings in the api request curl location request patch 'https //api perftest nue io/metadata/objects/invoice/fields/name' \\ \ header 'content type application/json' \\ \ header 'nue api key;' \\ \ data '{ "name" "name", "autonumbersetting" { "displayformat" "inv {yyyy} {mm} {dd} {0000}", "startvalue" 2000, "entitysettings" \[ { "displayformat" "inv {yyyy} {mm} {000}", "startvalue" 100, "entityids" \[ "entity 001" ] }, { "displayformat" "inv {yyyy} {0000}", "startvalue" 0, "entityids" \[ "entity 002", "entity 003" ] } ] } }'
🤔
Have a question?
Get answers fast with Nue’s intelligent AI, expert support team, and a growing community of users - all here to help you succeed.
To ask a question or participate in discussions, you'll need to authenticate first.