# Checkout Link

**LFS version compatibility**: available with LFS v12.10 or later

**Limio Commerce version compatibility:** available with Limio Commerce v91 or later, requires [https://docs.limio.com/product/checkout/overview-how-to-customise-the-limio-modular-checkout](https://docs.limio.com/product/checkout/overview-how-to-customise-the-limio-modular-checkout "mention")

### Generating a checkout URL in Limio for Salesforce

The **Limio for Salesforce** Acquisition and Renewal flows allow sales people, customer success or customer service agents to select the most suitable offer(s) and add-on(s) for a customer, use a promo code, and generate a checkout link. This enables the customer to complete their order independently, without sharing payment details.

> **Note:** Payment links are only supported in Limio Acquisition and Renewal flows, as well as New Quote and Update Quote.

### Process Overview

1. The agent selects the relevant offer(s), add-on(s), and provide additional details (e.g. delivery address, if applicable).
2. The agent generates a Limio checkout URL and shares it with the customer.
3. The customer completes the checkout online using the provided link, viewing the quote/order and providing a payment method.

### Configuration

In the relevant **Limio for Salesforce** flow, an additional payment method called **"Generate checkout URL"** is available.

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

When this payment option is selected, the flow will re-direct the user to the custom component "Limio Initiate Checkout", that is the custom component generating the Limio basket and then the relevant URL for the customer to use.

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

This component supports 2 variables:

* **Limio Domain:** this is the domain of the limio shop, e.g. <https://sandbox-shop.dev.limio.com>
* **Checkout tag:** this is the tag for the formatting of the URL, e.g. **checkout**
  * Note that the checkout used must be using the [https://docs.limio.com/components/component-library/modular-checkout-components/component-checkout-form](https://docs.limio.com/components/component-library/modular-checkout-components/component-checkout-form "mention")

Populate these values in the Manager section of the Flow Builder.

Once the request to Limio is made and the basket created, the URL is formed and presented back to the user in the following format.

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

#### **Link timeout**

Currently a default basket expiration time equals 2 weeks, but it is now possible to set a custom expiration time via a flow property.

To add a basket session time limit, follow these few steps:

* Open a relevant flow (Limio Acquisition Journey or Limio Order Renew)
* Navigate to a payment method screen that holds *Limio Initiate Checkout* component

  <figure><img src="/files/vIdTQk3Y2YiCLITCEGOE" alt=""><figcaption></figcaption></figure>
* Select Limio initiate checkout(1) and populate the new property **Input: Expiration time in day/hour/minute format**(2)

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

Note: at least one of the values must be greater than 0. If the property is left blank or set to 0, the basket session will be set to a default expiration time.

### Read-only or modifiable checkout

You can configure the checkout to be read-only, so a customer can preview a quote or order before purchasing. Learn more here on [how to configure the cart to be read-only](https://docs.limio.com/components/component-library/cart-components/component-cart-items).

Alternatively, you can allow the customer to modify the quote/order by adding [cross-sell](https://docs.limio.com/components/component-library/cart-components/component-cross-sell) and [upsell](https://docs.limio.com/product/checkout/how-to-configure-upselling-in-the-cart-and-checkout#link-upsell-offers) options.

### Copy to clipboard button

**LFS version compatibility:** Available with LFS v12.75 or later.

From this version onward, the **Copy to clipboard** button is available for the **Limio Acquisition** and **Renew** flows. By default, this button is **hidden**, but it can be easily enabled.

### How to enable the "Copy to clipboard" button

* Open the relevant flow (**Limio Acquisition Journey** or **Limio Order Renew**).
* Navigate to the **payment method screen** that contains the **Limio Initiate Checkout** component.
* Select **Limio Initiate Checkout** and locate the new property:
  1. **Input: Show "Copy to clipboard" Button**
  2. Set this property to **true** (Boolean) to enable the button.<br>

     <figure><img src="/files/ULhR6r97G3nW8H4qH7tW" alt=""><figcaption></figcaption></figure>
* After enabling the button, it will be displayed on the **checkout page**. When a user clicks the **Copy to clipboard** button, the checkout URL is **automatically copied** to their clipboard.<br>

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

#### **Publish generated link information via Salesforce Platform event**

**LFS version compatibility: GA in LFS v12.14 or later, quoteId available in LFS v12.56 or later**

As soon as the checkout link is generated, Limio for Salesforce publishes a platform event called **icApp Event** in the **i42as** namespace. The following custom fields are populated:

**i42as\_\_Type\_\_c**: 'Checkout URL',\
**i42as\_\_data\_\_c**: a *stringified* json object in the following format:

```
{
    "caseId": "500XXXXXXXXXXXXX",
    "quoteId": "XXXXXXXXXXXXXXXX",
    "checkoutLink": "https://sandbox-shop.dev.limio.com/checkout?basket=basket-5VI3AQD1MGQ",
    "expiresAfter": {
        "minutes": 3,
        "hours": 2,
        "days": 1
    },
    "productCode": ["LI.PHYSICAL"],
    "offerName": "Physical new annual"
}
```

**Note:** The `caseId` property is populated only when the action is performed on a case record page. Similarly, the `quoteId` is populated only on the Limio Quote record page.

### Additional Order Source Attributes

When a customer completes a purchase via the generated checkout link, the resulting order includes the following source-related attributes:

* **`initiated_source`**: This attribute will be set to `"salesforce"` to indicate that the checkout process was initiated from Salesforce.
* **`source`**: This attribute will be set to `"shop"` when the order is submitted directly by the customer from the checkout page.

These attributes can be useful for downstream processing, analytics, or filtering orders based on their origin.


---

# 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/generate-checkout-link.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.
