Call Documentation

The call documentation is a major process in LSI as well as CG. Its goal is to capture all information gathered during a visit at the customer site.

Tip: All designer units for call documentation are named with the prefix “CDoc”. If you are looking for actions, buttons, forms, process steps you can search by string “CDoc”.

The Process “TE_CDoc”

Process Overview Page

All variables for the process are defined in the Process Storage Variables. Dependent on CRM Process: "LSI-1-2-6-4-400-Call Documentation (1.2.6.4.6)" Initial step: TE_CDoc_Initial

Dispatching

  • if there is a parentMAUid selected--> go to step 'TE_CDoc_Overview_Initial'

  • else --> go to step 'TE_CDoc_Calls_Initial'

TODO: Common definitions for all phases

All phases are built like this: Initial step􏰄Execute step

Output arguments of the initial step are always setting the variable “curPhase”.

Entry points for the process

Basically the modular call documentation process can be called from two different entry points.

  1. Using the “TE_CDoc_OpenInProcess“context menu entry the process gets the Uid of the MA record from which the action is called.
  2. Via the “TE_ID_NET_CDoc” application menu entry point there is no MA Uid which could be passed to the process.

Case 1: Application menu entry point

In this case, no MA Uid can be passed to the process. The “Process” action in the “TE_ID_NET_CDoc” application menu is defined as follows:

Argument Description Template default value
name The name of the process. TE_CDoc

CreateNewTab

Execute action in new tab, reuse the tab and don’t refresh it with new MA Uid if the user clicks again on the menu entry.

{ "refresh": false, "reuseId": " TE_CDoc " }

CreateNewPopup

Create no new popup (optional).

false

Because no further information concerning MA, parent FI or parent PE exists, the “Process” action template can be used and the “TE_CDoc” process is called directly and opened in a new tab (with reuseId for reusing the open tab). All further dispatching steps is handled directly in the process.

If the process is started via the application menu entry, it starts in the “Activity” process phase.

Case 2: Context menu entry point

In this case we want to start the process from an MA record. Because we have to use the parent FI Uid or the parent PE Uid in the input message of the process (described below) it is necessary to read the parent records BEFORE starting the process. To achieve this a little JavaScript is used which reads the parent FI Uid and PE uid and passes them to the process (if these parent Uids exist).

The “JavaScript” action in the “TE_CDoc_OpenInProcess” context menu is defined as follows:

Argument Description Template default value

$function

Calls the JavaScript function for further steps.

u8.Playground.CDoc.execute

uid

The uid of the selected MA record.

Record

createNewTab

Executes action in new tab, reuses the tab and refreshes it with new MA Uid if you select a new record in listview.

{"refresh": true, "reuseId": "TE_CDoc"}

processName

The name of the process.

TE_CDoc

If the process is started via the application menu entry, it starts in the “Overview” process phase.

The following chart shows the structure and logic after one of the two entry points was selected and before the process is started.



The process is directly called if the user starts the process via the application menu entry. In contrast to that there is an additional JavaScript function if the user selects a MA record and starts the process via the context menu or default action (double-click in the MA list view). Because the process starts directly in the “Overview” phase after using the context menu action entry point, some additional data is necessary which has to be passed to the process. Therefore the u8.TeLSI.CDoc.execute JavaScript function was implemented. All variables which is created in this function is passed to the process and are available within the “Input Message” of the process.

Phase TE_CDoc_Calls (List of MA-records)

The “Activities” phase displays a list of the appointments that have already been documented and those still requiring documentation.

You can create a visit report for those appointments that have been documented.

Double-click on an appointment to open and edit it.



Phase TE_CDoc_Overview (Details of an MA-record)

The Overview Phase consists of 3 process steps. Finally it is displaying the form 'TE_CDoc_Overview'.

Form 'TE_CDoc_Overview'

On top the ExpandView (expandName: TE_MA_CDoc_Overview) of a selected MA-record is displayed via binding: model.uid: $component(url).#parentMAUid.

Note: The user is able to change master data but there is no context menu in this expandView on purpose as we don’t want to allow the user to navigate to somewhere else.

Related Data

It is not possible to create data in the overview phase as there are no “New” buttons offered. If you want to offer buttons just use the same headergroups and headers as in Error! Reference source not found..

Note: The Dashboard Panel’s parameter “hideItemsIfEmpty” is set to true and the ListView’s parameter “hideIfEmpty” is set to true. If a related ListView has no results, it is hidden.

The Related Data are displayed in a Dashboard Panel where the following ListViews are used:

Valid and Open Marketing Objectives

This ListView has a link to the parent FI-record via binding: link: $component(url).#parentFIUid.

By only setting this link we would show all linked AF-records for this FI-record. In our case we only want to

display valid AF-records, so we have to set a filter with a parameter on the start date of the selected MA-

record. This filter has to be applied before loading the form with the ListViews. That’s why have built an

additional process step. Building the correct filterstatement is done in process step

“TE_CDoc_Overview_LoadFilter”. The filter is set via binding: model.dataProvider.reader.arguments.filterStatement: $component(url).#marketingObjectivesStatement

Valid and Open Follow-Up Objectives

This ListView has a link to the parent FI-record via binding: link: $component(url).#parentFIUid.

By only setting this link we would show all linked AF-records for this FI-record. In our case we only want to display valid AF-records, so we have to set a filter with a parameter on the start date of the selected MA- record. This filter has to be applied before loading the form with the ListViews. That’s why have built an additional process step. Building the correct filterstatement is done in process step “TE_CDoc_Overview_LoadFilter”. The filter is set via binding: model.dataProvider.reader.arguments.filterStatement: $component(url).#followUpStatement

My Open Tasks

This ListView displays the fieldGroup TE_A1_CDoc with fixedFilterName: A1.TE_CDoc_MyOpen and a link which is set via binding: link.infoAreaId: FI, link.linkId: 127, link.recordId: $component(url).#parentFIUid.recordId

My Open Tasks for this Activity

This ListView displays the fieldGroup TE_A1_CDoc with fixedFilterName: A1.TE_CDoc_MyOpen and a link which is set via binding: link.infoAreaId: MA, link.linkId: 127, link.recordId: $component(url).#parentMAUid.recordId

Documents

This ListView displays the fieldGroup TE_D3_CDoc and a link which is set via binding: link.infoAreaId: MA, link.linkId: 127, link.recordId: $component(url).#parentMAUid.recordId

Process Steps

Double clicking a record in the first phase (TE_CDoc_Calls) in either “Undocumented Activities” or “Documented Activities” (Form 'TE_CDoc_Calls_Overview') executes the defaultAction “TE_A_CDoc_Proceed” (which in fact executes a simple ‘Proceed’ command).

This phase is active if the condition $.get("curPhase")=="TE_CDoc_Overview" is met. The variable “curPhase” is set in the output arguments of the initial step. So this phase is clickable if a MA-record is selected.

There are 3 process steps for this phase:
  • TE_CDoc_Overview_Initial


o The Initial step for the "Overview" phase. Set the process storage variable "curPhase" to "TE_CDoc_Overview", so that this phase gets active.

o Dispatching to step "TE_CDoc_Overview_LoadFilter" 􏰀

  • TE_CDoc_Overview_LoadFilter

o Calling the action template “JavaScriptWithCallback” with function “u8.TeLSI.CDoc.preShowForm_Overview_Complete”. In the function:

  • We are loading 2 fixed filters (AF.TE_CDoc_ValidAFNotLinkedToAK and AF.TE_CDoc_ValidAFLinkedToAK). It is possible to change the filters and to add additional parameters. (The parameters must be named like “$parValue<no>”).

  • The filters are loaded from the designer.

  • The parameters for those filters are set with the selected MA-record’s field “StartDate”.

  • The final filter statement is written back into process storage and passed on to the form.

o Dispatching to step "TE_CDoc_Overview_Execute" on callback of the JavaScript function.

  • TE_CDoc_Overview_Execute

o Showing Form Form 'TE_CDoc_Overview' and passing arguments (FormName, final filter statements and uids) to the form.

o No dispatching is needed as the user moves on via click on another phase.

Step – Flowchart



Initial Step

TE_CDoc_Order_Initial is the initial step for the "TE_CDoc_Order phase ". "countAURecords" data provider is used for counting existing AU records (linked to parent MA record) and the following dispatching in different steps. If the counter is 1 > go in serial entry with AU record. If the counter is greater than 1 > go in overview step where you can find the list of all existing records. If no AU record is found by the data provider > go in execute step, create an AU record and dispatch in serial entry step.



Overview Step

TE_CDoc_Order_Overview is the main step for an overview of AU records in the Order phase. A simple "Search" action template is called > SearchAndList name is "TE_CDoc_Order_Overview". The parent FI record is passed to the search as a link. There are some buttons configured in the SearchResultsSelect which hit a command that is requested by the dispatching in this step.

“SearchResultsSelect” Header IN Header Group “TE_CDoc_Order_Overview”

Used in the call documentation process in the "Order" phase in the "TE_CDoc_Order_Overview" step. All buttons execute a command which is requested by the process and dispatching step. > Header text = empty; all buttons are displayed with text.

Used buttons:

TE_CDoc_Order_Overview_New

  • hits the “Proceed/cdoc-new” command

TE_CDoc_Order_Overview_NewDeliveryDate

  • hits the “Proceed/cdoc-ld-new” command
  • QueryStateAction “C_OneRowSelected”

TE_AU_OrderSummary

  • executes the order summary report in new tab
  • QueryStateAction “C_OneRowSelected”
Remember: Query State Action C_OneRowSelected: TODO

“SearchSubList” Header IN Header Group “TE_CDoc_Order_Overview”

Used in the call documentation process in the "Order" phase in the "TE_CDoc_Order_Overview" step. Used sub info areas:

Order Item (UP)

  • use TE_UP_CDoc_Order_Overview header
  • use TE_A_CDoc_Proceed DefaultAction

Order Delivery (LD)

  • use TE_LD_CDoc_Order_Overview header
  • use TE_A_CDoc_Proceed DefaultAction

Order Delivery Items (LP)

  • use TE_LP_CDoc_Order_Overview header
  • use TE_A_CDoc_Proceed DefaultAction
Remember: TE_A_CDoc_Proceed default action: TODO

Execute Step

TE_CDoc_Order_Execute is the main step creating new AU records within the process. The “ExpandNew” action template is used with arguments described below. After clicking the “Save” Button, the “Save” command is hit, the SerialEntry for order positions is opened. After a “Cancel” event, the process traces the “Proceed” command, the system dispatches to the overview step.

ExpandNew Attributes

  • expandName: TE_CDoc_Order_Overview
  • infoAreaId: AU
  • link: $.get(“parentMAUid”)
  • link2: $.get(“parentFIUid”)

“New” “TE_CDoc_Order_Overview” Header IN Header Group

So a new AU record is created with a link to the selected MA and the parent FI record. After saving the record, the new AU Uid is filled into the process storage variable “curAU”. This variable is called in some further steps to get the newly created AU record.

Used in the call documentation process in the "Order" phase in the "TE_CDoc_Order_Execute" step. Standard “Save” and special “Cancel” button, CORE_ProceedCancel.

Used buttons:

CORE_ProceedCancel

  • hits the “Proceed” command
  • Image: CancelEdit; Label: Cancel
Note: This “Proceed” command is captured in the execute step in dispatching to navigate back to the “TE_CDoc_Order_Overview” overview step after clicking the “Cancel” Button.

New Delivery Step

TE_CDoc_Order_NewDelivery is the step for creating new LD records within the process. The “ExpandNew” action template is used with arguments described below. After clicking the “Save” Button, the “Save” command is hit, the SerialEntry for order positions is opened.

ExpandNew Attributes

  • expandName: LD
  • infoAreaId: LD
  • link: $.get(“curAU”)
Note: The link is the UID from the newly created AU record, or if the user selects an AU record from the overview step, then this AU record’s Uid is the curUid.

Common Expand Step

TE_CDoc_Common_Expand is used for opening records in Expand View. This step is called by TE_CDoc_Complete Phase (Details of an MA Record) given below.

TE_CDoc_POSMonitoring Phase (PS)

Step – Flowchart



TE_CDoc_Complete Phase (Details of an MA Record)

The “Complete” phase allows you to enter expenses related to the appointment. An overview of marketing objectives and follow-up objectives as well as tasks related to the visit allows you to create and edit related data. Finally you can generate a visit report and complete the call documentation.

Its structure is similar to the “Overview” phase but in addition you can create and edit data. This means we are using a few more process steps than in the “Overview” phase. Basically the process is displaying the 'TE_CDoc_Complete' form with MA-Details, AF-List, A1-List, D3-List and U011-List (Call Expenses) with U059-List (Quota, Budget).

TE_CDoc_Complete Form

The ExpandView (expandName: TE_MA_CDoc_Complete) of a selected MA record is displayed at the top via binding: model.uid: $component(url).#parentMAUid.

In comparison to the “Overview” phase a context menu is available to the user, the user can call the “Call Documentation Report” ( ‘TE_MA_CallSummary’ button) and also complete the current call ( ‘TE_CDoc_MA_Complete’ button).

Related Data

Note: Creating and editing related data is called via a button from a header or by a defaultAction from a ListView which always executes a command that is handled in the dispatching of the phase.
Note: The dashboard panel’s “hideItemsIfEmpty” parameter is set to true and the ListView’s “hideIfEmpty” parameter is set to true. If a related ListView has no results it is hidden.

The related data are displayed in a dashboard panel where the following ListViews are used:

Valid and Open Marketing Objectives

This ListView has a link to the parent FI record via binding: link: $component(url).#parentFIUid.

By only setting this link we would show all linked AF records for this FI record. In our case we only want to display valid AF records, so we have to set a filter with a parameter at the start date of the selected MA record. This filter has to be applied before loading the form with the ListViews. That’s why we have created an additional process step. Building the correct filter statement is done in the “TE_CDoc_Complete_LoadFilter” process step. The filter is set via binding:

  • model.dataProvider.reader.arguments.filterStatement: $component(url).#marketingObjectivesStatement
  • The Completed button (TE_AF_SetStateToCompleted) calls the “TE_AF_SetStateToCompleted” trigger.

Valid and Open Follow-Up Objectives

This ListView has a link to the parent FI record via binding: link: $component(url).#parentFIUid.

All linked AF records for this FI record would be displayed by only setting this link. In our example we only want to display valid AF records, so we have to set a filter with a parameter on the start date of the selected MA record. This filter has to be applied before loading the form with the ListViews. Therefore we have added an additional process step. Creating the correct filter statement is done in the “TE_CDoc_Complete_LoadFilter” process step. The filter is set via binding:

model.dataProvider.reader.arguments.filterStatement: $component(url).#followUpStatement

The “+ New” button (TE_CDoc_AF_New_FollowUp_Obj) calls the “Proceed/New_AF_FollowUp_Obj” command which is used in the dispatching of the 'TE_CDoc_Complete_Execute' process step.

The Completed button (TE_AF_SetStateToCompleted) calls the “TE_AF_SetStateToCompleted” trigger.

Call Expenses

U011...Call Expense

U059...Quota

In the Complete phase we want to create a new Call Expense (U011). The “New” button (TE_CDoc_U011_New_CallExpense) calls the “Proceed/New_U011” command which is used in the dispatching of the 'TE_CDoc_Complete_Execute' process step.

The 'TE_CDoc_Complete_New_U011_CallExpense' form is used for creating a new U011 record and displaying a list of U059 records below.

The form consists of an U011 ExpandView in “New” mode and shows a SearchView of U059 ("TE_U059_Overview") with a “U059.TE_MyQuotas” fixed filter (quotas for the current rep) underneath.

The used expandname is: TE_U011_CDoc and the rootLinks are set via binding from the call documentation process.

The U011 ExpandView has an onSave event ($command(sender, "Proceed");) which calls a proceed command manually. This workaround was necessary to return to the process step.

My Open Tasks

This ListView displays the TE_A1_CDoc fieldGroup with fixedFilterName: A1.TE_CDoc_MyOpen and a link which is set via binding: link.infoAreaId: FI, link.linkId: 127, link.recordId: $component(url).#parentFIUid.recordId

The defaultAction is CORE_A_Expand_Process which is dispatching to the next step: “TE_CDoc_Common_Expand” with the standard expand name.

Documents

This ListView displays the TE_D3_CDoc fieldGroup and a link which is set via binding: link.infoAreaId: MA, link.linkId: 127, link.recordId: $component(url).#parentMAUid.recordId

Creating new document links is the standard button which opens up a new tab.

Process Steps

This phase is active if the condition $.get("curPhase")=="TE_CDoc_Complete" is met. The “curPhase” variable is set in the output arguments of the initial step. So this phase can be clicked if an MA record is selected.

Basically there are 3 process steps for this phase:



  • TE_CDoc_Complete_Initial

o The initial step for the "Complete" phase. Set the process storage variable "curPhase" to

"TE_CDoc_Complete", so that this phase becomes active. o Dispatching to the "TE_CDoc_Complete_LoadFilter" step

  • TE_CDoc_Overview_LoadFilter

o Calling the action template “JavaScriptWithCallback” with the following function:

u8.TeLSI.CDoc.preShowForm_Overview_Complete. In the function:

  • We are loading 2 fixed filters (AF.TE_CDoc_ValidAFNotLinkedToAK and AF.TE_CDoc_ValidAFLinkedToAK). It is possible to change the filters and to add additional parameters. (The parameters must be named like “$parValue<no>”).

  • The filters are loaded from the designer.

  • The parameters for those filters are set with the selected MA record’s field

    “StartDate”.

  • The final filter statement is written back into the process storage and passed on to

    the form.

o Dispatching to the "TE_CDoc_Complete_Execute" step on callback of the JavaScript

function.

  • TE_CDoc_Overview_Execute

o Showing the Form 'TE_CDoc_Overview' form and passing arguments (FormName, final filter statements and uids) to the form.

o Creating and editing related data is done via dispatching: