Skip to main content

Secrets

To allow us to access your Unit4 API over the API we need some sensitive credentials to be provided. We store these sensitive details using Rossums encrypted secrets management and so it is important that these are placed only in the encrypted secrets configuration, and not the plain text configuration.

For more information see Rossum's Documentation

These secret parameters are the same whether you are configuring the invoice extension or the statement matching extension — both connect to the same Unit4 ERP using these credentials.

Saving Secrets

When you save the secrets the box will show as blank again, however the data will be saved.

To overwrite a secret, simply input the corrected data and save it.

Configurable secret parameters​

Common Configuration​

These parameters should always be set in secrets OR settings (where noted)

unit4_api_url (ERP7 / CR)​

tip

Note that this can now be set in extension settings for better visibility.

Note in extension settings it has the key erpConnectionSettings/unit4ApiUrl

If this value is set in both places, the one in settings will take precedence.

string

{ "unit4_api_url": "https://example.unit4cloud.com" }

The API address for REST requests to your Unit4 ERP7 / CR System.

erpx_host (ERPx)​

tip

Note that this can now be set in extension settings for better visibility.

Note in extension settings it has the key erpConnectionSettings/erpxHost

If this value is set in both places, the one in settings and not here will take precedence.

string

{ "unit4_api_url": "https://example.unit4cloud.com" }

The API address for REST requests to your Unit4 ERPx System.

IDS authentication​

These parameters should be set if you use IDS for authentication.

unit4_ids_auth_client​

string

{ "unit4_ids_auth_client": "example-ids-auth-client-id" }

The IDS client ID used to generate an access token for your unit 4 API.

unit4_ids_secret​

string

{ "unit4_ids_secret": "example-random-secret" }

The IDS client secret, which pairs with the ID above and is used to generate an access token for your unit 4 API.

unit4_ids_url​

tip

Note that this can now be set in extension settings for better visibility.

Note in extension settings it has the key erpConnectionSettings/erpIdsHost

If this value is set in both places, the one in settings and not here will take precedence.

string

{ "unit4_ids_url": "example" }

The URL to which your IDS credentials should be sent in order to generate a token.

Basic Authentication​

These credentials should be provided for ERP cloud or on-premise installations which have not been moved to IDS. These are usually ERP 7 or ERP CR installations.

unit4_basic_username​

string

{ "unit4_basic_username": "example" }

The username used to connect to your API.

unit4_basic_password​

string

{ "unit4_basic_password": "example" }

The password used to connect to your API.

SOAP configuration​

These credentials should be provided for ERP 7 and ERP CR where documents are uploaded over SOAP. For ERP-x this will not be needed as documents are uploaded over REST.

unit4_soap_url (ERP7 / CR)​

tip

Note that this can now be set in extension settings for better visibility.

Note in extension settings it has the key erpConnectionSettings/unit4SoapUrl

If this value is set in both places, the one in settings and not here will take precedence.

string

{ "unit4_soap_url": "example" }

Example Configurations​

As JSON syntax and the type definitions used above may not be familiar to everyone, here is an example full configuration. This can be edited / reduced to only the keys and options which you require. You may also see our documentation about JSON

Example ERPX Configurations​

Configuration1 with IDS all in settings​

Set in secrets:

{
"erpx_host": "https://example-api.unit4cloud.com",
"unit4_ids_auth_client": "xxxxx",
"unit4_ids_secret": "xxxxxxx",
"unit4_ids_url": "https://example-ids.unit4cloud.com"
}

Configuration2 with IDS mixed with secrets and settings​

Set in secrets:

{
"unit4_ids_auth_client": "xxxxx",
"unit4_ids_secret": "xxxxxxx",
}

Set in settings:

{
"erpConnectionSettings": {
"erpxHost": "https://example-api.unit4cloud.com",
"erpIdsHost": "https://example-ids.unit4cloud.com"
}
}

Example ERP7 / CR Configurations​

Configuration1 with Basic Auth all in secrets​

Set in secrets:

{
"unit4_api_url": "https://example.com/BusinessWorld-web-api",
"unit4_soap_url": "https://example.com/BusinessWorld-webservices/service.svc",
"unit4_basic_username": "example-username",
"unit4_basic_password": "xxxxxxxxxx"
}

Configuration2 with basic mixed with secrets and settings​

Set in secrets:

{
"unit4_basic_username": "example-username",
"unit4_basic_password": "xxxxxxxxxx"
}

Set in settings:

{
"erpConnectionSettings": {
"unit4ApiUrl": "https://example.com/BusinessWorld-web-api",
"unit4SoapUrl": "https://example.com/BusinessWorld-webservices/service.svc"
}
}

Configuration3 with IDS for the REST API and Basic for SOAP​

Where an ERP7 / CR site has IDS available, use it for the REST API and keep Basic authentication for SOAP.

Set in secrets:

{
"unit4_ids_auth_client": "example-client-id",
"unit4_ids_secret": "xxxxxxxxxx",
"unit4_basic_username": "example-username",
"unit4_basic_password": "xxxxxxxxxx"
}

Set in settings:

{
"erpConnectionSettings": {
"unit4ApiUrl": "https://example.com/BusinessWorld-web-api",
"unit4SoapUrl": "https://example.com/BusinessWorld-webservices/service.svc",
"erpIdsHost": "https://example-ids.unit4cloud.com"
}
}

Two things to note about this configuration:

  • unit4ApiUrl doubles as the REST host for IDS, so erpxHost is not required on ERP7 / CR. If erpxHost (or the erpx_host secret) is set it takes precedence.
  • The Basic username and password are still required. Unit4's SOAP services do not support OAuth, so SOAP requests carry the credentials in the request body regardless of whether IDS is configured. Only the REST calls use IDS.