# Subflow: Cancel

### Introduction

Limio for Salesforce Manage Subscriptions flow (please, find an overview here: [Manage Subscriptions Flow](/integrations/using-limio-for-salesforce/manage-subscriptions-flow.md)) among others contains a Cancel subflow.

Depending on the scenario this flow can be used to achieve the following:

1\. cancel a subscription

2\. save a customer by offering a discount for the next term

3\. save a customer by offering a switch to a different offer in the next term

### Flow Overview

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

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

1. **Get Cancel reason** - Apex class that fetches the list of reasons defined in the metadata, find details in [Cancel Reasons](/integrations/using-limio-for-salesforce/manage-subscriptions-flow/subflow-cancel/add-cancel-reasons.md).
2. **Cancel screen**:
   1. Select a discount offer or a new regular offer to save the customer
   2. Use the [Initial Price Filter](/integrations/using-limio-for-salesforce/manage-subscriptions-flow/subflow-cancel/price-filter.md) to compare prices of the new offers to the next expected charge of the existing subscription
   3. Specify an effective date of the cancellation
      1. in cancel-save scenarios effective date is set to the end of the current billing period and cannot be modified.
      2. minimum allowed effective date is the start date of the current billing period
      3. maximum allowed effective date equals an end of the current billing period for termed subscriptions and is not defined for evergreen subscriptions (those that do not have an end date).
      4. We plan to release an enhancement to the effective date management and allow our users to define the dates range.
   4. Preview the total\
      Total is received form the Zuora Preview API to be as accurate as possible in calculating changes. In case of saving a customer by switching to a cheaper offer, some amount of money is returned to the customer in a form of a credit on their account. It is possible to customise the maximum allowed credit amount returned to a customer in the flow: [Flow Customisation: Using dynamic variables that are part of an order to perform conditional logic or for merge fields](https://docs.limio.com/integrations/using-limio-for-salesforce/manage-subscriptions-flow/subflow-refund/limit-refund-amount)
   5. A banner at the top of the screen notifies agents if there already is a discount applied to the next billing period to prevent discount stacking.
3. **Get Cancel Preview**
   1. Show billing provider preview calculations (Zuora Preview API or Stripe billing data) to the agents or build compliance scripts with a global Apex class accessible from the flow context
4. **Get Customer Address List** - fetching addresses associated with the current customer in Limio for a delivery and billing address steps.
5. **Is Offer Deliverable Decision** element & **Delivery Address screen** - when saving a customer with a new physical offer, we navigate to an address form to populate the delivery address.
6. **Payment Selection screen** - in cancel journey this is an optional step, if skipped, the order is processed against a default payment method in the billing provider (Zuora or Stripe).
   1. Customise the list of available options in the dropdown: [Flow Customisation: payment method options](https://docs.limio.com/integrations/setting-up-limio-for-salesforce/apex-classes/dynamic-variables)
7. **Payment** **options**:
   1. Debit Card, Credit Card - both options use Zuora iframe for secure transactions.
      1. Gateways are being configured via metadata: [How to create a new Zuora Hosted Payment Method to use in Limio for Salesforce](https://docs.limio.com/integrations/setting-up-limio-for-salesforce/detailed-salesforce-setup/zuora-hosted-payment-method)
   2. Stripe Payment Element - uses Stripe iFrame for secure card capture. See [Set Up Stripe Payments for Salesforce](https://docs.limio.com/integrations/setting-up-limio-for-salesforce/detailed-salesforce-setup/stripe-payments-for-salesforce).
   3. Customer Wallet - contains a list of existing payment methods linked to the customer account. We use custom labels to mark payment methods that expired or are going to expire soon.
   4. [Flow Customisation: Capture an additional payment](https://docs.limio.com/integrations/using-limio-for-salesforce/payment-method-options/capture-additional-payment)
8. **Order Summary screen** - offers an overview of the order, listing the selected offer (if any), the effective date, cancellation reason and a breakdown of the order total in the table. After submitting an order, loads order processing events in real time showing status messages per each step of the process.
   1. [Flow Customisation: Add custom fields to the Billing and Delivery address objects](https://docs.limio.com/integrations/using-limio-for-salesforce/address-mandatory-fields/custom-address-fields)
   2. [Flow customisation: How to add custom fields to the order payload](https://docs.limio.com/integrations/using-limio-for-salesforce/passing-custom-fields)

### Agent's View

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

Cancel screen offers an overview of the current subscription's offer, billing period and the latest charge of the left and several input fields on the right:

\- Reason for cancellation (mandatory)

\- Effective date with buttons for shortcuts (mandatory, preset by default)

\- New Offer (optional)

\- Order Total (view only)

### Tips

1. Create [Subscription Actions Rules](/integrations/setting-up-limio-for-salesforce/subscription-actions-rules.md) to control who can cancel subscriptions by Permission set, and which subscriptions can be cancelled.
2. Use [Offers Configuration](/integrations/setting-up-limio-for-salesforce/filtering-rules.md) to preload only relevant offers in the catalog.
3. Our flow allows cancelling an already cancelled subscription to change the effective date, however the total preview will not be available due to the Zuora API limitations: [Known Limitations: Reverse Cancellation Preview](/integrations/using-limio-for-salesforce/manage-subscriptions-flow/subflow-revert-cancel/reverse-cancel-limitations.md)


---

# 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/using-limio-for-salesforce/manage-subscriptions-flow/subflow-cancel.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.
