General Description of the Feature

This feature deals with the implementation of a new system where the Users can create simple or complicated rules that will be responsible to print different document templates during the Offer or the Order creation.

In addition, both the "Create Offer" and the "Accept Offer" transition required views have been enhanced to cover one more new functionality. In case that the setup key ManuallyDocumentSelectionEnabled is enabled, then the Users will be prompt to select from a drop-down, inside the relevant transition required views, which document template they want to use for the printing of this document.

If a User decides to select one template from the available in the relevant drop-down, then the system will completely disregard the rules made within the decision matrix administration page, and will print using this template.

To support all the above two new DI Applications have been created, one for testing purposes and one for production. In the DI application the users can login using their OneDealer User the same way as in the Notification Server. The Login screen will prompt the user to select the company, based on the OneDealer user logins this email has.

Within the DI application the user can select to upload different document templates, name them, select their purpose (Offer/Order) and link them with multiple different companies.

Decision Matrix administration

Within the administration page of the decision Matrix the User will be prompt to create queries using a more UI friendly way of Rules and Group of Rules.

In order to create these queries the user can choose from a list of available Entities, and fields that belong to these entities.  The available values for each field can be from a free text, to a drop down or a Boolean choice. During the selection of the most suitable decision matrix and thus printable template, the system will be asked to execute one by one all the available decision matrixes and result to a single result.  

These queries when are executed they can have two possible results, True or False, based on the Lead, VOI, Business Partner etc. they are compared with. The system is executing the queries with the following order:

  1. First is executing the inside statements, meaning the ones that are inside a group of rules. Like in mathematics when we first execute the calculations inside the parentheses. 
  2. Then after reaching to a single line rule, it is executing it from left to right.

Within the decision matrix grid list the user can select the plus button to create new decision matrixes. The creation and edit form, except the action rules creation (it is explained below), include also the following fields:

Field NameAvailable ValuesDescription
Document Type
  • Offer
  • Order
  • Unknown
Currently only the Order Document Type is been implemented
Is Activeboolean (True/False)Determines if this decision matrix is active and should be taken into consideration during the document printing selection from the system
Rule Namefree text (string)The Name/Description for this decision matrix.
Template Namedrop-down with the available document templatesIt displays for selection the available, uploaded in the DI application, document templates.
Print Document ModelAWTOrderDocumentCurrently only the creation of the AWT Order document external function can cover this whole feature.
OrdernumericIn case the system, during the statement execution, ends up in two or more possible results that can cover the given scenario, it compares the order numbers and selects the smaller.

Available Entities, Fields, Values, Statements

The following entities are currently available to be selected:

  • Business Partner: BusinessPartner
  • VOI: VoiItemView
  • Banks: TransactionBank
  • Document related (Offer,Order): Document
  • Custom Fields: model

Each of these entities has a big selection of available fields the user can select from.

The available statements declaring the value that should be checked for the selected field are:

  • Equal
  • Not Equal
  • In

The available conditions that can link two or more statements together are:

  • AND
  • OR

Note: For AWT the following Entities and fields are used:

DescriptionEntityFieldValues
BP TypeBusinessPartnerCompanyPrivatecPrivate  / cCompanycCompany = Company
cPrivate = Private
Payment MethodDocumentU_IDMS_FinalizeMethodCdAvailable values can be found here:
/SetupEntities/PaymentTermsGridList

VOITypeVOIItemViewInquiryInterestTypeCodedropdownStock Locator
VendConfigurator
New Vehicle
Used Vehicle
 Fuel typeVOIItemViewU_IDMS_FuelTypedropdown Electric
Transaction BankTransaction BankBankCodeAvailable values can be found here:
/SetupEntities/BanksGridList

MakeVOIItemViewU_IDMS_Make dropdown
USED MakeVOIItemViewU_IDMS_DIM_Make 98
Production StatusmodelProductionStatusCode 01,103,80
Power Of AttorneymodelPowerOfAttorneyTrue / False
IsNotCitizenOfUkrainmodelIsNotCitizenOfUkrainTrue / False

Example

We have a lead with the following data:

  • BP =Private
  • Make Name = BMW
  • Make Code = 12
  • Interest = StockLocator
  • Fuel = 3
  • Bank = 300465
  • Production Status = 103

We also have created the following decision matrix statement:

The decision matrix rule is translated from the system to the following query:

(CompanyPrivate=cPrivate AND (BankCode IN 380269,320478,360180,351629,300465) AND (U_IDMS_FuelType=3 AND (U_IDMS_Make=12 OR U_IDMS_Make=21)) AND (InterestTypeCode=VendConfigurator OR (InterestTypeCode=StockLocator AND (ProductionsStatusCode=01 OR ProductionsStatusCode=103 OR ProductionsStatusCode=80)))

So, if this statement is executed based on the above Lead example the result will be the following:

(True AND (True) AND (True AND (True OR False)) AND (False OR (True AND (False OR True OR False))) which is computer science this is equal with True (first the logical statements are executed from inside - out and then, when there are no parenthesis anymore from left to right). 

DI Application

As mentioned above each user can login into the DI Application similarly as in the Notification Server.

After Login a grid list with the available, uploaded document templates is presented to the user. The User can select form here to edit a template entry, download the document template, delete a template entry or create a new one.

After clicking on the New Template button (top right), a creation form is displayed including the following:

Field NameValueDescription
Namefree textA name for the template entry
Filename on diskfree textThe actual Name you want the uploaded document to receive in the server folder
Filedirectory file selectionThe user can select to upload the actual document template from their computer.
Type
  • Offer
  • Order
Current implementation covers only the Order
Descriptionfree textA description for the template entry
Is available for selection?boolean (true/falseIf the checkbox is checked and the setup key ManuallyDocumentSelectionEnabled is also enabled, then this template with appear in the relevant drop down for the manual template selection.
Companies listList with available Companies based on the user loginA template entry can be available in one or multiple companies. By default the selected and logged in company will be available but the user can select multiple companies with Ctrl and click on the relevant company.

Business Benefit

DSW can support, execute and print document templates based on any variate of logical statement a company can have as business process.

Configuration

New Administration and Process pages:

  • Decision Matrix administration page: ~/list/DocTemplateDecisionRuleLinqGridList

The sites for the administration of the document templated is: 

Setup Keys:

  • DITemplatesUrlDocuments: The base URL of the DI Templates system
  • ManuallyDocumentSelectionEnabled: Enable manual selection of the document offer
  • DecisionMatrixEnabled: Enables the Matrix provider for the selection of the template and the rules that are create in the Decision Matrix administration page.

Additional Information

  • Feature No.: AWT-1484
  • Test Case: AWT-1812

Current the Decision Matrix feature is implemented and used only on the AWTOrderDocument method.

  • No labels
Write a comment…