## Client side
Go to **Admin Console** \> **Themes & Content** and click **Widget Templates**.
Find the Widget named **OrdersView** and click **View Only**.
In the **Details** page, click **Clone** and then give your cloned OrdersView a name and group, in this case "CustomOrdersView" in group "Custom"
Click **Save**.
Now click the **Code** tab to see the standard code that we are going to be changing.
We are going to add a text input to allow the user to enter text to filter a custom property on the order history, a current text field that is similar to that is the po number filter, so let's copy and paste it where we want the new field and then change it accordingly and save your changes.
Code Sample: CustomOrdersView
Go to **Themes & Content** and click **Themes**, find the theme you are going to make use your custom Widget Template (for more information, review the [Extend the Website Front End](🔗) article)
Click **Edit** .
In the **Details** page, click the **Widgets**finger tab and scroll down to find the **OrdersView**.
Click **Edit** for the **OrdersView** and select your customized template.
Click **Save**.
Click **Preview** and click **Preview** on the **Preview** modal.
When the page refreshes after publishing, you can select **Search Orders +** and view the new "Custom Properties" field or you can sign into the storefront and go to **My Account** \> **Order History** and open **Search Orders**. The new text field should be available.
The text field needs to be wired up to do something. Close the **Preview** tab and return to the **Admin Console**.
In **Themes & Content** click **Theme Resources** and search for **insite.order-list.controller**.
Click **View Only**.
In the **Details** page click **Clone** and give your **cloned insite.order-list.controller** a name and group. For this example, we use the name of "custom.order-list.controller" and put it in **Custom** group.
Click **Save**.
Click the **Code** tab to see the standard code that we will change.
Code Sample: insite.order-list.controller
Remember, in the view change we made above, we bound our custom text field to **vm.searchFilter.customProperty (ng-model="vm.searchFilter.customProperty")**, but notice that **searchFilter** is of type **OrderSearchFilter**, so we need to add our **customProperty** field to an override of this type. Because all of our files start with **insite.** and pascal case is converted to lowercase with dashes between words, we can find this file by convention. Search in **Theme Resources** for **insite.order-search-filter** and find **insite.order-search-filter.model**.
Click **View Only** for **insite.order-search-filter.model** and clone it like we did the controller, giving it the name "custom.order-search-filter.model" and put it in the **Custom** group. The code for insite.order-search-filter.model is:
Code Sample: insite.order-search-filter.model
In your cloned version, change the name of the class to "CustomOrderSearchFilter" and, as a best practice and for upgradeability, make it inherit from **OrderSearchFilter** so we can just add our one property. The code should look like:
Sample Code: custom.order-search-filter.model
Go back to your cloned **custom.order-list.controller**. Rename the class from "OrderListController" to "CustomOrderListController" and make it extend **OrderListController**. Because we are inheriting from **OrderListController**, as a best practice and for upgradeability, we can remove the things we don't need to change and just inherit them from the standard code. The only things we need to change are the types at the top to use our **CustomOrderSearchFilter** type and then override the clear method to blank out our **customProperty** field and call the standard code. We must also tell Angular to use our **CustomOrderListController** instead of the standard **OrderListController** which is done in the registration at the very bottom.
Code Sample: custom.order-list.controller
Go back into your theme and in the **Scripts** tab assign **custom.order-search-filter.model** and **custom.order-list.controller** to your theme.
Click **Preview** to make sure your typescript compiles.
Sign in to the website/storefront and go to **Order History**.
Enter a value in your custom property text box and click **Search**.
Go to your browser's dev tools and find the network monitoring options. You should see it now makes a request with **customProperty=text** from **textbox** in the query string.
We now have the client side set up to send the filter to the server. Go into the **Theme** and publish the **Theme Resources** and then publish the Theme.
## Server side
We have the client sending the data we want to filter on to **/api/v1/orders** in a query string parameter named **customProperty**. This request is handled by the **OrdersV1Controller.Get** method. This method calls the **IGetOrderCollectionMapper.MapParameter** method to map the incoming request data to the **GetOrderCollectionParameter** object that is passed into the **IOrderService.GetOrderCollection** method. This is the place where we want to get our **customProperty** parameter value from the query string and set it in the **Properties** collection of the **GetOrderCollectionParameter** object so it will be available to us in the handler chain.
Create a new class that inherits from **Insite.Order.WebApi.V1.Mappers.GetOrderCollectionMapper** and override the **MapParameter** method as follows:
Code Sample: CustomGetOrderCollectionMapper

This will get our **customProperty** value from the query string in to the handler chain. The handler chain for **GetOrderCollection** is:
Handler | Order |
GetStoredOrderCollectionQueryHandler | 550 |
GetStoredOrderCollectionFilterHandler | 600 |
GetRealTimeOrderCollectionMapDataSetHandler | 525 |
GetRealTimeOrderCollectionJobDefinitionHandler | 450 |
GetRealTimeOrderCollectionExecuteJobHandler | 500 |
GetOrderCollectionToListHandler | 750 |
GetOrderCollectionStatusMappingsHandler | 850 |
GetOrderCollectionSortHandler | 650 |
GetOrderCollectionSettingsHandler | 400 |
GetOrderCollectionPagingHandler | 700 |
GetOrderCollectionCurrenciesHandler | 800 |
As a best practice and to ensure upgradeability, we do not want to override standard handlers, instead we want to inject our own handlers where necessary between standard handlers. If we were doing **Real Time Order History**, we would create a handler with an order between 450 and 500 and add our value to the **GetOrderCollectionParameter.RealTimeJobParameters** collection (or we could just do so right away in the mapper above instead of adding it to the **Properties** collection). In our case, we are using a refresh to get the Order History nightly and querying from the **OrderHistory** table. We want to create a handler between 600 and 650 so it runs after the standard filters are applied, but before the sorting is applied:
Code Sample: CustomGetStoredOrderCollectionFilterHandler
The text box you added to the **Order History** list screen should now function.