# Sync Between Limio and Zuora Subscriptions

For Limio-initiated actions such as a new order on the Limio Shop or a cancellation performed on Limio for Salesforce, Limio will make sure to have Limio subscriptions in sync with Zuora subscriptions and other external systems via its Order Orchestration framework.

However, for non-Limio-initiated actions such as a Zuora-initiated auto renewal at the end of term, a Zuora-initiated cancel or suspension due to bad debt, the Limio Subscription might be out of sync with Zuora.

To prevent this, Limio Subscription has a sync feature on the Limio Subscription. **The Subscription Sync is primarily designed to handle Subscriptions that already exists in Limio.** For new subscription, we recommend using our sendOrder API, described below.

## Supported Zuora changes via Limio Sync for Subscriptions in both systems

When a Limio Subscription Sync is triggered, this will fetch the following information from the Zuora Subscription and update the corresponding values on the Limio Subscription:

* (1) update the term start date and end date
* (2) if there has been changes to future charges, it will update the next set of charges up until the term end date on the Schedule (and cancel old charges that are not applicable)
* (3) add or update addresses
* (4) changes to the customer name and email
* (5) auto-renew status *(from Release 115)* — if the auto-renew status is changed directly in Zuora, the next sync reflects it on the Limio Subscription

{% hint style="warning" %}
Currently, the Limio Sync cannot match a Limio Offer or Add-On to an externally-created Zuora Subscription Product and Rate Plan. If you need Limio to include Catalog changes, please use the [Send Order API](#recommended-via-the-limio-send-order-api).
{% endhint %}

## How to trigger the Limio Subscription Sync

### From the UI

For Subscriptions that already exist in Limio, you can trigger the sync via the Sync button within the Limio App on the Limio Subscription.

<figure><img src="/files/96eH32xrEGXC0YSfmsBb" alt=""><figcaption></figcaption></figure>

### Via the Subscription Sync API

The Limio Subscription Sync is available via the [Limio API](https://docs.limio.com/api/integrations-api/zuora-sync).

### Via Zuora

To trigger without needing to develop an integration, you can use a [Zuora Callout Notification](https://knowledgecenter.zuora.com/Central_Platform/Events_and_Notifications/C_Configure_Callout_Notifications). A Zuora Callout must be configured for any changes that will happen outside Limio but needs to be shown in self-service. For example, Order Action Processed > RenewSubscription and Order Action Processed > CancelSubscription.

<figure><img src="/files/tVBWvxwMABvtNWiDfHlm" alt=""><figcaption></figcaption></figure>

To trigger the Sync process, make a POST request to the endpoint below, providing the Limio subscription ID or the reference. The domain that should be used will be the domain of your **Limio Commerce app** and not your published Limio Shop & Self-Service domain. Configure the Zuora Callout POST to the following endpoint with subscription id:

`/api/plugins/zuora/sync/subscription/{id}`

{% hint style="danger" %}
Please ensure that **Limio-initiated orders are excluded from the process**. For instance, if Limio is the originator of a cancellation or renewal, synchronization should not be triggered to prevent an infinite loop. This can be done by excluding the Limio integration user in Zuora or by omitting any orders with a Source identified as 'shop' or 'salesforce'.
{% endhint %}

For more complex logic, you may want to configure a Zuora Workflow to call out the Limio Sync API.

## How to create Limio Subscriptions for new Subscriptions created directly in Zuora

### \[Recommended] Via the Limio Send Order API

If you are creating a Zuora Subscription outside of Limio Commerce or Limio for Salesforce, we would encourage you to consider Limio's Send Order API.

{% content-ref url="<https://docs.limio.com/developers/api-documentation/catalog-api-1>" %}
<https://docs.limio.com/developers/api-documentation/catalog-api-1>
{% endcontent-ref %}

Limio's Send Order API allows Limio to create a new Subscription in Limio Commerce, Salesforce, Zuora and other systems such as entitlement and fulfillments that are part of Limio's [Order Orchestration framework](/integrations/order-orchestration/order-orchestration-framework.md). This will guarantee that all metadata is properly distributed to the relevant systems within the architecture and that Limio always has a relationship between its catalog concept and the connect systems (such as Zuora Product and Rate Plans).

### Via the Limio Sync Subscription API

{% hint style="warning" %}
Using the Limio Sync for Subscriptions that have not been initially created in Limio will result in limited functionalities in Limio Self-Service and Limio for Salesforce. Currently, Limio does not allow commerce actions on subscriptions synced in this way. Limited functionality is available, for example showing the [Invoice Component](https://docs.limio.com/components/component-library/self-service-components/component-invoices-table). Please reach out to Limio at [**support@limio.com**](mailto:support@limio.com) if you plan on using this integration pattern.
{% endhint %}

If that is not possible and you need to create a subscription directly in Zuora, you can use the Subscription Sync via a callout to create a Subscription in Limio. The ID value that needs to be provided is the Zuora Subscription Number, which will look something like `A-S00000198`, for example:

`https://{TENANT}.prod.limio.com/api/plugins/zuora/sync/subscription/A-S00000271`

Currently, Limio does not allow commerce actions, such as [cancellations](https://docs.limio.com/product/self-service/what-are-the-standard-functionality-of-limio-self-service-manage-my-account/how-to-create-a-personalised-cancelsave-experience), [switch](https://docs.limio.com/product/self-service/what-are-the-standard-functionality-of-limio-self-service-manage-my-account/how-to-create-a-personalised-switch-upgrade-or-downgrade-experience), or [renewals](https://docs.limio.com/product/self-service/what-are-the-standard-functionality-of-limio-self-service-manage-my-account/how-to-create-a-personalised-renewal-experience), on subscriptions synced in this way. Limited functionality is available, for example showing the [Invoice Table component](https://docs.limio.com/components/component-library/self-service-components/component-invoices-table) or the [Payment Table component](https://docs.limio.com/components/component-library/standard-components/component-payments-table).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.limio.com/integrations/keeping-zuora-and-limio-in-sync/sync-between-limio-subscriptions-and-zuora-subscriptions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
