Configure CPR and CVR

When the SmartPost process sends or receives messages, it identifies the sender in the messages based on the addresses.

In WorkZone Configurator, two parameters, PartyIdentifierSources and ContactAddressKeySources, are used to identify sender information.

  • In WorkZone Configurator, click Process > Process settings.
Parameter Description

PartyIdentifierSources

Specifies where the SmartPost sending process looks up sender information such as CVR or CPR numbers.

ContactAddressKeySources

Specifies where the receiver workflow looks up sender addresses based on the CVR and CPR numbers provided by Digital Post. For example, for the purpose of linking the received documents to the addresses of the senders.

The values of these settings are XML elements that identify where SmartPost looks up sender information. By default the standard location of CPR and CVR data is specified in the XML elements.

Handling multiple addresses in received messages

When SmartPost receives a message with a CPR or CVR number, the CPR or CVR number may be connected with several contacts and addresses. The Digital Post receiver workflow retrieves the data and registers the contact information on the contact that is associated with the document that is created when a message is received. The following rules apply:

  • If no addresses are found, no parties are associated with the document.
  • Example

    An unsolicited message with an unknown identifier is received. No contacts can be identified based on the CPR or CVR number because the contact does not exist as a WorkZone contact. Therefore, no parties are associated with the document that was created.

  • If only one address is found, the contact is associated with the document using this address . The role Sender (Afsender).
  • Example

    An unsolicited message is received. It has a known identifier (CPR or CVR number), which is associated with one contact with one address. This is the simple situation, for example when a small business or a person sends a message from Digital Post. The address is used to create a party on the document with the role Sender.

  • If two or more addresses are found, no parties are associated with the document. An information field is added to the document, which informs the user about the number of addresses found. Based on the information in this field, the user can make a query for documents created by this situation, and then do corrections manually. By default, the custom label is named MULTIADDR but it is configurable.
  • Example

    An unsolicited message is received. It has a known identifier with one contact with multiple addresses. One contact is identified with several active addresses. The message is from a company where multiple addresses are registered in WorkZone.

    No contacts will be associated with the document. The MULTIADDRESS information field is added to the document and shows the number of addresses found.

    Example

    An unsolicited message is received. It has a known identifier with multiple contacts with multiple addresses.

    Multiple contacts can be identified from the identifier. There are multiple addresses associated with the contact. For example a large company where WorkZone Client has registered the same CVR number on multiple contacts, where each contact has a unique P-number (production unit), for example subsidiaries of the company. Some of the production units have several addresses registered in WorkZone.

    No contacts will associated with the record. The information field MULTIADDRESS is added to the document and shows the number of addresses found.

CPR and CVR data in other locations

Some organizations store CPR and CVR data in other locations than the default WorkZone location. In this case, you can set up the SmartPost process to look up data in these locations by customizing or extending the XML elements in the PartyIdentifierSources and ContactAddressKeySources parameters in the Process settings in WorkZone Configurator.

For example, your organization may store CPR data in a custom field in the Contacts register rather than using the standard ID field. In this example, you must:

  1. Create a new contact type in the WorkZone database. Note that you can view and edit contact types in WorkZone Configurator but you cannot create contact types. You must add new contact type to the Contacts register.
  2. Create a custom field in WorkZone Configurator to hold the CPR number.
  3. In WorkZone Configurator, go to Process > Process settings and add a new <party-identifier-source> element to the XML in the PartyIdentifierSources parameter. You can copy an existing <party-identifier-source> element and modify it to match the new storage of CPR numbers.
  4. In this example, the new contact type (name-type) has the code 8, the custom field has the code CPR_Value.

<party-identifier-source name-type="8" class="WorkZone.Dispatcher.Base.ODataPartyIdentifierSource">

<register-name>Contacts</register-name>

<query-template>?$filter=ID eq '{}'&amp;$select=CPR_Value,NameType_Value</query-template>

<field-name>CPR_Value</field-name>

</party-identifier-source>

Parameter Description
name-type Code of the contact type.
register-name The name of the register that the OData query will be based on.
query-template

The template that used to form the OData query. When the GetPartyIdentifier(string, ODataService) method is invoked, then two empty curly braces ({}) will be replaced with the party identifier, which is the first parameter in the method.

You can specify a search criteria in the filter part of the query.

field-name

The name of the field which content will be returned by the method. The field is expected to contain the code of the Party Identifier.

Advanced configuration

You can read more about the implementation and function of the PartyIdentifierSources instance and how you can customize the configuration and/or extend it in the WorkZone Process Developer Guide. See Configure PartyIdentifierSources and Configure SmartPost ContactAddressSources.