# Populate Custom Fields in Zuora

Zuora custom fields let you capture additional information on objects such as **Accounts**, **Subscriptions**, and **Orders**, tailored to your business requirements. These fields provide flexibility to store custom attributes that aren't available by default in Zuora.

Limio supports the automatic population of Zuora custom fields from your Limio data, such as your **Catalog**, **Modular** **Checkout**, or from **Order** data making it easier to pass data from the customer journey into Zuora.

There are three ways to populate custom fields in Zuora via Limio:

| Source                                            | Use Case                                            | Configuration                                                     |
| ------------------------------------------------- | --------------------------------------------------- | ----------------------------------------------------------------- |
| **A. Populate from Limio Catalog**                | Populate fields using metadata from a Page or Offer | No-code, via templates                                            |
| **B. Populate from Limio Modular Checkout input** | Capture user input via Field subcomponents          | <p>No-code, via checkout component<br>Low-code, via Limio SDK</p> |
| **C. Populate from Limio Order**                  | Map order data to Zuora with code                   | Code, via Order Plugin                                            |

{% hint style="info" %}
**OOTB custom fields**

Limio recommends setting up specific Zuora custom fields to enhance the integration with Limio around specific use cases, such as cancellations. If those custom fields are set in Zuora, Limio will automatically be populated. Explore [Out-Of-The-Box Zuora Custom Fields](https://docs.limio.com/integrations/zuora-integration/getting-started/recommended-custom-fields-to-set-up-in-zuora-to-receive-enriched-limio-data).
{% endhint %}

## Pre-requisite

* You should be familiar on how to create Custom Fields in Zuora. [See Zuora Docs >](https://docs.zuora.com/en/zuora-platform/extensibility/custom-fields/custom-field-overview)

## A. **Populate from Limio Catalog**

### 1. Configure the custom field in Zuora

To allow Limio to fill custom fields, you must first define them in Zuora. Limio Catalog supports populating custom fields related to the following Zuora objects:

* Subscriptions
* Orders
* Account

It's important to note that custom fields populated by Limio or Limio for Salesforce should adhere to a specific API naming convention. The API Name must begin with `ltm_` and have `__c` appended at the end. E.g. `ltm_fieldName__c`. Field Label in Zuora however has no restriction nor impact in Limio.

<figure><img src="https://3950144701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKxTpA9AeeNYx1ml6UpHj%2Fuploads%2F5UTVtBkfgtDDcr6LUQDw%2Fimage.png?alt=media&#x26;token=b5b2a2eb-b1c9-4b4e-ba4a-506ac54cf65a" alt=""><figcaption></figcaption></figure>

### 2. Sync the Zuora Product catalog

To ensure Limio includes the custom field in the order sent to Zuora, Limio must first be aware of the custom fields defined in Zuora, and which objects they are on.

Initiate the Catalog Sync process in the Limio app. For step-by-step instructions, refer to our guide on how to [sync-between-limio-catalog-and-zuora-catalog](https://docs.limio.com/integrations/keeping-zuora-and-limio-in-sync/sync-between-limio-catalog-and-zuora-catalog "mention")

**For lmo and utm parameters, you are now done.** `lmo` parameters will automatically come via the URL when the offer loads on a Limio Page. `utm` parameters will be added via the referrer, for example a social ad might come from `?utm_source=ppc` via `?utm_content=page123`.

**For ltm parameters, follow step 3 to 5.** Those will allow you to configure the value of the custom fields in the Limio Catalog. For detailed insights into the full use of `ltm_ tags` refer to our documentation on [https://docs.limio.com/product/analytics/how-to-configure-limio-for-tracking-and-attribution-in-salesforce-and-zuora](https://docs.limio.com/product/analytics/how-to-configure-limio-for-tracking-and-attribution-in-salesforce-and-zuora "mention").

### 3. \[ltm parameters only] Add the custom attribute to the template

To define custom attributes in Limio, follow this guide on [how to create new custom attributes](https://docs.limio.com/product/settings/config-settings/templates-and-custom-attributes). In order for the custom attribute to be passed to Zuora they must match the API without `__c` appended on the end. You do not need to put information about the Zuora object.

Please be mindful that these attributes are case-sensitive. Refer to the example below for clarification:

<figure><img src="https://3950144701-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKxTpA9AeeNYx1ml6UpHj%2Fuploads%2FsAEhzAImk7SA01eBGz2L%2Fimage.png?alt=media&#x26;token=94f499bb-9ee5-4ab1-b933-860b1f8374ee" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**A note on Type**

Most custom fields are String in Limio and Text in Zuora. However, if you are using a custom field Date in Zuora, for example to captured a certain start date, follow these steps:

1. Define the custom field in Zuora, selecting "Data Type: Date."
2. In the Limio template, define the custom field as "Type: string."
3. When specifying the custom field value, input a string in the format `YYYY-MM-DD`.

By adhering to these steps, the custom field will be captured as a date in Zuora, displayed according to the format defined in your Zuora settings.
{% endhint %}

### 4. \[ltm parameters only] Provide the value of the custom field on the Page / Offer

Once added to the relevant template, the new attribute will appear on the Offer or Page object in Limio using that template. You can then simply enter the desired field value and save the page.

### 5. \[ltm parameters only] Publish the page

Changes will only be reflected on new events after the relevant pages have been published.

## B. Populate from Limio Modular Checkout input

### Populating Zuora Subscription Fields

You will need to use a specific Subcomponent: Field in Limio's Modular Checkout and respect some naming conventions. Learn more [https://docs.limio.com/components/component-library/modular-checkout-components/modular-checkout-subcomponents-in-form/form-subcomponent-field](https://docs.limio.com/components/component-library/modular-checkout-components/modular-checkout-subcomponents-in-form/form-subcomponent-field "mention").

### Populating Zuora Contact fields

Limio also supports the automatic population of default Zuora contact fields, such as email, phone number, and address details. These can be updated during order submission to keep billing information accurate and up to date.

To learn how to configure and populate these standard fields using Limio's out-of-the-box components and custom SDK integrations, see our guide: [updating-contact-details-in-zuora-via-limio-orders](https://docs.limio.com/integrations/keeping-zuora-and-limio-in-sync/how-limio-events-updates-zuora-for-commerce/updating-contact-details-in-zuora-via-limio-orders "mention")

### Populating any fields in Zuora (requires code)

As part of the Limio SDK, you can use the `updateCustomField` method to define a custom field and map it to Zuora. For example, if you want to map a custom field named `UserID` on the Zuora Account object, pass `'UserID.account'` to this method. See [https://docs.limio.com/developers/limio-sdk/basket#updatecustomfield-updating-custom-field](https://docs.limio.com/developers/limio-sdk/basket#updatecustomfield-updating-custom-field "mention") to learn more.

## C. Populate from Limio Order

Each Limio environment comes with an [Broken link](https://docs.limio.com/integrations/zuora-integration/broken-reference "mention") framework. This is used to orchestrate systems such as Zuora and Salesforce as well as custom systems via [callout-plugin](https://docs.limio.com/integrations/order-orchestration/callout-plugin "mention") . However, it is possible to create custom Order Plugin, which can be customised to run customer-specific logic.

If you cannot use the methods above, contact <support@limio.com> to request the creation or a change to the Custom Order Plugin.
