Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Installation instructions for configing Adobe Commerce and Hubspot integration
# Installation instructions for configuring Adobe Commerce and Hubspot integration

## Application

### Create App Builder project
Go to the [Adobe developer console](https://developer.adobe.com/console) portal
- Click on `Create a new project from template`
- Select `App Builder`
- Chose a name and title
- Choose a name and title
- Select stage workspace or create a new one
- Add the following API services (select default Oauth server to server)
- I/0 events
- Adobe I/O Events for Adobe Commerce
- I/O management API
- Download the [workspace configuration JSON](https://developer.adobe.com/commerce/extensibility/events/project-setup/#download-the-workspace-configuration-file) file and save it as `workspace.json` in the `./scripts/onboarding/config` folder because you will use it to configure Adobe IO Events in commerce afterward.

### Configure a new Integration in commerce
### Configure a new Integration in commerce ![Compatibility](https://img.shields.io/badge/PaaS%20Only-0000FF)
Configure a new Integration to secure the calls to Commerce from App Builder using OAuth by following these steps:
- In the Commerce Admin, navigate to System > Extensions > Integrations.
- Click the `Add New Integration` button. The following screen displays
Expand All @@ -26,7 +26,7 @@ Configure a new Integration to secure the calls to Commerce from App Builder usi
- In the list of integrations, activate your integration.
- To configure the module, you will need the integration details (consumer key, consumer secret, access token, and access token secret).

### Install Commerce Eventing module (only required when running Adobe Commerce versions 2.4.4 or 2.4.5)
### Install Commerce Eventing module (only required when running Adobe Commerce versions 2.4.4 or 2.4.5) ![Compatibility](https://img.shields.io/badge/PaaS%20Only-0000FF)
Install Adobe I/O Events for Adobe Commerce module in your commerce instance following this [documentation](https://developer.adobe.com/commerce/extensibility/events/installation/)

> **Note**
Expand Down Expand Up @@ -85,7 +85,7 @@ The console will return the provider's IDs and save this information:

Check your App developer console to confirm the creation of the registrations.

### Complete the Adobe Commerce eventing configuration
### Complete the Adobe Commerce eventing configuration ![Compatibility](https://img.shields.io/badge/PaaS%20Only-0000FF)

> **Note**
>
Expand Down Expand Up @@ -168,7 +168,7 @@ HUBSPOT_FULL_IMPORT_CONTACT_WEBSITE=

### Hubspot -> Adobe Commerce sync

Part of the tion HubSpot integration involves enabling the synchronization of changes made in HubSpot back to Adobe Commerce.
Part of the HubSpot integration involves enabling the synchronization of changes made in HubSpot back to Adobe Commerce.

Currently supported:

Expand All @@ -177,7 +177,7 @@ Currently supported:

To achieve it you need to have access to "Automation" configuration on Hubspot side.

This integration coming with pre-build Hubspot onboarding script.
This integration coming with pre-built Hubspot onboarding script.

Please run:

Expand All @@ -191,7 +191,7 @@ After creating 2 workflows, you need to go into each of them and add 3 secrets,

* clientId - App Builder Client ID
* clientSecret - App Builder Client Secret
* providerId - App Builder provider ID for incomin events
* providerId - App Builder provider ID for incoming events

So your custom code configuration will look at the end like following:

Expand Down Expand Up @@ -248,7 +248,7 @@ Custom script you can find:
scripts/lib/hubspot/workflow_customer.js
```

## Run initial synchornization
## Run initial synchronization

After you are done with installation steps, you can run initial synchronization. Module provides an API endpoint to start the sync process:

Expand Down
34 changes: 29 additions & 5 deletions actions/customer/commerce/actions.config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
consumer:
function: consumer/index.js
web: 'no'
runtime: nodejs:20
runtime: nodejs:22
inputs:
LOG_LEVEL: debug
COMMERCE_HUBSPOT_CONTACT_ID_FIELD: $COMMERCE_HUBSPOT_CONTACT_ID_FIELD
Expand All @@ -12,7 +12,7 @@ consumer:
created:
function: created/index.js
web: 'no'
runtime: nodejs:20
runtime: nodejs:22
inputs:
LOG_LEVEL: debug
HUBSPOT_ACCESS_TOKEN: $HUBSPOT_ACCESS_TOKEN
Expand All @@ -22,13 +22,19 @@ created:
COMMERCE_ACCESS_TOKEN: $COMMERCE_ACCESS_TOKEN
COMMERCE_ACCESS_TOKEN_SECRET: $COMMERCE_ACCESS_TOKEN_SECRET
COMMERCE_HUBSPOT_CONTACT_ID_FIELD: $COMMERCE_HUBSPOT_CONTACT_ID_FIELD
OAUTH_CLIENT_ID: $OAUTH_CLIENT_ID
OAUTH_CLIENT_SECRET: $OAUTH_CLIENT_SECRET
OAUTH_TECHNICAL_ACCOUNT_ID: $OAUTH_TECHNICAL_ACCOUNT_ID
OAUTH_TECHNICAL_ACCOUNT_EMAIL: $OAUTH_TECHNICAL_ACCOUNT_EMAIL
OAUTH_ORG_ID: $OAUTH_ORG_ID
OAUTH_SCOPES: $OAUTH_SCOPES
annotations:
require-adobe-auth: true
final: true
updated:
function: updated/index.js
web: 'no'
runtime: nodejs:20
runtime: nodejs:22
inputs:
LOG_LEVEL: debug
HUBSPOT_ACCESS_TOKEN: $HUBSPOT_ACCESS_TOKEN
Expand All @@ -38,13 +44,19 @@ updated:
COMMERCE_CONSUMER_SECRET: $COMMERCE_CONSUMER_SECRET
COMMERCE_ACCESS_TOKEN: $COMMERCE_ACCESS_TOKEN
COMMERCE_ACCESS_TOKEN_SECRET: $COMMERCE_ACCESS_TOKEN_SECRET
OAUTH_CLIENT_ID: $OAUTH_CLIENT_ID
OAUTH_CLIENT_SECRET: $OAUTH_CLIENT_SECRET
OAUTH_TECHNICAL_ACCOUNT_ID: $OAUTH_TECHNICAL_ACCOUNT_ID
OAUTH_TECHNICAL_ACCOUNT_EMAIL: $OAUTH_TECHNICAL_ACCOUNT_EMAIL
OAUTH_ORG_ID: $OAUTH_ORG_ID
OAUTH_SCOPES: $OAUTH_SCOPES
annotations:
require-adobe-auth: true
final: true
company-created:
function: company-created/index.js
web: 'no'
runtime: nodejs:20
runtime: nodejs:22
inputs:
LOG_LEVEL: debug
HUBSPOT_ACCESS_TOKEN: $HUBSPOT_ACCESS_TOKEN
Expand All @@ -54,13 +66,19 @@ company-created:
COMMERCE_ACCESS_TOKEN: $COMMERCE_ACCESS_TOKEN
COMMERCE_ACCESS_TOKEN_SECRET: $COMMERCE_ACCESS_TOKEN_SECRET
COMMERCE_HUBSPOT_CONTACT_ID_FIELD: $COMMERCE_HUBSPOT_CONTACT_ID_FIELD
OAUTH_CLIENT_ID: $OAUTH_CLIENT_ID
OAUTH_CLIENT_SECRET: $OAUTH_CLIENT_SECRET
OAUTH_TECHNICAL_ACCOUNT_ID: $OAUTH_TECHNICAL_ACCOUNT_ID
OAUTH_TECHNICAL_ACCOUNT_EMAIL: $OAUTH_TECHNICAL_ACCOUNT_EMAIL
OAUTH_ORG_ID: $OAUTH_ORG_ID
OAUTH_SCOPES: $OAUTH_SCOPES
annotations:
require-adobe-auth: true
final: true
company-updated:
function: company-updated/index.js
web: 'no'
runtime: nodejs:20
runtime: nodejs:22
inputs:
LOG_LEVEL: debug
HUBSPOT_ACCESS_TOKEN: $HUBSPOT_ACCESS_TOKEN
Expand All @@ -70,6 +88,12 @@ company-updated:
COMMERCE_CONSUMER_SECRET: $COMMERCE_CONSUMER_SECRET
COMMERCE_ACCESS_TOKEN: $COMMERCE_ACCESS_TOKEN
COMMERCE_ACCESS_TOKEN_SECRET: $COMMERCE_ACCESS_TOKEN_SECRET
OAUTH_CLIENT_ID: $OAUTH_CLIENT_ID
OAUTH_CLIENT_SECRET: $OAUTH_CLIENT_SECRET
OAUTH_TECHNICAL_ACCOUNT_ID: $OAUTH_TECHNICAL_ACCOUNT_ID
OAUTH_TECHNICAL_ACCOUNT_EMAIL: $OAUTH_TECHNICAL_ACCOUNT_EMAIL
OAUTH_ORG_ID: $OAUTH_ORG_ID
OAUTH_SCOPES: $OAUTH_SCOPES
annotations:
require-adobe-auth: true
final: true
21 changes: 17 additions & 4 deletions actions/customer/external/actions.config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
consumer:
function: consumer/index.js
web: 'no'
runtime: nodejs:20
runtime: nodejs:22
inputs:
LOG_LEVEL: debug
annotations:
Expand All @@ -10,7 +10,7 @@ consumer:
updated:
function: updated/index.js
web: 'no'
runtime: nodejs:20
runtime: nodejs:22
inputs:
LOG_LEVEL: debug
COMMERCE_BASE_URL: $COMMERCE_BASE_URL
Expand All @@ -19,13 +19,19 @@ updated:
COMMERCE_ACCESS_TOKEN: $COMMERCE_ACCESS_TOKEN
COMMERCE_ACCESS_TOKEN_SECRET: $COMMERCE_ACCESS_TOKEN_SECRET
COMMERCE_HUBSPOT_CONTACT_ID_FIELD: $COMMERCE_HUBSPOT_CONTACT_ID_FIELD
OAUTH_CLIENT_ID: $OAUTH_CLIENT_ID
OAUTH_CLIENT_SECRET: $OAUTH_CLIENT_SECRET
OAUTH_TECHNICAL_ACCOUNT_ID: $OAUTH_TECHNICAL_ACCOUNT_ID
OAUTH_TECHNICAL_ACCOUNT_EMAIL: $OAUTH_TECHNICAL_ACCOUNT_EMAIL
OAUTH_ORG_ID: $OAUTH_ORG_ID
OAUTH_SCOPES: $OAUTH_SCOPES
annotations:
require-adobe-auth: true
final: true
batch:
function: batch/index.js
web: 'no'
runtime: nodejs:20
runtime: nodejs:22
inputs:
LOG_LEVEL: debug
COMMERCE_BASE_URL: $COMMERCE_BASE_URL
Expand All @@ -34,13 +40,19 @@ batch:
COMMERCE_ACCESS_TOKEN: $COMMERCE_ACCESS_TOKEN
COMMERCE_ACCESS_TOKEN_SECRET: $COMMERCE_ACCESS_TOKEN_SECRET
COMMERCE_HUBSPOT_CONTACT_ID_FIELD: $COMMERCE_HUBSPOT_CONTACT_ID_FIELD
OAUTH_CLIENT_ID: $OAUTH_CLIENT_ID
OAUTH_CLIENT_SECRET: $OAUTH_CLIENT_SECRET
OAUTH_TECHNICAL_ACCOUNT_ID: $OAUTH_TECHNICAL_ACCOUNT_ID
OAUTH_TECHNICAL_ACCOUNT_EMAIL: $OAUTH_TECHNICAL_ACCOUNT_EMAIL
OAUTH_ORG_ID: $OAUTH_ORG_ID
OAUTH_SCOPES: $OAUTH_SCOPES
annotations:
require-adobe-auth: true
final: true
full-import:
function: full-import/index.js
web: 'yes'
runtime: nodejs:20
runtime: nodejs:22
inputs:
LOG_LEVEL: debug
OAUTH_ORG_ID: $OAUTH_ORG_ID
Expand All @@ -56,6 +68,7 @@ full-import:
HUBSPOT_ACCESS_TOKEN: $HUBSPOT_ACCESS_TOKEN
HUBSPOT_FULL_IMPORT_CONTACT_GROUP_ID: $HUBSPOT_FULL_IMPORT_CONTACT_GROUP_ID
HUBSPOT_FULL_IMPORT_CONTACT_WEBSITE: $HUBSPOT_FULL_IMPORT_CONTACT_WEBSITE
OAUTH_SCOPES: $OAUTH_SCOPES
annotations:
require-adobe-auth: true
final: true
Expand Down
10 changes: 8 additions & 2 deletions actions/order/commerce/actions.config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
consumer:
function: consumer/index.js
web: 'no'
runtime: nodejs:20
runtime: nodejs:22
inputs:
LOG_LEVEL: debug
annotations:
Expand All @@ -10,7 +10,7 @@ consumer:
created:
function: created/index.js
web: 'no'
runtime: nodejs:20
runtime: nodejs:22
inputs:
LOG_LEVEL: debug
HUBSPOT_ACCESS_TOKEN: $HUBSPOT_ACCESS_TOKEN
Expand All @@ -20,6 +20,12 @@ created:
COMMERCE_ACCESS_TOKEN: $COMMERCE_ACCESS_TOKEN
COMMERCE_ACCESS_TOKEN_SECRET: $COMMERCE_ACCESS_TOKEN_SECRET
COMMERCE_HUBSPOT_CONTACT_ID_FIELD: $COMMERCE_HUBSPOT_CONTACT_ID_FIELD
OAUTH_CLIENT_ID: $OAUTH_CLIENT_ID
OAUTH_CLIENT_SECRET: $OAUTH_CLIENT_SECRET
OAUTH_TECHNICAL_ACCOUNT_ID: $OAUTH_TECHNICAL_ACCOUNT_ID
OAUTH_TECHNICAL_ACCOUNT_EMAIL: $OAUTH_TECHNICAL_ACCOUNT_EMAIL
OAUTH_ORG_ID: $OAUTH_ORG_ID
OAUTH_SCOPES: $OAUTH_SCOPES
annotations:
require-adobe-auth: true
final: true
9 changes: 6 additions & 3 deletions actions/order/external/actions.config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
consumer:
function: consumer/index.js
web: 'no'
runtime: nodejs:20
runtime: nodejs:22
inputs:
LOG_LEVEL: debug
annotations:
Expand All @@ -10,7 +10,7 @@ consumer:
shipment-created:
function: shipment-created/index.js
web: 'no'
runtime: nodejs:20
runtime: nodejs:22
inputs:
LOG_LEVEL: debug
COMMERCE_BASE_URL: $COMMERCE_BASE_URL
Expand All @@ -19,7 +19,10 @@ shipment-created:
COMMERCE_ACCESS_TOKEN: $COMMERCE_ACCESS_TOKEN
COMMERCE_ACCESS_TOKEN_SECRET: $COMMERCE_ACCESS_TOKEN_SECRET
OAUTH_CLIENT_ID: $OAUTH_CLIENT_ID
OAUTH_CLIENT_SECRET: $OAUTH_CLIENT_SECRET
OAUTH_CLIENT_SECRET: $OAUTH_CLIENT_SECRET
OAUTH_TECHNICAL_ACCOUNT_ID: $OAUTH_TECHNICAL_ACCOUNT_ID
OAUTH_TECHNICAL_ACCOUNT_EMAIL: $OAUTH_TECHNICAL_ACCOUNT_EMAIL
OAUTH_ORG_ID: $OAUTH_ORG_ID
OAUTH_SCOPES: $OAUTH_SCOPES
annotations:
require-adobe-auth: true
Expand Down
6 changes: 3 additions & 3 deletions app.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extensions:
info:
function: actions/starter-kit-info/index.js
web: 'yes'
runtime: nodejs:20
runtime: nodejs:22
inputs:
LOG_LEVEL: debug
annotations:
Expand Down Expand Up @@ -43,7 +43,7 @@ extensions:
registration:
function: actions/registration/index.js
web: 'yes'
runtime: 'nodejs:18'
runtime: 'nodejs:22'
inputs:
LOG_LEVEL: debug
annotations:
Expand All @@ -55,7 +55,7 @@ extensions:
get-order-grid-columns:
function: actions/commerce-ui/orderGridColumns.js
web: 'yes'
runtime: 'nodejs:16'
runtime: 'nodejs:22'
inputs:
LOG_LEVEL: debug
annotations:
Expand Down
Binary file modified docs/console-event-registrations.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/console-user-defined-actions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 16 additions & 2 deletions env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,26 @@ OAUTH_BASE_URL=https://ims-na1.adobelogin.com/ims/token/
IO_MANAGEMENT_BASE_URL=https://api.adobe.io/events/

# OAuth configs
# Values required for Adobe Commerce SaaS Rest Authorization.

# The following values can be copied from the Credential details page in AppBuilder under Organization > Project > Workspace > OAuth Server-to-Server
# Client ID
OAUTH_CLIENT_ID=
# Client Secret (Retrieve Client Secret)
OAUTH_CLIENT_SECRET=
# Technical Account ID
OAUTH_TECHNICAL_ACCOUNT_ID=
# Technical Account Email
OAUTH_TECHNICAL_ACCOUNT_EMAIL=
# Organization ID
OAUTH_ORG_ID=
OAUTH_SCOPES=AdobeID, openid, read_organizations, additional_info.projectedProductContext, additional_info.roles, adobeio_api, read_client_secret, manage_client_secrets, event_receiver_api

# Commerce OAuth configs
# Commerce OAuth configs. PaaS Only. Required for authorization of Adobe Commerce Rest Apis.
# These values can be copied from the Integration Details under System > Integrations
# Commerce base URL should finish with slash '/'
# Commerce base URL should finish with slash '/'. Example: https://adobe.commerce/rest/
COMMERCE_BASE_URL=
# Select Integration you created and copy values from "Integration Details"
COMMERCE_CONSUMER_KEY=
COMMERCE_CONSUMER_SECRET=
COMMERCE_ACCESS_TOKEN=
Expand All @@ -23,6 +31,8 @@ COMMERCE_ACCESS_TOKEN_SECRET=
# These values will be used to configure the Adobe I/O Events module automatically
# that can be found at Stores > Configuration > Adobe Services > Adobe I/O Events
COMMERCE_ADOBE_IO_EVENTS_MERCHANT_ID=
# Default value is Stage. You can change it for your usecases if needed.
COMMERCE_ADOBE_IO_EVENTS_ENVIRONMENT_ID=Stage

# Workspace configs
# The following values can be copied from the JSON downloadable in AppBuilder from Organization > Project > Workspace
Expand All @@ -37,9 +47,13 @@ IO_WORKSPACE_ID=
# To retrieve that value go to Account Management > Integrations > Private app and Access token section
HUBSPOT_ACCESS_TOKEN=

# Adobe Commerce customer custom attribute code, which will be used to save Hubspot Customer ID, so in case if customer already being exported to Hubspot, system will perform Update and not Create action
COMMERCE_HUBSPOT_CONTACT_ID_FIELD=

#HUBSPOT CONTACT FULL IMPORT CONFIG, related with the runtime action customer-backoffice/full-import
# Adobe Commerce Group ID for customers. (1 - General Group)
HUBSPOT_FULL_IMPORT_CONTACT_GROUP_ID=

# Adobe Commerce Website Code to import
HUBSPOT_FULL_IMPORT_CONTACT_WEBSITE=

Loading