====== Customization Framework on Mobile Client ======
=====Overview=====
From product version 2023.06, users can start the scanner application of the **Mobile Client in customization mode** and you can customize all the workflows available. From product version 2024.06, users can now create more complex customized workflows in the customization mode by creating user queries and adjusting & filtering the options in the **Customization Manager.**
Users have the possibility to customize the buttons and the screens of the flow while different customization for user groups and users can be defined in a way that is optimal for the warehouse.
Videos on the customization mode are available [[https://youtu.be/3pia9MbSu6s|here]] and [[https://www.youtube.com/watch?v=pisuWCFY2qM|here]].
**Overview about the customization UIs:**
{{ :implementation:wms:config_guide:cust_new_7_overview.png?nolink |}}
=====Customization mode=====
The name of the [[implementation:wms:fatclientconfig|parameter]] is /cust. When you start the Mobile Client in customization mode, a customization icon (a cog sign) is displayed on the top-right corner of the screen. If you click the icon, it becomes red and the customization mode is active.
To customize the flow, proceed as follows:
- Click the customization icon.
- If you want to customize the screen, you can click anywhere on the screen. If you want to customize a button, click on the given button to be customized.
- Customize your screen on the displayed Customization form (see customization options below) and click Save.
**Note**: In order to see the changes the user needs to restart the Mobile Client with disabled/switched off customization mode.
{{ :implementation:wms:config_guide:cust7.png |Customization mode}}
=====Customization options=====
====1. Customization options on the Customization Tab====
**User Group**: If you select a specific user group, the customization applies to the users in the given user group.
**User**: By default, no user is selected. Instead of user groups, you can define a specific user to whom the customization applies. Enable the User option and use the drop-down menu to select a user.
**Default Button**: The Default Button section is active if you customize a button.
* If you select the Default Button option, the user does not need to tap the button when working with the flow because the system automatically proceeds with the button. Only one button can be set as the default button on a screen.
* If you use the Default Button option, you can also set a screen timeout in seconds. In this case the system displays the button for the user for the defined interval. Within this interval the user can tap another button or the flow proceeds with the default button.
**Visible**: By default, the visible option is enabled.
* If you disable the option, the screen is not displayed for the user during the flow.
* If you disable the option, the button is not displayed for the user even if it is set as a default button.
**Note**: Hiding buttons overrides customizations. 'User' settings override 'User Group' settings and specific 'User Group' settings override 'All Users' settings.
**Example:** The customization applies to the Inventory user group. The Order button is set as the default button on the Select a Filter screen. The screen is displayed for the user for two seconds and if the user doesn't tap another button, the system proceeds with the Order button.
{{ :implementation:wms:config:cust9.png |Customization mode}}
**Example:** The GS1/EAN Barcode button is not visible for any group on the Select a Filter screen.
{{ :implementation:wms:config:cust3.png |Customization mode}}
====2. Customization options on the Events Tab====
{{:internal:events.png?nolink&300|}}{{ :internal:events_name.png?nolink&300|}}
**Load Event**: In this field you can customize an existing event, write the preferable name in the field than push the save button. What we do here is selecting any of the events that are already in use and modifying it's action. \\
**Load Event Name**: In this field you can modify an existing event by giving a unique name for your new customized event, after saving the unique name open the Query Manager in B1 where you can add your query to the name. For example create a //"sales_return"// name in the Load Event field and open it up in the Query Manager for furthermore customization.
{{ :implementation:wms:load_even_name.png?nolink& |}}
**Load Event List**: Under the Load Event field there are a list of the previous events and actions that you have already been through.\\
**Manage**: Pushing the manage button will show the customization manager screen.
=====Customization Manager=====
{{ :implementation:wms:config_guide:cust_new_3.png?nolink |}}
The **Customization Manager** screen is a helpful UI to manage your customizations in a visual way. On this screen you can find all of your user queries in a simple table. In the **Customization Manager** you can not change the database informations, you only have the option to filter/activate/inactivate/delete your added queries.
====1. All Components====
In the **All Components** part you can find a tree structure, the purpose of this navigation tree is to easily manage the rows where you added a new queries. The "golden arrow" shows the selected row in the tree structure. If you select the **All components** row than in the table on the right side will show every grid, every lines that are found below it in the system. \\
**The main components in the tree structure:**
* Mainflows
* Subflows
====2. Filter====
The **Filter** section contain all the filter options to search for a specific query.
**Screen:** By default, no screen is selected. In the screen from dropdown menu you can select the preferred screen.
**User Group:**If you select a specific user group, the customization applies to the users in the given user group.\\
**Options:**
* All Users
* Finance
* Inventory
* Purchase
* Sales
**User:**By default, no user is selected. Instead of user groups, you can define a specific user to whom the customization applies. Enable the User option and use the drop-down menu to select a user.
**Show:** This options is a dropdown menu where you can choose between several options to search a specific group of queries e.g. if you would like to check on the all of your inactive queries.\\
**Options:**
* Everything
* All Active
* All Inactive
* Active Visible
* Active Invisible
**Customization:** By clicking the options inside of the Customization aggregation you can easily set a quick filter and search for a group of queries. \\
**Options:**
* Screen
* Controls
* User Quiers
**Full Workflow:** Clicking on the Full Workflow will extend the Workflow column with extra information about the path of the flows.
**Reset Filters:** With this button you can clear the filters that you previously set.
=====Customization Examples=====
**1. Limitation:** On the **Events tab** you can see your previous steps/actions listed under the **Load Event** field. In that list you can clearly follow all your steps since you opened the mobile client in customization mode. Be aware you will not find those kind of actions listed when you selected a value from a list by a manual click, for example you chose a product by clicking it's name from the list instead of scanning the item barcode.\\
**The selected values will only appear in the action list when you manually entered the value (customercode, location etc.) into the field or scanned that value.**
{{:internal:wms:manul_click_list.png?&250|Choosing from a list by a click}}{{ :internal:wms:entered_list.png?&250|Entering the value}}
{{:implementation:wms:manul_click_list_2.0.png?&250|}}{{ :implementation:wms:entered_list_2.png?&250|}}
**2. Limitation:** If a user query are no longer used there is a specific procedure to remove the query from the system. First you have to delete the query from the **Customization Manager**, after that action open the **Query Manager** in SBO and remove the unused query from that table. \\
===Example 1. - Default customer for sales return===
Insert the //// to the input field, and after you added the query to the **Query Manager**, the query automatically will select the predefined customer then waits 1 second and clicks the forward button.
**Load Event Name:** sales_return
{{ :internal:events_name.png?nolink&300 |}}
**MSSQL:**
SELECT '' as "txtCustomerCode", 'btnForward' as "DefaultButton", 1 as "DefaultButtonClickTimeout"
**HANA:**
SELECT '' as "txtCustomerCode", 'btnForward' as "DefaultButton", 1 as "DefaultButtonClickTimeout" FROM DUMMY
**Implementation:** Add the query in the Query Manager in SBO.
{{ :implementation:wms:config_guide:query_manager_sales_return.png |}}
===Example 2. - Validations of the default value===
Validation of the input quantity value on the reception flow, in this example we are showing as default quantity the minor between still to receive and default quantity logistic unit.
**Load Event Name:** default_quantity
{{ :implementation:wms:default_quantity.png?nolink&300 |}}
**Implementation:** Add the query in the Query Manager in SBO.
**MSSQL:**
SELECT
CASE
WHEN CAST(LEFT('$[lblQuantity]', CHARINDEX(' ', '$[lblQuantity]')-1) AS INT) < U_PMX_DQLU THEN LEFT('$[lblQuantity]', CHARINDEX(' ', '$[lblQuantity]')-1)
ELSE U_PMX_DQLU
END AS "edtCounter0"
FROM "OITM" WHERE U_PMX_CUDE = '$[lblItem]'
**HANA:**
SELECT
CASE
WHEN CAST(LEFT('$[lblQuantity]', LOCATE( '$[lblQuantity]',' ')-1) AS INTEGER) < "U_PMX_DQLU" THEN LEFT('$[lblQuantity]', LOCATE( '$[lblQuantity]',' ')-1)
ELSE "U_PMX_DQLU"
END AS "edtCounter0"
FROM "OITM" WHERE "U_PMX_CUDE" = '$[lblItem]'
===Example 3. - Finding a Pick List connected to a default customer===
In this example if the query finds a Pick List that is connected to the //// then the query will select the first Pick List then clicking on the forward button, if the query will not find a Pick List then nothing will happen.
**Load Event Name:** finding_picklist_connected_default_customer
{{ :implementation:wms:finding_picklist_default_customer.png?nolink&300 |}}
**Implementation:** Add the query in the Query Manager in SBO.
**MSSQL & HANA:**
SELECT TOP 1 "DocEntry" AS "txtPickList",
CASE WHEN "PMX_PLHE"."DocEntry" IS NOT NULL THEN 'btnForward'
ELSE ''
END AS "DefaultButton",
CASE WHEN "PMX_PLHE"."DocEntry" IS NOT NULL THEN '1'
ELSE ''
END AS "DefaultButtonClickTimeout"
FROM "PMX_PLHE" WHERE "CardCode" = ''
ORDER BY "DocEntry" ASC