---
title: Customizing customer preferences
related:
  - https://docs.kentico.com/13/e-commerce-features/managing-on-line-stores/customers.md
  - https://docs.kentico.com/13/e-commerce-features/configuring-on-line-stores/configuring-currencies.md
  - https://docs.kentico.com/13/e-commerce-features/configuring-on-line-stores/configuring-payment-methods.md
  - https://docs.kentico.com/13/e-commerce-features/configuring-on-line-stores/configuring-shipping-options.md
  - https://docs.kentico.com/13/custom-development/customizing-providers.md
  - https://docs.kentico.com/13/custom-development.md
  - https://docs.kentico.com/13/e-commerce-features/customizing-on-line-stores/customer-related-customizing/customizing-creation-of-new-customers.md
  - https://docs.kentico.com/13/e-commerce-features/customizing-on-line-stores/customer-related-customizing/synchronizing-customer-and-user-properties.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

In Xperience, you can modify how the system decides which [currency](https://docs.kentico.com/13/e-commerce-features/configuring-on-line-stores/configuring-currencies.md), [payment method](https://docs.kentico.com/13/e-commerce-features/configuring-on-line-stores/configuring-payment-methods.md) and [shipping option](https://docs.kentico.com/13/e-commerce-features/configuring-on-line-stores/configuring-shipping-options.md) are preferred for a registered [customer](https://docs.kentico.com/13/e-commerce-features/managing-on-line-stores/customers.md). The customer's preferred currency, payment method and shipping option are pre-filled when the customer goes through the checkout process.

By default, the preferred currency, payment method and shipping option are chosen based on the customer's last order.

To customize how the system chooses the preferred currency, payment method and shipping option:

1. Prepare an assembly (_Class Library_ project) with class discovery enabled in your Xperience solution (or use an existing one). See [Adding custom assemblies](https://docs.kentico.com/13/custom-development/adding-custom-assemblies.md).
   - Reference the project from both your live site and Xperience administration (_CMSApp_) projects.
2. Create a new class that implements the **ICustomerPreferencesProvider** interface (found in the _CMS.Ecommerce_ namespace).
3. Define the **GetPreferences** method.

   - The method must return an object of the **CustomerPreferences** class, which contains the _CurrencyID_, _PaymentOptionID_ and _ShippingOptionID_ properties (all nullable integers). Assign _null_ values to the properties that you do not want to set.
4. Register your _ICustomerPreferencesProvider_ implementation using the **RegisterImplementation** assembly attribute.

   ```csharp

   using CMS;
   using CMS.Ecommerce;

   [assembly: RegisterImplementation(typeof(ICustomerPreferencesProvider), typeof(CustomCustomerPreferencesProvider))]

   public class CustomCustomerPreferencesProvider : ICustomerPreferencesProvider
   {
       public CustomerPreferences GetPreferences(CustomerInfo customer, SiteInfoIdentifier site)
       {
           ...
       }
   }

   ```
5. Save and Rebuild your project.

If you open your website, the system uses the registered _ICustomerPreferencesProvider_ implementation. Registered customers now have their currency, payment method and shipping option pre-filled based on your custom logic.
