Fluent Commerce Logo
Docs
Sign In

commercetools connector - Credential/Secret Configuration

Essential knowledge

Author:

Fluent Commerce

Changed on:

31 Jan 2024

Overview

At this stage the only implementation available is AWS Secrets Manager by the 

`connect-sdk-core-aws`
 module.

Key points

  • Secret Configuration Template
  • Available Fluent Accounts
  • Fluent Retailer Credentials (Multiple allowed)
  • commercetools Credentials

Secret Configuration Template

The template below should be used to create secrets in localstack (an AWS emulator for development) before you can start the application. Without these secrets the application will not function properly. It is possible to use this connector with as many retailers as you wish but do not use multiple accounts - this is not yet supported.

1docker exec -d localstack awslocal secretsmanager create-secret --name fc/connect/<FC-CONNECTOR>/api/fluent/activeAccounts --secret-string "{\"accounts\":[{\"name\":\"<FLUENT-ACCOUNT>\", \"retailers\":[<FLUENT-RETAILER>,<FLUENT-RETAILER>]}]}" ;
2
3docker exec -d localstack awslocal secretsmanager create-secret --name fc/connect/<FC-CONNECTOR>/<FLUENT-ACCOUNT>/api/fluent-account/1 --secret-string "{\"retailer\":\"<FLUENT-RETAILER>\", \"userName\":\"<FLUENT-RETAILER-USERNAME>\", \"password\":\"<FLUENT-RETAILER-PASSWORD>\"}";
4

Language: json

Name: localstack command

Description:

[Warning: empty required content area]

The SDK expects ALL secrets to be prefixed with 

`fc/connect/<FC-CONNECTOR>/`
. The property FC-CONNECTOR value needs to match the connector configuration name found at 
`application-connector.yml`
 (example below).

1connector-name: commercetools
2

Language: json

Name: Example

Description:

[Warning: empty required content area]

Available Fluent Accounts

When configuring an account, it is required to specify the region where this account has been provisioned. This is to allow the webhook signature validation. Possible values are:

  • sydney
  • dublin
  • singapore
  • north_america
1docker exec -d localstack awslocal secretsmanager create-secret --name fc/connect/commercetools/api/fluent/activeAccounts --secret-string "{\"accounts\":[{\"name\":\"CNCTDEV\", \"region\":\"sydney\",\"retailers\":[1,34]}]}" ;

Language: json

Name: localstack command

Description:

[Warning: empty required content area]
1{
2  "accounts": [
3    {
4      "name": "CNCTDEV",
5      "region":"sydney",
6      "retailers": [
7        1,
8        34,
9        67,
10        100
11      ]
12    }
13  ]
14}

Language: json

Name: JSON structure

Description:

[Warning: empty required content area]

Fluent Retailer Credentials (Multiple allowed)

These credentials allows the application to connect to Fluent with the Fluent credentials specified for each retailer. Note that if a retailer is not configured and a message is received for that missing retailer, then the application will not be capable of processing the request.

1docker exec -d localstack awslocal secretsmanager create-secret --name fc/connect/commercetools/CNCTDEV/api/fluent-account/1 --secret-string "{\"retailer\":\"1\", \"userName\":\"<THE_USERNAME>\", \"password\":\"<THE_PASSWORD>\"}";
2docker exec -d localstack awslocal secretsmanager create-secret --name fc/connect/commercetools/CNCTDEV/api/fluent-account/34 --secret-string "{\"retailer\":\"34\", \"userName\":\"<THE_USERNAME>\", \"password\":\"<THE_PASSWORD>\"}";

Language: json

Name: localstack command

Description:

[Warning: empty required content area]
1 {
2    "retailer": "1",
3    "userName": "<FLUENT-RETAILER-USERNAME>",
4    "password": "<FLUENT-RETAILER-PASSWORD>"
5 }

Language: json

Name: Sample with secret name: fc/connect/commercetools/CNCTDEV/api/fluent-account/1

Description:

[Warning: empty required content area]

commercetools Credentials

These credentials allow the application to communicate with commercetools.

1docker exec -d localstack awslocal secretsmanager create-secret --name fc/connect/commercetools/CNCTDEV/api/ct/fluent-ct-dev --secret-string "{\"clientId\" : \"<PROJECT_KEY>\", \"secret\" : \"<THE_SCRECT>\", \"website\" : \"api.australia-southeast1.gcp.commercetools.com\"}"

Language: json

Name: localstack command

Description:

[Warning: empty required content area]


Fluent Commerce

Fluent Commerce

Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.

Fluent Logo