Legacy platform

Automatic notes logging

Notes must be logged automatically when users perform certain tasks by using wizards. These notes can be used for auditing purposes.

Solution

The following section describes APIs, user exits, services, and other components.

Notes are automatically logged for the following wizards:
  • Add Lines to Order
  • Cancel Order
  • Change Customer Options
  • Change Gift Options
  • Create Order
  • Manage Payment
  • Price Match Flow
  • Reschedule Appointment
  • Reship Product
When the user confirms an order, the YCD_LogWizardNotesForOrderAudits_9.2.1 service is invoked with wizardID and the OrderHeaderKey attributes as inputs. Similarly, the following attributes are passed to the service in different scenarios:
  • OrderLineKey: When the user modifies a single order line. For example, when the user performs a price match for a product.
  • ReasonCodeType: When the user modifies an order. For example, when the user cancels an order.
The service calls the getEventAuditorList API to access the YFS_EVENT_AUDITOR table that stores the WIZARD_ID, NOTE_TEXT, and the NOTE_TYPE.
The note text supports variable content by using XPATH. For example,
 <user:User@/UserName> confirmed this order on behalf of 
<order:Order/@CustomerFirstName><order:Order/@CustomerLastName> on <order:Order/@OrderDate>
In the example, the UserName, CustomerFirstName, CustomerLastName, and OrderDate attributes must be retrieved to form the actual note that must be appended to the order. Therefore, based on the namespace, the appropriate API is called. Only the following namespaces are supported by the application. The namespace and the APIs are as follows:
  • order: getCompleteOrderDetails API
  • orderline: getOrderLineDetails API
  • reason: getCommonCodeList API
  • user: getUserHierarchy API
To get the user name, the getUserHierarchy API is called with the LoginId of the user who confirmed the order. Similarly, to get the customer's first name, last name, and the order date, the getCompleteOrderDetails API is called with the OrderHeaderKey passed in the service. The output templates of these APIs are formed by using the XPATH. The changeOrder API is called to save the note to the order.

Similarly, notes are logged automatically for other wizards as well.

Implementation

The following section describes the rules that you must configure.

The mapping of the wizard IDs to the note types is done in Sterling™ Business Center. Therefore, you must configure the wizard notes so that a default note can be logged by the system automatically during wizard flows. For more information, see the Sterling Business Center System Configuration.

End-user impact

None.