Skip to content

Setting Up KID Generation

The KID (kundeidentifikasjon) is a customer identification number that is mandatory for invoices in Norway. The KID provides a payment reference to the vendor and ensures that the vendor is posting the payment correctly. For more information, see KID-nummer.

You can set up JustOn to generate KID numbers on account basis and document basis (invoice or statement).

Info

The KID generation is available as of JustOn 2.46.

Once set up, JustOn creates a new KID number when the defined conditions are met. The numbers are created in ascending order. Note that the last digit is a MOD-10 checksum, so that two consecutive numbers are no neighboring natural numbers.

The KID number can be referred to from the invoice template using the custom placeholders [KIDCustomer] (account-based KID) and [KIDDocument] (invoice or dunning-based KID). These placeholders are intended to be used in the Payment Reference field, but you can include them in other template fields as necessary.

Setting Up Account-Based KID Generation

Setting up the KID generation on account basis involves the following tasks:

  • Creating a custom field to hold the KID number on the Account object
  • Creating a specific counter
  • Setting up a process to trigger the KID generation

Creating Custom Field for KID

In order to hold the KID number, you must add a corresponding field to the Account object.

  1. Navigate to the fields list of the Account object.
  2. Create the following new field.
    For help about creating fields, see Managing Object Fields.
Field Label API Name Data Type
KID Customer ON_KID_Customer__c Text (255)

Creating KID Counter

As a basis for the KID number, you must create a specific counter.

  1. In Setup, open Custom Settings.
    In Salesforce Lightning, navigate to Custom Code > Custom Settings.
    In Salesforce Classic, navigate to Develop > Custom Settings.
  2. Click Manage in the row of Counters, then click New.
  3. Specify the details as follows, then click Save.
Field Possible Values Description
Name KID_Customer The name must be set to KID_Customer to enable the KID generation for an account.
Reset empty A counter reset on a yearly or monthly basis is not applicable.
Template {00000000}
■ 999999{000000000000000000}
The template must consist of digits only. You can define up to 18 variable digits, which may be prefixed with up to 6 fixed digits. The overall length must not exceed 24 digits.
Use Account Counters unselected This parameter is not applicable.

Creating KID Generation Process

To trigger the KID generation, you must create a corresponding process.

  1. In Setup, open Process Builder.
    In Salesforce Lightning, navigate to Process Automation > Process Builder.
    In Salesforce Classic, navigate to Create > Workflow & Approvals > Process Builder.
  2. Create the following process.
    For help about creating processes, see Lightning Process Builder in the Salesforce Help.
Option Value Description
Object Account The process must run on the Account object when a record is created or edited.
Criteria ■ account is activated Select the conditions that meet your business requirements best.
Immediate Action Apex > Create KID Set the ID of the account as the input parameter.

▶ When the defined process criteria are met, JustOn creates a new KID number for the account. The KID number can be referred to from the invoice template using the custom placeholder [KIDCustomer].

Setting Up Document-Based KID Generation

Setting up the KID generation on document basis (invoice or statement) involves the following tasks:

  • Creating a custom field to hold the KID number on the Invoice or Dunning object
  • Creating a specific counter

Creating Custom Field for KID

In order to hold the KID number, you must add a corresponding field to the Invoice or Dunning object.

  1. Navigate to the fields list of the Invoice or Dunning object.
  2. Create the following new field.
    For help about creating fields, see Managing Object Fields.
Field Label API Name Data Type
KID Document ON_KID_Document__c Text (255)

Creating KID Counter

As a basis for the KID number, you must create a specific counter.

  1. In Setup, open Custom Settings.
    In Salesforce Lightning, navigate to Custom Code > Custom Settings.
    In Salesforce Classic, navigate to Develop > Custom Settings.
  2. Click Manage in the row of Counters, then click New.
  3. Specify the details as follows, then click Save.
Field Possible Values Description
Name KID_Document The name must be set to KID_Document to enable the KID generation for invoices or dunnings.
Reset empty A counter reset on a yearly or monthly basis is not applicable.
Template {00000000}
■ 999999{000000000000000000}
The template must consist of digits only. You can define up to 18 variable digits, which may be prefixed with up to 6 fixed digits. The overall length must not exceed 24 digits.
Use Account Counters unselected This parameter is not applicable.

▶ When the invoice is finalized or the dunning is closed, JustOn creates a new KID number for the specific record. The KID number can be referred to from the invoice template using the custom placeholder [KIDDocument].