# Subflow: Switch

### 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 Switch subflow. It allows users to upgrade and downgrade customers' active subscriptions.

### Flow Overview

*This section will offer an overview of the Salesforce Manage Subscriptions flow’s Switch process. It will provide detailed insights into the Flow Builder representation of the Switch subflow and outline how customization options can enhance your user experience.*

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

<figure><img src="/files/8ZDNLUANlRG51WbbQuqe" alt=""><figcaption></figcaption></figure>

* **Switch Screen**: captures details of the switch.\
  Learn about *Input: Maximum allowed refund amount* property in [Limit the Amount to Refund](/integrations/using-limio-for-salesforce/manage-subscriptions-flow/subflow-refund/limit-refund-amount.md)
* **Get Switch Order Preview**: action responsible for retrieving a Zuora preview of the switch order based on the selected offer, effective date, and current subscription.
* **Get Customer Address List**: retrieves a list of customer addresses for the current customer from Limio.
* **Is Offer Deliverable Decision**: decides whether the newly selected offer is deliverable and if it is, the flow navigates to the **Delivery Address Screen**.
* **Payment Selection Screen**: allows the user to select a payment method for the order. Hosts a Limio Order Total reusable component which displays a Zuora preview calculation of the order total.
  * **Limio Order Total***: Input: Component Position property* allows customising alignment of the component on the screen (set to "*right*" by default).

    <figure><img src="/files/hWfUkktfpPnkwKGjwoMc" alt=""><figcaption></figcaption></figure>
  * Select payment is a flow native Picklist component which allows to easily customise the list of available payment methods, learn more in [Payment Methods](/integrations/using-limio-for-salesforce/payment-method-options.md), [Invoice as a Payment Method](/integrations/using-limio-for-salesforce/payment-method-options/invoice-payment-method.md)
* **Selected Payment Decision**: based on the selected payment method, navigates to one of the following screens:
  * **Zuora Payment Screen**: handles payments within a Zuora iframe - used for credit cards and direct debit.
  * **Customer Wallet Screen**: contains a table with previously used payment methods for the current subscription.
* **Order Summary Screen**: displays a summary of the order.
  * *Input: Custom billing address fields*, *Input: Custom delivery address fields* allow passing custom details to the respective address objects in the order payload, learn more in [Add Custom Fields to Billing and Delivery Address Objects](/integrations/using-limio-for-salesforce/address-mandatory-fields/custom-address-fields.md)

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

### Agent's View

*This section offers a step-by-step guide for agents navigating the Limio for Salesforce Manage Subscriptions flow. It walks through the main screen components from the agent perspective.*

1. Select a Subscription: this and the next one are the two common screens at the beginning of a Manage Subscriptions parent flow. - Table columns can be customisable, see [Subscriptions Table Columns](/integrations/using-limio-for-salesforce/subscriptions-table-columns.md)\
   \- To manually sync data from Zuora to LFS, see [Limio for Salesforce Manual Sync](/integrations/using-limio-for-salesforce/troubleshooting/manual-sync.md)

   <figure><img src="/files/XqZNVVrxAF8h0c11uX93" alt=""><figcaption></figcaption></figure>
2. Select an Action:

* Select "Switch". After clicking Next, flow navigates to the Switch subflow.<br>

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

**Note**: The Switch action is available to all *non-gift active* subscriptions. Learn more about allowed actions and how to override and customise them in [Override Supported Subscription Actions](/integrations/setting-up-limio-for-salesforce/subscription-actions-rules/override-subscription-actions.md)

3\. Enter Switch details

* Select New Offer:

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

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

**Note:** learn how to pre-load filters based on the specific journey and subscription criteria in [Offers Configuration](/integrations/setting-up-limio-for-salesforce/filtering-rules.md)

After the offer was selected, Zuora preview API returns a calculated order total for the selected offer and effective date and displays it in a table view on top of the screen.

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

* Exception handling
  * In case of an inability to calculate the Zuora preview, a warning message is displayed along with the Request Id that can help troubleshoot the root cause of an issue.<br>

    <figure><img src="/files/JwIeFqc1fyKWsysnF0vP" alt=""><figcaption></figcaption></figure>
* Change Effective Date:\
  **Billing period** is a period between the last and the next schedule dates set by the billing frequency.
  * Effective date defaults to the End of the current billing period
  * Effective date must be within the current billing period
  * Current billing period start and end dates are displayed on the UI
  * If an effective date selected is outside the limit, an error message is displayed and it blocks further order processing: the date has to be amended in order to proceed to the next step.<br>

    <figure><img src="/files/Ha0NEymbTskIEeo5lqsH" alt=""><figcaption></figcaption></figure>
* Maximum allowed refund amount\
  By default, a refund amount, generated as a result of a downgrade, is capped with the latest charge. However, in some business cases you might want to limit it to a smaller number. This can be achieved by setting a limit in the flow property. Learn more in [Limit the Amount to Refund](/integrations/using-limio-for-salesforce/manage-subscriptions-flow/subflow-refund/limit-refund-amount.md)\
  \
  When *Maximum allowed refund amount* is populated, the component will compare the preview total amount against this limit; if the total amount exceeds such limit a user will see an error message, and they won't be able to proceed to the next screen until the total is below the set limit (by changing an offer or an effective date).

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

4\. Submit an Order

At the top of the last screen, users can find an overview of the order to confirm the purchase with the customer. The field set in the top section is dynamic and depends on the order.<br>

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

After submitting the order, Submit button becomes disabled and users can see order processing status. In case of an error, events entry will contain an error message.<br>

<figure><img src="/files/6wOaYl19S3sTGPvYrrsH" alt=""><figcaption></figcaption></figure>

### Tips

* When migrating subscriptions from a legacy system, there might be discrepancies in subscription details, especially in dates. We recommend performing a Zuora/Limio sync on all migrated subscription at the end of the migration to ensure data integrity.


---

# 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-switch.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.
