# Pass Billing Address to Acquisition Flow

**LFS Version requirement:** v11.46 or later

The Limio for Salesforce acquisition journey does not natively support capturing a billing address, as the data model behind it might vary from one Salesforce implementation to another, so a specific data structure isn't enforced. By default, billing address is captured within the Zuora iframe, and in turn passed from Zuora to Limio when the order is created.

LFS however does support passing a custom defined billing address, that can be captured in whichever way our client wishes.

In version 11.45 and later of LFS managed package, the Limio Acquisition Journey comes with a built in flow variable, called billingAddress, of type apex class i42as\_\_CustomerAddress (where i42as is the namespace of the managed package).

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

This is where a billing address being captured should be stored, to then be used in the rest of the flow.

The CustomerAddress apex class is a global class with the following properties:

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

Note: **MailingStreet** maps to **address1, address2** standard address fields in Limio (it may combine street name and building number), while **MailingStreetName** maps to **streetName** and **MailingBuldingNumber** to **builingNumber.** MailingStreetName and MailingBuldingNumber properties are available in LFS version 12.10 or higher.

Key flow elements that support passing this additional variable to are:

* The apex class "Get Order Preview", to calculate accurate order total, inclusive of tax. This also allows for the use of the Preview variables in dynamic text such as compliance scripts, see
* The custom component for Zuora iframe, to be used to pre-fill the billing address to send to Zuora
* The custom component Limio - Order Total, to calculate accurate order total, inclusive of tax
* The custom component Limio - Order Summary, to calculate accurate order total, inclusive of tax, as well as sending the captured billing address to Limio as part of the order

## Additional Requirement: formatting of Country and State

The format accepted by Zuora and Limio for country (and state) must be an iso2, so for example for country Canada and state/province Ontario, the 2 must be passed as CA and ON, respectively.

However, LFS does expose a custom invocable apex class that converts country and state labels into iso2 codes, so should the billing address be stored in that format, this apex action can be used to convert them both, before using them. Below an example of how this class could be used.

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

In this case, the custom method takes the state stored on the contact record (as a label), and assigns its iso2 format to the billingAddress.MailingState variable.

## How to capture Billing Details

### Option 1

The easiest option for capturing billing details without the need to add any additional steps for the agent, is to leverage the query element of flow builder, query the relevant custom or standard fields, and assign them to the relevant billingAddress flow variable.

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

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

### Option 2

If the billing address is not captured already, or if the experience is to have the agent confirming the address with the option to change it, it is always possible to add a screen element, with an address type component, and capture the billing details there. These need to be assigned to the flow variable billingAddress.


---

# 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/acquisition-flow/pass-billing-address.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.
