Install and deploy the Merchant Center custom application

Learn how to install and deploy the commercetools Merchant Center custom application.

Install the Merchant Center custom application

To install the commercetools Merchant Center application, contact your Digital River representative to obtain the Merchant Center application needed for deployment. If you do not have a Digital River representative, contact commercetools-Integration@digitalriver.com.

Deploy the Merchant Center custom application

Once you have installed the Merchant Center custom application, complete the following tasks to deploy it for use in your integration.

Create an .ENV file

Create a .env (environment variables) file with the following contents:

ENABLE_NEW_JSX_TRANSFORM="true"
FAST_REFRESH="true"
REACT_APP_PUBLIC_ENCRYPTION_KEY=<your PUBLIC encryption key>
PRODUCTION_URL=<url where the custom application is accessible>
MANUAL_PRODUCT_SYNC_ENDPOINT=<url where the connector us accessible>/api/v1/products/sync
ENTRY_POINT_URI_PATH=digital-river
APPLICATION_ID=<application id>
MANAGE_PERMISSION=ManageDigitalRiver

The next table shows additional details about the properties shown in the example above:

PropertySource

REACT_APP_PUBLIC_ENCRYPTION_KEY

See the topic Create integration access keys for details on access keys. Use only the lines between the BEGIN and END, and concatenate them to a single line.

PRODUCTION_URL

Depends on how you are deploying the custom application

MANUAL_PRODUCT_SYNC_ENDPOINT

Depends on how you are deploying connector. commercetools adds a JWT to the request which is used for for authentication. As such, there is no need to secure this endpoint

APPLICATION_ID

Refer to Configure Merchant for more information on this property.

Deploy the custom application

The custom application can be deployed using one of the following methods:

  • By following the instructions in one of the guides provided by commercetools.

  • By using a provided Dockerfile that creates an image that can be deployed to a cloud provider. A Google Cloud Run deployment example of this method is provided below in this topic.

Dockerfile and Google Cloud Run deployment example

Use the following steps to deploy the Merchant Center custom application in a Dockerfile/Google Cloud Run environment:

Build the container

docker build -t <a tag> . 

The tag should include the version from the package.json.

Push the container to a registry

This step depends upon the infrastructure that you are using. Refer to your infrastructure documentation for details on this process.

Deploy the container

The following shows an example of how to deploy the container:

gcloud run deploy <your service name> \
  --image <location of the image in the registry> \
  --project <your project> \
  --platform managed \
  --region <your region> \
  --allow-unauthenticated

Last updated