Skip to main content

Configuring the Plugin

Plugin Configuration

Before configuring the Self-Managed Commerce Composer plugin, integrations need to be created in the Elastic Path Composable Commerce Composer. These integrations will create webhook URLs that the Self-Managed Commerce Composer plugin can invoke.

For detailed documentation about creating integrations in Composer, see our Elastic Path Composable Commerce Composer documentation.

Create Elastic Path Composer integrations

  1. Login to Elastic Path Commerce Cloud Commerce Manager in your assigned region. If you don't have credentials, please open a support case requesting Elastic Path Composable Commerce credentials.

  2. On the left-hand navigation bar, click "Composer", then "Builder".

  3. In the top-right corner, click "+ Add integration".

  4. In the dialog that appears, click "Quickstart".

  5. In the next dialog, give your integration a name, then choose the "Universal Webhook" trigger, and click "Create trigger".

  6. In the top-middle of the screen, click the "Endpoint configuration" icon (looks like a globe), then click on the "Security" tab.

  7. Change the Security Type to "Secured by Organization" and click "+ Add API key". This will generate an API key that you will need to configure in the Self-Managed Commerce Composer plugin.

    Endpoint configuration dialog

  8. At the bottom of the screen, click "Test Configuration", and then click "Trigger payload". This will display the webhook URL that you will need to configure in the Self-Managed Commerce Composer plugin.

    Trigger payload dialog

  9. In the top-right of your screen, click the "Save" button.

  10. Test your integration by opening a terminal window and running the following command:

    curl {WEBHOOK_URL} --header "api-key: {API_KEY}"

    Make sure to replace the {WEBHOOK_URL} and {API_KEY} placeholders using the values determined in previous steps before executing it.

  11. Return to your browser.

  12. At the bottom of the screen, click "Test Runs" and verify that the curl request appears in the test history.

  13. Add one or more steps to the integration by clicking the "+" icon below the Universal Webhook Trigger. See Builder Components for more information about how to configure components.

  14. In the top-right of your screen, click the "Save" button.

Repeat the steps above for each integration you require. If you want to support all event types, you will need to create a separate integration for each one.

To use your integrations in non-production environments, skip to Defining plugin setting values to configure the Self-Managed Composer plugin for the integrations you created. Before launching in production, make sure to publish your integration and update your Self-Managed Composer plugin settings.

Publishing integrations

  1. Open your integration in Composer.

  2. In the top-right corner, click "Publish".

  3. In the dialog that appears, click "Save & Publish".

  4. On the left side of the screen click the "Marketplace configuration" icon.

  5. In the dialog that appears, click "Add to Integrations Hub".

  6. In the next dialog, enter an overview description, and click the "Add" button.

  7. On the left-hand navigation bar, click "Integrations Hub".

  8. Scroll down to the "Uncategorized" section to find the integration you published, and click on it.

  9. In the dialog that opens, click the "Configure" button.

    Publish dialog

  10. In the next dialog, open the trigger details to view the webhook URL and make note of it. Click the "+ Add API key" button to create an API key and make note of that as well.

  11. Click the "Next" button.

  12. Click the "Finish" button.

Use the webhook URL and API key from the steps above to define the plugin setting values in the next section.

Defining plugin setting values

The Composer plugin is configured using the extensions.json mechanism provided by the Extension Point Framework.

To change the Composer plugin configuration, open extensions/plugins/ext-plugin-config/src/main/resources/extensions.json in the Self-Managed Commerce source code repository, and update the values described below. See Backend Integration for a sample extensions.json file to use as a starting point.

The setting values supported by the Composer plugin are described below:

Extension ClassSetting KeyDescription
com.elasticpath.plugins.composer.extensions.CustomerEventsExtensionAPI_KEYThe API key for the Elastic Path Composer integration customer events webhook.
com.elasticpath.plugins.composer.extensions.CustomerEventsExtensionWEBHOOK_URLThe webhook URL for the Elastic Path Composer integration customer events webhook.
com.elasticpath.plugins.composer.extensions.ShoppingCartEventsExtensionAPI_KEYThe API key for the Elastic Path Composer integration shopping cart events webhook.
com.elasticpath.plugins.composer.extensions.ShoppingCartEventsExtensionWEBHOOK_URLThe webhook URL for the Elastic Path Composer integration shopping cart events webhook.
com.elasticpath.plugins.composer.extensions.ShoppingCartItemEventsExtensionAPI_KEYThe API key for the Elastic Path Composer integration shopping cart item events webhook.
com.elasticpath.plugins.composer.extensions.ShoppingCartItemEventsExtensionWEBHOOK_URLThe webhook URL for the Elastic Path Composer integration shopping cart item events webhook.
com.elasticpath.plugins.composer.extensions.OrderReleaseEventsExtensionAPI_KEYThe API key for the Elastic Path Composer integration shopping cart item events webhook.
com.elasticpath.plugins.composer.extensions.OrderReleaseEventsExtensionWEBHOOK_URLThe webhook URL for the Elastic Path Composer integration shopping cart item events webhook.

After updating these values, commit your changes and deploy the Self-Managed Commerce services as usual.

See Testing for information about verifying the integration functionality.