Understand integration environment variables

Learn how to work with the integration environment variables.

The following variables can be set as environment variables when deploying the integration container image:

  • Required Environment Properties

  • Secret Properties

  • Optional Environment Properties

The rest of this topic provides detailed information on how to work with the environment variables.

Required environment properties

The following are required environment properties:

PropertyEnvironment variableValueNotes

commercetools.project.key

COMMERCETOOLS_PROJECT_KEY

Your commercetools project key

commercetools.auth.url

COMMERCETOOLS_AUTH_URL

commercetools auth endpoint

For example: https://auth.europe-west1.gcp.commercetools.com/oauth/token

commercetools.api.url

COMMERCETOOLS_API_URL

commercetools API endpoint

For example: https://api.europe-west1.gcp.commercetools.com

quarkus.oidc.auth.server.url

QUARKUS_OIDC_AUTH_SERVER_URL

Merchant Center API URL for the region you are deployed to

For example: https://mc-api.europe-west1.gcp.commercetools.com. See Merchant Center documentation

connector.base.url

CONNECTOR_BASE_URL

Public facing URL where you have deployed the integration

digital.river.shipping.callout.endpoint

DIGITAL_RIVER_SHIPPING_CALLOUT_ENDPOINT

URL where Digital River will load available shipping methods for a cart

Set to <connector base url>/api/v1/shipping-methods/quote to have the integration load the methods configured in commercetools. See the Digital River Drop-in Checkout documentation if you want to use an alternate implementation

Secret properties

The following sensitive properties should be defined in in an application.yml file which is mounted at /secrets/application.yaml.

Note: For security reasons, it is recommended that you do not set them as environment variables.

PropertyEnvironment variableValueNotes

commercetoold.client.id

COMMERCETOOLS_CLIENT_ID

Client id of your commercetools API key

See Key Creation

commercetools.client.secret

COMMERCETOOLS_CLIENT_SECRET

Client secret of your commercetools API key

See Key Creation

connector.secret.decryption-key

CONNECTOR_SECRET_DECRYPTION_KEY

RSA private key used to decrypt secrets

See Key Creation

Optional environment properties

The following properties have default values you may wish to override:

PropertyEnvironment variableValueDefault valueNotes

digital-river/mp-rest/url

DIGITAL_RIVER_MP_REST_URL

Base URL for Digital River API

https://api.digitalriver.com

connector.mapping.address-state-from

CONNECTOR_MAPPING_ADDRESS_STATE_FROM

commercetools address property to map to Digital River state

REGION

Can be REGION or STATE

connector.product-sync.custom-object-timeout-seconds

CONNECTOR_PRODUCT_SYNC_CUSTOM_OBJECT_TIMEOUT_SECONDS

Maximum seconds to wait for a commercetools custom object create/update call to complete

30

connector.product-sync.locale-key

CONNECTOR_PRODUCT_SYNC_LOCALE_KEY

Locale key to use when syncing product data

en

connector.product-sync.slug-url-format

CONNECTOR_PRODUCT_SYNC_SLUG_URL_FORMAT

String format to use to generate product URL from slug

null

Disabled when null

connector.product-sync.list-sku-timeout-seconds

CONNECTOR_PRODUCT_SYNC_LIST_SKU_TIMEOUT_SECONDS

Maximum seconds to wait for a DR list skus call to complete

30

connector.product-sync.wait-time-between-requests-millis

CONNECTOR_PRODUCT_SYNC_WAIT_TIME_BETWEEN_REQUESTS_MILLIS

Delay between calls to DR when syncing products

300

Can be reduced to speed up manual sync, but may cause 429 errors

connector.product-sync.max-concurrent-requests

CONNECTOR_PRODUCT_SYNC_MAX_CONCURRENT_REQUESTS

Concurrent requests to DR when syncing products

1

connector.product-sync.full-sync.update-batch-size

CONNECTOR_PRODUCT_SYNC_FULL_SYNC_UPDATE_BATCH_SIZE

Batch size of calls to DR for full manual sync

10

Can be increaed to speed up manual sync, but may cause 429 errors

connector.product-sync.full-sync.product-query-batch-size

CONNECTOR_PRODUCT_SYNC_FULL_SYNC_PRODUCT_QUERY_BATCH_SIZE

Query size to load products from commercetools for full manual sync

50

connector.product-sync.full-sync.timeout-units

CONNECTOR_PRODUCT_SYNC_FULL_SYNC_TIMEOUT_UNITS

Units for maximum time allowed for a full sync to run for

MINUTES

connector.product-sync.full-sync.timeout

CONNECTOR_PRODUCT_SYNC_FULL_SYNC_TIMEOUT

Maximum time allowed for a full sync to run for

15

connector.secret.cache-timeout-seconds

CONNECTOR_SECRET_CACHE_TIMEOUT_SECONDS

Seconds to cache DR secret API key and webhook secret

600

This is the maximum time for key rotation to take effect

connector.fee-names.importer-tax

Map of language to value

en: "Importer tax"

Used as the name of the custom line item added to an order when Digital River determines importer tax is due

connector.fee-names.duty

Map of language to value

en: "Duty"

Used as the name of the custom line item added to an order when Digital River determines duty is due

The following properties define the commercetools custom type keys and field names used by the integration. These only need to be changed if you have altered the definitions of any types. See Map shared data used in the integration for the meaning of these fields.

PropertyEnvironment variableDefault value

commercetools.custom-types.payment.type

COMMERCETOOLS_CUSTOM_TYPES_PAYMENT_TYPE

drPaymentFields

commercetools.custom-types.payment.checkout-session-id

COMMERCETOOLS_CUSTOM_TYPES_PAYMENT_CHECKOUT_SESSION_ID

drCheckoutSessionId

commercetools.custom-types.payment.client-ip-address

COMMERCETOOLS_CUSTOM_TYPES_PAYMENT_CLIENT_IP_ADDRESS

drClientIpAddress

commercetools.custom-types.cart.line-item-type

COMMERCETOOLS_CUSTOM_TYPES_CART_LINE_ITEM_TYPE

drLineItemFields

commercetools.custom-types.cart.digital-river-order-id

COMMERCETOOLS_CUSTOM_TYPES_CART_DIGITAL_RIVER_ORDER_ID

drOrderId

commercetools.custom-types.cart.digital-river-line-item-id

COMMERCETOOLS_CUSTOM_TYPES_CART_DIGITAL_RIVER_LINE_ITEM_ID

drLineItemId

commercetools.custom-types.cart.warehouse

COMMERCETOOLS_CUSTOM_TYPES_CART_WAREHOUSE

drWarehouse

commercetools.custom-types.cart.invoice-urls

COMMERCETOOLS_CUSTOM_TYPES_CART_INVOICE_URLS

drInvoiceUrls

commercetools.custom-types.cart.credit-memo-urls

COMMERCETOOLS_CUSTOM_TYPES_CART_CREDIT_MEMO_URLS

drCreditMemoUrls

commercetools.custom-types.cart.digital-river-order-state

COMMERCETOOLS_CUSTOM_TYPES_CART_DIGITAL_RIVER_ORDER_STATE

drOrderState

commercetools.custom-types.cart.digital-river-fraud-state

COMMERCETOOLS_CUSTOM_TYPES_CART_DIGITAL_RIVER_FRAUD_STATE

drFraudState

commercetools.custom-types.customer.tax-certificate-file-contents

COMMERCETOOLS_CUSTOM_TYPES_CUSTOMER_TAX_CERTIFICATE_FILE_CONTENTS

drTaxCertificateFileContents

commercetools.custom-types.customer.tax-certificate-file-name

COMMERCETOOLS_CUSTOM_TYPES_CUSTOMER_TAX_CERTIFICATE_FILE_NAME

drTaxCertificateFileName

commercetools.custom-types.customer.tax-certificate-file-id

COMMERCETOOLS_CUSTOM_TYPES_CUSTOMER_TAX_CERTIFICATE_FILE_ID

drTaxCertificateFileId.

commercetools.custom-types.customer.tax-certificate-start-date

COMMERCETOOLS_CUSTOM_TYPES_CUSTOMER_TAX_CERTIFICATE_START_DATE

drTaxCertificateStartDate

commercetools.custom-types.customer.tax-certificate-end-date

COMMERCETOOLS_CUSTOM_TYPES_CUSTOMER_TAX_CERTIFICATE_END_DATE

drTaxCertificateEndDate

commercetools.custom-types.customer.tax-certificate-authority

COMMERCETOOLS_CUSTOM_TYPES_CUSTOMER_TAX_CERTIFICATE_AUTHORITY

drTaxCertificateAuthority

commercetools.custom-types.customer.attach-source

COMMERCETOOLS_CUSTOM_TYPES_CUSTOMER_ATTACH_SOURCE

drAttachSource

commercetools.custom-types.customer.detach-source

COMMERCETOOLS_CUSTOM_TYPES_CUSTOMER_DETACH_SOURCE

drDetachSource

commercetools.custom-types.customer.sources

COMMERCETOOLS_CUSTOM_TYPES_CUSTOMER_SOURCES

drSources

commercetools.custom-types.custom-object.general-container

COMMERCETOOLS_CUSTOM_TYPES_CUSTOM_OBJECT_GENERAL_CONTAINER

digital_river

commercetools.custom-types.custom-object.sync-record-container

COMMERCETOOLS_CUSTOM_TYPES_CUSTOM_OBJECT_SYNC_RECORD_CONTAINER

digital_river_sync_record

commercetools.custom-types.custom-object.secret-api-key

COMMERCETOOLS_CUSTOM_TYPES_CUSTOM_OBJECT_SECRET_API_KEY

secret_api_key

commercetools.custom-types.custom-object.webhook-secret

COMMERCETOOLS_CUSTOM_TYPES_CUSTOM_OBJECT_WEBHOOK_SECRET

webhook_secret

commercetools.custom-types.custom-object.sync-status

COMMERCETOOLS_CUSTOM_TYPES_CUSTOM_OBJECT_SYNC_STATUS

sync_status

commercetools.custom-types.shipping-method.service-level

COMMERCETOOLS_CUSTOM_TYPES_SHIPPING_METHOD_SERVICE_LEVEL

drServiceLevel

commercetools.custom-types.product.eccn

COMMERCETOOLS_CUSTOM_TYPES_PRODUCT_ECCN

drEccn

commercetools.custom-types.product.tax-code

COMMERCETOOLS_CUSTOM_TYPES_PRODUCT_TAX_CODE

drTaxCode

commercetools.custom-types.product.country-of-origin

COMMERCETOOLS_CUSTOM_TYPES_PRODUCT_COUNTRY_OF_ORIGIN

drCountryOfOrigin

commercetools.custom-types.product.sku-group-id

COMMERCETOOLS_CUSTOM_TYPES_PRODUCT_SKU_GROUP_ID

drSkuGroupId

commercetools.custom-types.product.part-number

COMMERCETOOLS_CUSTOM_TYPES_PRODUCT_PART_NUMBER

drPartNumber

Last updated