mobify-integration-manager

0.6.1 • Public • Published
              _     _  __          _____       _                       _   _
  /\/\   ___ | |__ (_)/ _|_   _    \_   \_ __ | |_ ___  __ _ _ __ __ _| |_(_) ___  _ __     /\/\   __ _ _ __   __ _  __ _  ___ _ __
 /    \ / _ \| '_ \| | |_| | | |    / /\/ '_ \| __/ _ \/ _` | '__/ _` | __| |/ _ \| '_ \   /    \ / _` | '_ \ / _` |/ _` |/ _ \ '__|
/ /\/\ \ (_) | |_) | |  _| |_| | /\/ /_ | | | | ||  __/ (_| | | | (_| | |_| | (_) | | | | / /\/\ \ (_| | | | | (_| | (_| |  __/ |
\/    \/\___/|_.__/|_|_|  \__, | \____/ |_| |_|\__\___|\__, |_|  \__,_|\__|_|\___/|_| |_| \/    \/\__,_|_| |_|\__,_|\__, |\___|_|
                          |___/                        |___/                                                        |___/

NPM CircleCI

🗺 Overview

Mobify Integration Manager is a key part of the Mobify Platform. Integration Manager enables retailers to quickly layer the Mobify Platform onto their existing investments, to deliver innovative mobile experiences while keeping all the benefits of their ecommerce platforms or marketing clouds.

The Integration Manager provides an abstraction layer between your progressive web app and the source of its ecommerce data. This data can come from a dedicated ecommerce platform, a desktop website, or a custom API. To give you a head start on building your app, we’ve included ready-made connectors for Integration Manager that already know how to fetch and update data using popular ecommerce platforms. We also make it easy to create your own custom connector for any data source.

For more detail, read Ecommerce Integrations.

Integration Manager API

Integration Manager provides a set of Redux thunk actions (commands) as its API. To browse the availiable commands, read the API Reference.

The commands are separated into branches, they are:

  • account
  • app
  • cart
  • categories
  • checkout
  • productSearch
  • products

Connectors

Connectors are ready-made implementations of Integration Manager API that connects to specific ecommerce backend. There are two connectors: Connector for Salesforce Commerce Cloud and Connector for SAP Hybris. We also provide a barebone implementation called "stub connector" for you to implement a custom connector.

⚒ Installation

npm i mobify-integration-manager

📖 Usage

See our official Integration Manager documentation for detail.

Initialization

The Integration Manager can be initialized by calling IntegrationManager.initialize with the connector.

import IntegrationManager from 'mobify-integration-manager/dist/'
// For example, using SFCC connector
import {Connector} from 'mobify-integration-manager/dist/connectors/sfcc'
 
IntegrationManager.initialize(Connector({ /* configurations */ }))

Customization

Because we can’t anticipate the needs of every project, we’ve designed the Integration Manager to be extensible and customizable without requiring updates to Mobify’s Progressive Web SDK. For more information, read the Extending a Connector guide.

There are two types of customization: adding new command and overriding existing command.

To add a new command or overriding an existing command, pass an extension object as the second parameter to IntegrationManager.initialize.

Debugging

Integration Manager provides a debugging option that will output console logs showing the entire command tree. Pass {debug: true} as the third parameter to IntegrationManager.initialize.

import IntegrationManager from 'mobify-integration-manager/dist/'
// For example, using Hybris connector
import {Connector} from '`mobify-integration-manager/dist/connectors/hybris'
 
IntegrationManager.initialize(Connector({ /* configurations */ }), extension, {debug: true})

Dispatching commands

Commands can be dispatched via accessing them within the singleton Integration Manager object.

import IntegrationManager from 'mobify-integration-manager/dist/'
 
const submitSignIn = () => (dispatch) => {
    //....
    dispatch(IntegrationManager.accounts.login(username, password))
}

👨🏻‍💻 Developing

The Mobify Integration Manager and Progressive Web SDK are two dependencies of the Platform Scaffold. To develop this package locally, you will need to have a working Platform Scaffold. Because the Mobify Integration Manager uses some dependencies such as utility functions in the Progressive Web SDK, you will also need to install dependencies for the SDK.

    Platform Scaffold
    /               \
   /                 \
  /                   \
SDK(node_modules)  IM(node_modules)  ---link---> IM(local)
      |                                              |
      |  ------------<---npm i---------------------  |

Step 1. Install dependencies

Since you need to develop using a local copy of Integration Manager, run the following command in platform-scaffold/web/

npm i

Step 2. Link mobify-integration-manager

npm run link:im <path-to-local-im>

Step 3. Start developing

# Don't forget to build the module! 
cd <path-to-local-im> && npm run build && cd -
npm start

Readme

Keywords

none

Package Sidebar

Install

npm i mobify-integration-manager

Weekly Downloads

22

Version

0.6.1

License

SEE LICENSE IN LICENSE

Unpacked Size

478 kB

Total Files

97

Last publish

Collaborators

  • mobify