# βš™οΈ How It Works

# PrestaShop Integration Framework Architecture

# PrestaShop Account

# Components

PrestaShop Account is composed of:

  • A module, which needs to be installed on the store (this installation is automatic),
  • A frontend component to be added into your module's configuration page.

# Frontend Component

When a module is integrated with PrestaShop Account, a frontend component will display for the merchant in the module configuration page.

# When the store is not linked:

# When the store is linked:

Note

Once a merchant has associated their account through the form, they will remain logged in permanently. If they performed the association when downloading a first PrestaShop Account integrated module, they will not need to do it again when downloading new ones.

# Relationships

For every merchant who has linked their store with PrestaShop Account, an ownerUuid and a shopUuid will be accessible. These values can be retrieved from the PrestaShop Account context.

  • ownerUuid: Store owner User Id

  • shopUuid: Prestashop store Id

# PrestaShop Billing

# Components

PrestaShop Billing is composed of:

  • The Billing API, wich stores the subscription,
  • A frontend component to be added into your module configuration page, which includes the merchant subscription panel, and the funnel modal.

# Frontend Component

When a module is integrated with PrestaShop Billing, a frontend component will display for the merchant in the module configuration page.

# Without a Subscription

# With a Subscription

# Plan Chooser in the Funnel Modal

# Subscription Summary in the Funnel Modal

# Relationships

Relationships in PrestaShop Billing are a parent-child link between a "parent" customer and a "child" customer.

The "parent" customer is created based on the ownerUuid of the SSO user from the PrestaShop Marketplace (opens new window), while the "child" customer is created using the shopUuid of the PrestaShop store:

For every store using an integrated module, a parent customer and a child customer are created once, and so is their relationship.

A merchant with the same ownerUuid (same SSO user, same parent customer) might have one or multiple stores with different shopUuid (different child customers):

For each store, a merchant can subscribe to one or more integrated modules.

Important

The subscription, as well as the payment method and the invoice, are attached to the store (child customer).

The relationship can be found in the customer object:

"customer": {
    "relationship": {
        "parent_id": "parent_id",
        "payment_owner_id": "child_id",
        "invoice_owner_id": "child_id",
        "root_id": "root_id",
    }
}
1
2
3
4
5
6
7
8

There are only two levels of hierarchy: parent and child, so root_id is at the same level as parent_id.

# PrestaShop CloudSync

# Data Flow

PrestaShop CloudSync synchronizes data from remote stores into PrestaShop's managed cloud infrastructure and enables data processing:

# Components

PrestaShop CloudSync is composed of several components that help you develop powerful modules or services, based on reliable PrestaShop data, in order to offer the best experience to merchants. Below are the main pillars of PrestaShop CloudSync:

# πŸ›  CloudSync SDK

CloudSync SDK is a toolkit containing several components enabling you to easily and quickly integrate CloudSync into your modules or services.

A UI component library, allowing merchants to consent to the data sharing between their store and your modules or services. You need to integrate this component into the activation funnel of your modules. Merchants are thus aware of the type of data being shared and can give their consent:

A lighter version of this consent component is also available:

# PrestaShop Tech Vendor Boilerplate

The PrestaShop Tech Vendor Boilerplate (opens new window) is a sample module helping you integrate PrestaShop EventBus and Merchant Sharing Consent UI into your modules or services.

# πŸ”„ PrestaShop EventBus Module

Acting as a CloudSync agent, PrestaShop EventBus is a companion module that enables the synchronization of store data to CloudSync services. Following the download and installation of a CloudSync-based module, PrestaShop EventBus is automatically installed on the merchant's store as a dependency. It enables the synchronization of technical and non-personal data only:

Note

This data synchronization is necessary for your modules to operate. Uninstalling the PrestaShop EventBus module may cause bugs or the complete shutdown of your modules or services

# πŸ”Œ PrestaShop CloudSync APIs

PrestaShop CloudSync includes several API endpoints which expose all the data collected on PrestaShop merchants' stores and synchronized into the cloud.

See PrestaShop CloudSync APIs for more information.

# πŸ“ˆ CloudSync Tech Console

The CloudSync Tech Console is a web interface that allows you to monitor the usage and performance of your CloudSync integrated modules:

Number of merchant users, number of modules installed, usage by country, number of active or inactive modules… Thanks to the console, you can access several KPIs for monitoring the adoption and usage of your modules by merchants.

The Tech Console also streamlines the support and debugging of modules. Through this interface, you can perform an analysis of the stores that use your modules to check the correct configuration and execution of CloudSync.