# Merchant Enabled / Disabled

Whenever a merchant enters a state where Violet cannot interact with their store or process an order, we disable the merchant. This involves marking the merchant as disabled, disabling all the offers associated with the merchant, and notifying any channels connected to the merchant that it has been disabled.

**There are currently two types of merchant disablement**:

* Sustained Merchant Disablement
* Temporary Merchant Disablement

***

## Sustained Merchant Disablement

Sustained merchant disablement occurs when a change in the merchant's connection or configuration requires Violet to disable their account. The merchant must take some action to resolve the issue from their side before Violet can re-enable their account.

### Common Causes of Sustained Merchant Disablement

The following are common causes for a merchant to enter a state of sustained disablement. For each cause, there is an associated action that the merchant can take to re-enable themselves.

**Merchant uninstalls the app that Violet uses to connect to their store.**

By uninstalling the connector app the merchant has invalidated the credentials we use to connect to their store. The merchant must reinstall the connector app before returning to Violet Connect to provide Violet with new credentials.

{% hint style="info" %}
This can be a relatively common occurrence because when merchants encounter an error, they attempt to uninstall and reinstall the violet app and they don't realize that this invalidates the credentials they previously provided us.

We recommend informing your merchants that they should never uninstall the Violet app unless they intend to completely sever their relationship with Violet and your channel or unless specifically instructed to.
{% endhint %}

**Merchant shuts down their store.**

When a merchant shuts down their store, they are ceasing all operations and are effectively deleting their account on whichever SaaS commerce platform they use. When a merchant takes this action they are automatically disconnected from Violet as any credentials Violet has for them are immediately invalidated. This is typically a permanent disconnection, unless the shutdown was unintentional. If the shutdown was unintentional and the merchant intends on resuming operations, the merchant must return to Violet Connect and perform the full connection process outlined for their platform.

**Merchant fails to pay subscription fee to the commerce platform that powers their store.**

If a merchant fails to pay their subscription fee to the commerce platform that powers their store, it generally results in a temporary disconnect that is reversed when the merchant resumes payment to the commerce platform. The merchant's store will typically return to the state it was in before the disconnection occurred, and thus, it likely does **not** need to return to Violet Connect as the existing credentials should still work.

**Merchant pauses their store or migrates to a subscription plan that doesn’t allow for the creation of new orders.**

If a merchant pauses their store or migrates to a subscription plan that does not allow for the creation of new orders, it generally results in a temporary disconnect that is reversed when the merchant returns to a subscription plan that allows for the creation of new orders. The merchant's store will return to the state it was in before order creation was paused, and it likely does not need to return to Violet Connect as the existing credentials should still work.

***

## Temporary Merchant Disablement

Temporary merchant disablement occurs when a merchant changes a configuration in their store that requires Violet to temporarily disable their catalog while it is being re-synced. If Violet did not disable the catalog during this time, it would be possible for items to be purchased with incorrect pricing.

### Common Causes of Temporary Merchant Disablement

The following are common causes for a merchant to enter a state of temporary disablement:

**Merchant changes their base currency.**

When the merchant changes the base currency of their store, Violet must immediately disable each of their Offers to ensure that none are available for purchase. Without taking this action, the items would reflect incorrect pricing and the shopper would end up paying too much or too little, depending on the changed currencies. Once each Offer is disabled, Violet initiates an immediate re-sync of the merchant's entire product catalog. As each external product is re-synced, the equivalent Offer is re-enabled with new currency and pricing applied.

***

## What Happens When a Merchant is Disabled?

When a merchant is disabled, multiple automated actions occur, each of which is outlined below:

### **Merchant Record is Disabled**

The Merchant record is updated with a status of `DISABLED`. We recommend that you subscribe to the `MERCHANT_DISABLED` webhook event so that you remain aware of the merchant being disabled. An additional header with the key `X-Violet-Reason` will be sent with the webhook to provide context for what caused the merchant to be disabled.

See our [webhooks section](/prism/webhooks/handling-webhooks.md) for more information

### **Merchant’s Offers are Disabled**

All Offers belonging to the merchant are disabled and updated with statuses that reflect their being disabled. The new disabled statuses will differ depending on the status they were in before they were disabled:

* If an Offer had a status of `AVAILABLE`, the new status will be `DISABLED_AVAILABLE`.
* If an Offer had a status of `UNAVAILABLE`, the new status will be `DISABLED_UNAVAILABLE`.
* Other Offer statuses like `ARCHIVED` and `FOR_DELETION` are not impacted by Offer disablement.

Violet will pause syncing offers with the merchant's store until the merchant has been re-enabled.

***

## What Happens When a Merchant is Enabled?

When a merchant is enabled, multiple automated actions occur, each of which is outlined below.

### **Merchant Record is Enabled**

The merchant record is updated with the status they had before they were disabled, which is typically `ACTIVE`. We recommend subscribing to the `MERCHANT_ENABLED` webhook event to remain aware of the merchant being enabled.

### **Merchant’s Offers are Enabled**

All offers belonging to the merchant are re-synced and updated with statuses that reflect their being re-enabled. The new enabled statuses will differ depending on the previous status:

* If an offer had a status of `DISABLED_AVAILABLE`, and the external product is still available after the re-sync, the new status will be `AVAILABLE`.
* If an offer had a status of `DISABLED_UNAVAILABLE`, and the external product is still unavailable, the new status will be `UNAVAILABLE`.
* Other offer statuses like `ARCHIVED` and `FOR_DELETION` are not impacted by offer enablement.

As each offer is re-synced, an event will be triggered for the `OFFER_UPDATED` webhook. If you persist offer data in your system, we recommend subscribing to this webhook event to remain aware of availability changes to an offer.

***

{% hint style="warning" %}
The statuses of `DISABLED_AVAILABLE` and `DISABLED_UNAVAILABLE` mentioned in this page are likely to change in the near future as they are consolidated into a single status. Violet will communicate these changes in advance.
{% endhint %}


---

# 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.violet.io/prism/merchants/merchant-enable-disable.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.
