Skip to content

Plenigo

Plenigo plugin is capable of syncing Unidy Profile attributes to the Plenigo customer. It is also possible to sync Plenigo access rights to Unidy as Subscriptions.

To configure sync, access to Plenigo the backend is needed. Under development settings in Plenigo we need to create an API access token. For access rights sync we also need to configure webhooks (they are called Callbacks in Plenigo). After creating access token and configuring webhooks in Plenigo, an Plenigo plugin in Unidy must be created and configured using API token & callbacks data from Plenigo development settings.

Unidy User → Plenigo Customer sync

Currently it is possible to sync User (Profile data) only in one direction, from Unidy to Plenigo.

To enable Profile sync at least one sync rule must be added in Plenigo plugin settings. Read more about sync rules here. Unidy will sync email and language attributes by default since these are mandatory field in Plenigo Customer API. Other synced attributes are customizable in plugin configuration. Any profile attribute or custom attribute can be selected as synced attributes from Unidy. However, Plenigo API is limited to the following set of attributes (attributes marked with * are mandatory in Plenigo API):

pseudoEmail
password
username
email*
externalSystemId
salutation
firstName
lastName
invoiceEmail
language*
mobileNumber
birthday

Plenigo Access Right → Unidy Subscription sync

To enable Access Rights sync it's necessary to configure a set of access rights (identified by access_right_unique_id) which are handled by Unidy and their mapping with subscription categories. Also, a set of ignored access rights must be configured. Mapping of access right and subscription category and list of ignored access rights can be defined in the Plenigo plugin configuration. On Plenigo side at least Subscription, Order, In-App order and In-App subscription callbacks(webhooks) must be activated.

Each customer in Plenigo has an external system identifier associated to them, which is equal to the Unidy ID. The external system ID is set in Plenigo when users log in to Plenigo using Unidy SSO

If callbacks are configured properly (all neccessery types selected, url and authentication configured properly) Unidy will start receiving webhooks from Plenigo.

Sync flow

On incoming webhook request, Unidy will:

  • Fetch information from Plenigo about new purchases and changed / cancelled subscriptions (both, for desktop and mobile)
  • Find respective User in Unidy by using External System ID (Unidy ID)
    • Sync of subscriptions to Unidy will work only if Unidy ID is set as external system ID(externalSystemId) on Plenigo Customer
    • Sync conflict will be created if user with such external system ID (Unidy ID) can't be found
  • Extract customer ID from received webhook payload and fetch
  • Fetch customer data from Plenigo and store customer ID in Unidy if not alredy stored
  • Create Sync Conflict if unexpected Access Right is received in payload (is not explicitly handled or is not listed in the ignore list)
  • Fetch latest access rights for given customer
  • For each access right that has been received and for which there is a configuration, Unidy plugin will either:
  • Create new subscription, or
  • Update existing subscription with latest data
  • Cancelled access rights in plenigo are synced to unidy as inactive subscriptions

Note

There is always exactly one subscription for one access right (even if there are multiple subscriptions in plenigo for that access right :warning:)

Self-Service components

Users connected to Plenigo can access Plenigo's self-service components within their Unidy account.

  • Integration involves using the Plenigo SDK and associated customer IDs to create sessions on Plenigo.
  • Components are displayed when Plenigo customer ID is set for respective user
  • Changes made in embedded components (personal information, subscriptions, address, and payment settings) sync directly between Unidy and Plenigo; these components can be individually activated or deactivated in plugin settings for efficiency.

Note

→ Users in Unidy can see the Plenigo self service components if the Plenigo ID is stored on their Unidy account.