Plans: Sample Use Case & Flow

This article shares a possible use case you could support, as well as a sample flow that could support the use case. This can be a helpful jumping off point as you plan your implementation.

Sync available pricing plans to an external system

Wix users can keep their external platform up to date with the pricing plans they offer. For example, when a site owner adds a new pricing plan to a Wix site, the external platform will have the new plan available for purchase.

Use this flow to implement a sync from a Wix site to an external system:

  1. Create a mapping from pricing plans to the plans stored on an external app using a common field, like name. Store this mapping on your app's server.
  2. Listen for any changes to which pricing plans are available with the Plan Created event and the Plan Archived event.
  3. When one of the events is triggered you receive the details of the pricing plan in createdEvent.entity if a plan was created or actionEvent.body.plan if a plan was archived.
  4. Use these pricing plan details to add the new plan to, or remove the archived plan from, your external app.
Did this help?