Macros & Workflows

How to measure Customer Satisfaction and grow your business

Using VISUAL to manage customer satisfaction
So you managed to convert a prospect into a customer and an order - good stuff! 

Now what are you going to do to keep them as a customer?  One thing for sure is that you want to keep them happy.

Happy Customer = Profitable Customer

Building up loyalty fosters repeat business - which reduces the cost of sales in customer acquisitions.  Happy customers are also most likely to refer you to others; acting as your champion and bringing in more sales....bonus!

How do you know if your customers are happy? 

You need to measure it.

And after you measure it, you need to manage it

And then you need to report and act on it.

You may already have a process and methodology in place (or maybe not).  Either way, you can have VISUAL be part of the process and help facilitate and manage accordingly.

Let's walkthrough how we can do this with VISUAL ERP.

Let's say we want to measure our customer's satisfaction based on Price, Quality and Delivery on each sales order.  So after each shipment of an order, someone will follow up with the customer and have them rate the service based on Price, Quality and Delivery.  The customer can rate each as "Great", "Okay" or "Not Good".

Simple metrics - I leave it to you on what the definitions should be.

Now to configure VISUAL ERP, go in Customer Order Entry, and bring up the User Defined Field Maintenance window from the EDIT menu (Edit > Customizable UDFs...).

From there, you will want to click on the Insert Tab UDF toolbar icon (or select it from the EDIT menu).  We'll first start by adding the first customer satisfaction metric "Price".  Set the following parameters:

  • Data Type: select String List (which will contain the 3 possible values Great, Okay and Not Good)
  • Tab: enter "Customer Satisfaction" - this is the tab that will appear in the customer order header area
  • Label: enter "Price" - this is the caption of the first metric
  • Seq No: accept the default value
     

Customizable User Defined Field in VISUAL ERP

 

As mentioned earlier - Price can be either "Great", "Okay" or "Not Good" - so we will need to create a pre-defined List containing these values. 

Check the LIST checkbox on the right...and click on the SET LIST button.

In the following window, use the INSERT button to enter the 3 values.  You may notice in the screenshot - I also refer to a number range - so that customers can be asked to rate on a numbered scale too.  Again - your company's metric definitions may be different.

  

Customizable UDF String List in VISUAL ERP

Once you have created the above list.  Click Save to continue

You will want to repeat the above steps for the Quality and Delivery metrics (fields)

We'll also create an extra field to capture any additional information a customer may provide (a free form field). 

So, in the same manner as you did previously, click on the Insert Tab UDF toolbar icon and set the following parameters:

  • Data Type: select String
  • Tab: enter/select "Customer Satisfaction"
  • Label: enter "Comments"
  • Seq No: accept the default value
      

Adding a Custom UDF in VISUAL ERP

 

Your User Defined Field Maintenance window should now contain the 4 fields created (shown below).  Click on the Save toolbar icon to save everything to VISUAL - which will create these new fields to the Customer Order Enter user interface.

 

List of Customizable UDFs in VISUAL ERP

Your Customer Order Entry window should now have a "Customer Satisfaction" Tab in the header area - with the 4 fields we created.

Customer Satisfaction Metrics in VISUAL
Custom "Customer Satisfaction" Tab in Customer Order Entry window

So now you have a place to capture and maintain Customer Satisfaction at the customer order level.

Having a place to capture this information is great - BUT how can we ensure that someone from customer service will remember to follow through and contact the customer? 

Well, one way to help facilitate this is through using VISUAL's Workflow.

With Workflow, you can have VISUAL send an email reminder as well as create a task for customer service after the customer order has been shipped and closed

The workflow structure could look like this (simplified):

  Customer Satisfaction Workflow in VISUAL ERP

 

The above is one example on how you can leverage VISUAL's features and functions to measure and manage customer satisfaction.  I hope this get's you thinking on how you can incorporate something similar into your practice.

 

Using Notifications to keep your customers and vendors up to date on their orders - and your internal staff too!

VISUAL's email capabilities have been further enhanced in Version 9 with the introduction of Notifications.  In fact, it should be noted that VISUAL's entire email system has been updated and now works with multiple email systems including Office365, Gmail, Thunderbird, etc. 

For those of you using Workflow to send emails - this is awesome news.  Workflow and emails were sometimes a hit and miss depending on your environment - and a PITA to troubleshoot!

So, Notifications in VISUAL allows you to communicate updates to your customers and vendors on:

  • when a New Order is entered;
  • when there is a Change Order, and/or
  • when there's a Shipment/Receipt on the order.

These notifications can ALSO be sent to people within your company as well - think of notifying...

  • salesperson of shipments
  • production/planning department of order changes
  • accounting of an invoice payment of a large order

And all of this can all be done automatically and behind the scenes.

Notifications can be set globally at the customer and vendor level as well as at the order level.

In the Customer Order Entry window, under the Notifications tab in header area - you can indicate whether notifications should be processed. 
 

Infor VISUAL ERP - Order Notification

 

You can also bring up the following window by selecting Order Notifications under the EDIT menu:
 

Infor VISUAL ERP - Email Notification


Notifications to your customers and vendors will always be sent to the contact tied to the specific order.  Internal communications (your employees) are specified in the window above (right area) or can be set globally at the customer and vendor level. 

To set these parameters at the customer and vendor level - look for the Notifications option under the MAINTAIN menu of the respective module (Customer Maintenance/Vendor Maintenance)

The amount of details in these notifications are entirely up to you and can be easily configured - using templates.  Managing these templates can be done in the Notification Maintenance window, which can be found under the ADMIN menu
 

Infor VISUAL ERP - Notification Maintenance

 
You will notice across the top are the various templates particular to the notification type (business event) - ie: customer order, purchase order, shipment, receipt, etc. 

The right area lists all the available tokens (placeholders) to personalize the content of the notification.  These tokens will be replaced with content from your data of the related document when the email is created.

The main area of the window allows you to define the content for:

  • Subject Line
  • Header Message
  • Line Details
  • Footer Message

Once set - you are good to go.  It's another option to keep everyone apprised of what's going on - externally and internally.

  

Automatically link new work orders to line items in the customer order entry window

The New Work Order feature in Customer Order Entry (and Order Management Window) allows you to create and link work orders as you enter the sales order into VISUAL.

Infor VISUAL ERP

This feature can save you quite a bit of time for situations where creating work orders on the fly from the order entry screen makes sense.  It allows you enter the sales order, create the work order and link (allocate) it all in one step. 

If linking work orders to customer order lines is common practice in your work place you might want to consider this option - Again, if it makes sense for your business

If you do use this feature or plan to use it - this macro might be of use to you.

Chances are, not all line items of a sales order require a work order....

  • Some items may be purchased.
  • Some items may be stocked items
  • Some items fall under specific planning policies
  • Some items are service charges
  • etc...

So the decision to link work orders to customer order lines may rest on the person entering the sales order.  You can streamline this process (and make the decision automatically) coding the business logic into an OnSave macro.

The following macro will automatically create and link work orders to line items for FABRICATED parts.  Simple requirement - but you get the idea

Macro breakdown

The Database Connection parameters:  You will need this to for the database lookup - which we will be doing to verify whether the line item meets the criteria to create a new work order.

strServerName="E N T E R   Y O U R   S E R V E R    N A M E"
strDatabase="E N T E R    Y O U R    V I S U A L    D A T A B A S E    N A M E"
strUserName="E N T E R    Y O U R    R E A D O N L Y    U S E R    I D"
strPassword="E N T E R    Y O U R    P A S S W O R D"

'*** Connection string for SQL Server
strcnn="Driver={SQL Server};Server=" & strServerName & ";Database=" & strDatabase & ";Uid=" & strUsername & ";Pwd=" & strPassword & ";"

set rs = CreateObject("ADODB.Recordset")

The remaining code uses the LINES object which allows us to read the line items (grid) of the customer order.  As we cycle through the lines, the macro will do a database lookup to determine whether the PART meets our requirement to create a new work order.  If a work order is required, we check the "New W/O" checkbox.  To do this we set the ADD field to "true".

FYI: In macro terms, the variable ADD represents the "New W/O" checkbox you see in the grid.

Now because whenever you set the New W/O checkbox, VISUAL prompts the user to set the status of the new work order (Unreleased, Firmed or Released).  To accept the defaults, we use the SendKey function to hit the enter key. 

Infor VISUAL ERP - New Work Order Defaults
New Work Order Prompt - Use the Sendkeys to "hit" the OK button

 

set objShell = CreateObject("WScript.Shell")

Set ORDERLINES = LINES.Value
Lcnt = ORDERLINES.Count

Set ORDERLINE = ORDERLINES(Lcnt-1).VALUE
Set OrderLines = LINES.VALUE

For i = 0 To (ORDERLINES.COUNT - 1)

    Set ORDERLINE = ORDERLINES(i).VALUE
    
    PartID=ORDERLINE("PART_ID")
    
    '*** Check SUPPLY_TYPE to make sure that line has not been allocated yet
    SupplyType=ORDERLINE("SUPPLY_TYPE") & ""
    
    '*** Verify that the line item is a VISUAL Part and that
    '*** it has not been allocated yet
    if PartID<>"" and SupplyType="" then
        
        '*** Database lookup to check whether part meets
        '*** new work order requirement
        '*** In this case if the part is FABRICATED
        
        SQL="SELECT FABRICATED FROM PART WHERE ID='" & PartID & "'"
        rs.open SQL, strcnn

        if not rs.eof then
            rs.movefirst
            if rs("FABRICATED")="Y" then
                
                '*** Part meets requirement.
                '*** Check New W/O checkbox
                ORDERLINE("ADD")=true

                '*** Send the ENTER key to accept
                '*** new work order defaults
                objShell.SendKeys("~")

            end if
        end if
        rs.close
    end if
Next

Download the macro and try it yourself

Validating your custom drop-down list

The Customizable UDF (CUDF) feature in VISUAL allows you to create and define your own list of fields that you can integrate into the VISUAL interface and capture information particular to your business.  

The drop-down list is one such field you can add.  When you create the down-down CUDF you have the option to populate the list manually or link it to data in your VISUAL database.

Infor VISUAL ERP - Custom User Defined Fields

The drawback to these drop-down lists is that VISUAL does not validate the information entered against the available options in the list.  It's of no fault to VISUAL.  I've been calling this field a drop-down list but it's actually a ComboBox.  A combobox is a combination of a drop-down list and a single-line textbox, allowing the user to either enter data directly or choose from the list of existing items. 

So basically it's a free form field - allowing the user to enter anything.  This may be a problem if you are depending on your users to only enter values that are defined in the list.

To enforce this you will need to do this yourself via a database trigger, workflow, macro, or a big heavy stick.

So before you grab that stick - the example below may give you an idea how you can handle this using a macro. 

The macro validates the data entered in a CUDF by doing a database lookup on the USER_DEF_FIELDS table which contains down-down definitions.  Apart for the database connection information - you will need to provide the following macro variables:

Variable: UDF_Caption
This is the caption (label) of the drop-down field.  In my example I'm using "Customer Service Rep".  NOTE: I don't use the UDF-XXXXXXX identifier because I seen VISUAL renumber these IDs.

Variable: UDF_VEModule
Specify the VISUAL program/module (VMORDENT, VMPURENT, etc)

Variable: UDF_Area
Where in the module the CUDF is contained.
Header area = ""
Grid Line Item = "tblColLineItem"
Delivery Schedule = "tblEditDelSched"

Variable: UDF_VALUE
The CUDF string (value) to validate.  In my example, I'm using udfStrCombo1 which is the CUDF field variable containing the Customer Service Rep value

In my example, I'm validating the value entered in the Customer Service Rep field which is a drop-down list.  Download the macro

 

'********************************************
'* DATABASE CONNECTION TO SQL SERVER

strServerName="E N T E R    N A M E    O F    D A T A B A S E    S E R V E R"
strDatabase="E N T E R    N A M E    O F    D A T A B A S E"
strUserName="E N T E R    U S E R N A M E"
strPassword="E N T E R    P A S S W O R D"

strcnn="Driver={SQL Server};Server=" & strServerName & ";Database=" & strDatabase & ";Uid=" & strUsername & ";Pwd=" & strPassword & ";"

'********************************************

'Variable for caption (label) of the CUDF to validate
UDF_Caption="Customer Service Rep"

' Variable to indicate where the CUDF is located in the module
' empty string = Header area
' tblColLineItem = Grid line item 
' tblEditDelSched = delivery schedule
UDF_Area=""

'Variable to indicate the VISUAL program(module)
'VMORDENT = Customer Order Entry
'VMPURENT = Purchase Order Entry
' etc....
UDF_VEModule="VMORDENT"

'Variable for string value (user input) to validate
UDF_VALUE=udfStrCombo1

set rs = CreateObject("ADODB.Recordset")
set rsCHK = CreateObject("ADODB.Recordset")

SQL="SELECT STRING_VAL  " & _
"FROM USER_DEF_FIELDS UDF " & _
"WHERE UDF.PROGRAM_ID='" & UDF_VEModule & "' AND UDF.LABEL = '" & UDF_Caption & "' AND UDF.DATA_TYPE = 1005 AND ISNULL(UDF.TABLE_ID,'') = '" & UDF_Area & "';"
rs.open SQL, strcnn
if not rs.eof then
 rs.movefirst
 arrList=split(rs("STRING_VAL"),",")
 if ubound(arrList)>0 then

  SELECT CASE arrList(0)
  
   CASE "l=1"
    '*** STATIC LIST
    SQL="SELECT UDF.STRING_VAL FROM USER_DEF_FIELDS UDF LEFT OUTER JOIN USER_DEF_FIELDS AS UDF1 ON UDF.ID = UDF1.ID WHERE (UDF.PROGRAM_ID = 'STATIC_DATA') AND (UDF.STRING_VAL = '" & CUDF_VALUE & "') AND (UDF1.LABEL = '" & UDF_Caption & "') AND  (ISNULL(UDF1.TABLE_ID,'') = '" & UDF_Area & "') AND (UDF1.DATA_TYPE = 1005) AND (UDF1.PROGRAM_ID = '" & UDF_VEModule & "')"

   CASE "l=2"
    '*** DYNAMIC LIST FROM DB
    UDF_DBTable=mid(arrList(1),3,100)
    UDF_DBCol=mid(arrList(2),3,100)
    SQL="SELECT " & UDF_DBCol & " FROM " & UDF_DBTable & " WHERE " & UDF_DBCol & "='" & CUDF_VALUE & "'"

  END SELECT

  rsCHK.open SQL, strcnn
  if rsCHK.eof then
   msgbox "Error: user input does not match available values in list"
  else
   msgbox "We're good"
  end if
  
  rsCHK.close

 end if
end if
rs.close

 

Keeping your macros and configuration (ini) files current across your VISUAL network

VISUAL macros are computer-specific - meaning if you create a macro on one computer it won't be accessible from another computer unless you copy it and place on that computer.  This may not always be true in a Citrix/Terminal Services environment - but let's assume this is not the case. 

The same holds true for the VISUAL configuration files.  I'm talking about those "ini" files that hold your default settings, grid layouts, screen sizes and position, etc.

If you want every VISUAL user to have access to all macros and also want them to have the same VISUAL configurations - you will need to physically copy the files (macros and INIs) to each computer on your network.  Now consider every VISUAL module can have it's own set of macros and configuration file - that's a lot of files to manage across your network!  Now think about keeping those files current of any changes or modifications - giving you a headache yet?

One way to manage this is through the use of a login script.  The script can copy over the default configuration files and all current macro revisions from a central repository down to the user's computer or profile.

Here's an example of what that script might look like - modify it to suit your environment.  In this script, it will copy over the current macro revisions and only the configuration files that do not exist in the user's local directory.    

Download LoginScript


Brent Fanguy is our special guest author at visualnuggets.com and is the IT Director at CORTEC Fluid Control. You'll find Brent contributing and assisting fellow VISUAL users on LinkedIn and Yahoo forums.

Connect with Brent online at LinkedIn 

Macro-level Adjust-In control for Inventory Transaction Entry

VISUAL installations that run in Actual Costing live and die with the control of transactional costs and inventory layers in the system, and under normal conditions this is mostly a no-brainer with a little training and running some semi-automatic periodic processes. 

Sooner or later, you’ll have to manually Adjust In parts because of inventory, material moves, or some other reason.

And then there’s the human element.   Sigh.

infor ERP VISUAL - Inventory Adjustments
"Not a problem"

When you have non-consumable parts that you carry in your own inventory, these should generally be assigned a cost (if they don’t already have one) if you adjust them in through Inventory Transaction Entry, in order to make sure your inventory layers show the correct value.  If you have Customer-Supplied parts (or other materials you technically aren’t carrying inventory cost on), these typically SHOULD NOT have a cost entered in at transaction time.

Sounds easy, right? 

But since Inventory Transaction Entry has no controls to differentiate these parts by default, someone can accidentally enter in values for Customer-Supplied parts and zero value for regular inventoried goods.  If you don’t find these kinds of mistakes early, your part costing, and eventually your estimating / Engineering Masters will not reflect reality, inventory costs can get pretty screwy, and Accounting may show up at Receiving’s door with torches and pitchforks.

What to do?

We ran into this issue early on after migrating to VISUAL from our legacy ERP.  Since we were already coding our Customer-Supplied parts with a prefix of ‘CS’ to make them easy to spot, we came up with an easy way to help prevent the issues altogether with a simple macro:


*******************************
' Inventory Transaction Entry - OnSave Macro
' Prevent saving of a transaction entry with zero cost
' Erik Kjellquist

if (ADJUSTMENT_IN = True) then

    dim text
    dim prefix

    prefix = Left(PART_ID,2)   ' Determine if part has a ‘CS’ prefix

    ' Flag non-CS parts that have a zero cost
    if ((MATERIAL_UNIT_COST + FIXED_COST) = 0) AND (NOT (prefix = "CS")) then

        MACRO_MESSAGE="Total cost for an Adjust In cannot be zero for " & PART_ID & _
        " because it is NOT a customer-supplied part."
        MACRO_SUCCESS=False

    ' Flag CS parts that have a greater than zero cost
    elseif ((MATERIAL_UNIT_COST + FIXED_COST) > 0) AND (prefix = "CS") then

        MACRO_MESSAGE="Total cost for an Adjust In MUST be zero for " & PART_ID & _
        " because it is a customer-supplied part."
        MACRO_SUCCESS=False

    end if

end if
*******************************
 

This macro uses the OnSave function to allow or prevent a user from saving a transaction based on the details.  We’re looking only at Adjust Ins, in this case the ADJUSTMENT_IN variable, and evaluating whether a CS part is being adjusted in with a zero cost or a non-CS part with a non-zero cost, respectively.  If either is false, MACRO_MESSAGE is given an appropriate string, and MACRO_SUCCESS is set to false, which prevents the transaction from saving.

The macro assumes that parts with a ‘CS’ prefix are customer-supplied in our case, but many companies may not be able to label their parts as such.  You could also label parts as Customer-Supplied using User-Defined fields, Commodity codes, store them in a specific warehouse/location, etc in Part Maintenance or another linked table.

However you define CS parts, this will help anyone adjusting in inventory from making mistakes relative to costing, should help relieve a few headaches down the road, and will prevent those square pegs from going into round holes!


Erik Kjellquist is our special guest author at visualnuggets.com and is the IT Manager at Audiosears Corporation. You'll find Erik contributing and assisting fellow VISUAL users on LinkedIn and Yahoo forums.

Connect with him online at LinkedIn 

 

Setting the default expense account for consumables

You and I both know that, out of the box, VISUAL does not allow you to specify a default GL expense account on a consumable part.  And that you have to manually specify the expense GL account every time you purchase it.   AUGH!

Yes, there is a work around where you can set the default GL expense account at the VENDOR level.  This may be okay if you expense all consumables to the one GL account.

Infor VISUAL ERP - Vendor Maintenance
Setting the "Default Expense Account ID" in Vendor Maintenance (under the ACCOUNTING tab)

However, this workaround doesn't work if you buy more than one type of consumable from the same vendor and each type of consumable needs to be expensed differently.  It would be great if VISUAL allowed us to define the GL expense account at the PART level - this wouldn't be an issue.

Here's one way to get around this. 

It involves using a user defined field (UDF) in PART MAINTENANCE and a OnSave macro in the PURCHASE ORDER ENTRY window.  The UDF can be used to enter the expense account and we can have the macro look this up when entering a purchase order for a consumable part. 

  1. In PART MAINTENANCE, designate one of the standard UDFs to be used to enter the expense GL account for a consumable part.  You could also use a custom user defined field and create a drop down list linked to your GL accounts table.

    Infor VISUAL ERP - Part Maintenance

  2. Create an OnSave macro in the PURCHASE ORDER ENTRY window that will look up and use the GL account entered in the UDF (created in step 1) to populate the GL Expense Account ID column of the purchase order.

An OnSave macro like the following would work: (mind the line wraps!)

strServerName="E N T E R    N A M E    O F    D A T A B A S E    S E R V E R"
strDatabase="E N T E R    N A M E    O F    D A T A B A S E"
strUserName="E N T E R    U S E R N A M E"
strPassword="E N T E R    P A S S W O R D"

strcnn="Driver={SQL Server};Server=" & strServerName & ";Database=" & strDatabase & ";Uid=" & strUsername & ";Pwd=" & strPassword & ";"

set rs = CreateObject("ADODB.Recordset")

Set ORDERLINES = Lines.Value
LCnt = ORDERLINES.Count

If LCnt>0 then
    For i = 0 To (LCnt - 1)
        Set ORDERLINE = ORDERLINES(i)

        if len(Orderline("PART_INFO") & "")>0 then

            PartID=Split(Orderline("PART_INFO")," - ")

            SQL="SELECT USER_1, CONSUMABLE FROM PART WHERE ID='" & PartID(0) & "';"
            rs.open sql, strcnn

            ExpAcctID=""

            if not rs.eof then
                rs.movefirst

                if rs("CONSUMABLE")="Y" then
                    ExpAcctID=rs("USER_1")
                end if

            end if

            if len(ExpAcctID & "")>0 then
                Orderline("EXPENSE_GL_ACCT_INFO")=ExpAcctID
            end if

            rs.close

        end if

    Next

end if

This macro assumes that we're using the standard user defined field 1 for the expense GL account.  You may want to beef up this script to include validation checks - ie ensure that the expense GL account id exists, prevent the changing of the GL accounts on PO lines that have already been received, etc.  This should get you going in the right direction.

Now you're able to set your default expense account on each consumable part.

How to run a macro from the manufacturing window toolbar

For some of you techies this may be a well know option in VISUAL, but it has taken me forever to figure this out so I am posting it anyway.

Some of the programs in VISUAL won't allow you to execute a .vms macro from a button in a User toolbar (ie: concurrent scheduler, manufacturing window).  For the manufacturing window, for example, this means you need to open the header card and click on the macro button to run a macro.  Not particularly user-friendly.

However, there are ways to execute a .vbs (vbscript) file instead.  Obviously, this will not enable you to do as much with the data in your screen buffer as a .vms macro file, BUT each VISUAL program does send a number of parameters to the macro you execute from the toolbar and for some cases this may be all the functionality you need.

Here's how you set it up:

  • Create a macro and save it as a .vbs file.
  • Infor VISUAL ERP - Toolbar MaintenanceIn toolbar maintenance, make an entry for the manufacturing window:

    Select the program you want, enter a ToolbarId and position. As a Bitmap, I usually pick one of the standard VISUAL bmp files - that way you are sure it has the correct dimensions. As execute command, use wscript.exe "[path to your macro]\[macro file name.vbs]".  Make sure you tick the Use Key in Cmd Line tick box.
  • You will need to include UserToolbar=Y in the Visual Mfg part of your Visual.ini or Preference Maintenance.
  • This will give you a new icon in the toolbar. Click this icon to execute your macro.
  • In the macro script, you will have to include some logic to retrieve the separate parameters from the arguments that VISUAL provides. See the code below for an example how you can do this.  This example is for the Manufacturing Window - in other VISUAL programs the arguments will be different, for example: a Customer Order Id and the line you selected.

 

Infor ERP VISUAL - Toolbar Maintenance window
Entry in Toolbar Maintenance


Example macro code (save as .vbs)

cntArgs = WScript.Arguments.Count

If cntArgs > 0 Then

        'Display the total string of arguments:
        msgbox WScript.Arguments.Item(0)

        'Split the arguments on the , :
        arrSplitLine = Split(WScript.Arguments.Item(0), ",")
 
        'Retrieve separate parameters:
        DataBase = right(arrSplitLine(0),len(arrSplitLine(0))-1) 'Database = first argument
        UserId = arrSplitLine(1) 'User Id = second argument
        PassWord = arrSplitLine(2) 'Password = third argument
        WoType = arrSplitLine(3) 'Workorder Type = fourth argument
        WoBaseId = arrSplitLine(4) 'Workorder Base Id = fifth argument
        WoLotId = arrSplitLine(5) 'Workorder Split = sixth argument
        WoSplitId = arrSplitLine(6)'Workorder Split Id = seventh argument

Else
        
        msgbox "No arguments"

End If


Anne Jan Breman is our special guest author at visualnuggets.com. Anne Jan is a consultant for Quartess SCS, an Infor Channel Partner based in the Netherlands. 

Connect with Anne Jan online at LinkedIn 

Macros in VISUAL CRM? Well, not exactly...

The use of macros in VISUAL is common practice as it allows you to do many things inside and outside of VISUAL, such as, automate tasks, enforce business rules, interact with external applications, validate data, and much more.

 

Why Not
Why Not?!

But VISUAL Macros are only available from within the VISUAL Enterprise application modules - i.e. Manufacturing.  You will not find the MACRO menu in VISUAL CRM

 

But don't fret...there something else.

It's called ACTION MENUS.  While they may not be exactly macros - you can do quite a bit with a little programming know how.  Action Menus allow you to run executables from VISUAL CRM and pass parameters.  The available parameters are dependent of the area you happen to be in within CRM.

As usual, I always like to show features/functions using examples.   And this post is no different...

A while back in the VISUAL forums, someone asked whether VISUAL CRM had any macro capabilities as they were wanting to push account information from the Contact Center of CRM to the  Estimation Window of VISUAL.  Responses quickly came back stating that MACROs were not available in CRM (a true fact).

But David Sheriff, from Visual Business Solution, offered up his solution of using CRM's Action Menu - which, I'm sure, opened up a whole new world of opportunities for VISUAL users.

So, making it simple, let's say I want to create new quote using VISUAL's Estimation window from the accounts grid in CRM's Contact Center.  I also want CRM to "push" the account ID, NameContact First and Last Name into the new estimating window.

The solution involves the following elements:

  1. An executable file to "push" the CRM data
  2. An Action Menu item in CRM
  3. A VMX file to launch the VISUAL's Estimation window
  4. An OnLoad macro which will execute and read the flat file containing the "pushed" data

 
The Executable File

The executable file is written in vbscript to do the following:

  1. Query the database using the ID parameter passed by the ACTION MENU.  The query will return the information needed to be pushed - Account Name, Contact First and Last Name.
  2. Create a flat file of the data that will, in turn be read by the Estimation Window's OnLoad macro.
  3. Create and execute a VMX file to launch the Estimating Window.

Download the the zipped executable file
Be sure to modify the script to include you database credentials and file directory path


The OnLoad macro

The Onload macro file is fired automatically when the Estimating Window loads from the CRM call.  The macro reads the data from the flat file that was created from the executable file and places the values in the following fields:

  • USER DEFINED 1 --> CRM's Account ID
  • NAME --> CRM's Account Name
  • Contact Information --> CRM's Contact First and Last Name

Download the zipped Onload macro
You will need to create a quote in the Estimation window using Quote ID "CRM_QUOTE".  You only need to do this once in your setup and nothing should be in this quote.  It's simply used as a template to fire up the OnLoad macro.


Infor ERP VISUAL - CRM navigationPutting it all together

  1. Place the OnLoad macro file in the proper VISUAL directory so that the system recognizes it
  2. In the navigation area of CRM, select the "Navbar and Plug-Ins" item from the ADMIN men.
  3. In the Navigation Bar and Plug-In Customization window, click on the ACTION MENU tab to add the new MENU that will launch the executable file.
  4. Be sure to enter the following parameters.  Please note that some information will need to be changed as per your VISUAL environment.  The hit the OK button to complete.

    Menu Text: New Estimate for Account   <-- change text if you like
    Show For: Account
    Command: "C:\visual\VMX\NEW_ESTIMATE.vbs" %USER% %ID% %DB%

    *** The path to the executable file - change as necessary ***

    The %USER% %ID% %DB% are the parameters that we're passing to the executable file.  Be sure to place in exact order as shown


    Infor ERP VISUAL - CRM Navigation Bar and Plug-In Customization

 
Seeing it in action

  1. From the CONTACT CENTER, hightlight one of your prospects or accounts in ACCOUNTS window grid.
  2. Now if you go to the ACTIONS menu, you should now see the menu item you created.  -  In this case "New Estimate for Account".  Go ahead and select it.

    Infor ERP VISUAL - CRM Accounts
  3. You will then see VISUAL launch the ESTIMATING window with information pre-populated with the information "pushed" from CRM.  In this case, the name, contact and the CRM account id.

    Infor ERP VISUAL - Estimating Window

 

This was obviously a simple example (using basic fields) - but I'm sure you can see how powerful this can be.

 

Using workflow to prevent an order from being deleted

VISUAL macros are great.  I use them all the time for automating tasks and validating data.  And with their ability to fire automatically - it makes them an invaluable feature of the application.

However, one thing that macros can't do is prevent an order from being deleted.

That's where the workflow comes in.

With VISUAL workflows you can capture the ACTION against an order, in this case, the DELETE.  With that you can base your workflow on how to proceed.  For instance, you can create a process where only AUTHORIZED personnel can delete an order.

Below is a workflow that checks whether the user is a supervisor before deleting an order.

 

Infor VISUAL ERP Express - Workflow  
 
In the RULE captioned "CO Delete", I capture the ACTION (the delete) using the following:

  Table:  WORKFLOW_STEP 
  Column: ACTION 
  Comparison:  "="    (equal sign) 
  VALUE:  Delete 

Here's a screenshot of the Rule:

Infor VISUAL ERP Express - Workflow Rule Property
Workflow Rule Property window

 
So once you capture this ACTION, you can then proceed and enforce your business process with the rest of your workflow.

Now stop users from "accidentally" deleting orders or at least control who can and who can't delete orders  
 
Infor VISUAL ERP Express - Workflow Return Error

 

WHO IS VISUALNUGGETS?

Rich Ferlatte
Results Driven VISUAL Specialist

CONSULTING SERVICES

Of course, I am available for hire!

ERP Implementations & Upgrades
Analytics & Reporting
Integrations & Macros
General VISUAL Support

ONLINE VISUAL WORKSHOPS

Taking it to the next level and designing a program around "Hands On VISUAL Training".

Check them out - there's sure to be one to interest you!

Operational Workshops
Reporting Workshops
Financial Workshops
Inventory Workshops
Quality Workshops

VISUAL EXTENSIONS

BOM Xploder
Drastically improve your BOM visibility and discover shortages at ANY level of your bill of material no matter how deep.
SmartViews
See, analyze, and track information that helps you better support individual, departmental, and your company’s performance metrics and goals.
eBoard - Financial Power App
Developed for accounting professionals looking for powerful and easy-to-use GL reporting software. Access live financial data, drill down to support details and export financial statements to Excel in one click.
Inventory App
This Inventory Reconciliation App provides a systematic approach to control and manage your Visual inventory effectively and efficiently
Credit Card Integration
Easily accept and process credit card payments right from within VISUAL.
ACH Document Processing
Leveraging VISUAL's payment scheduling and batch payment functions, with the added convenience, performance, and security of Electronic Funds Transfer payment processing.
Latitude Manifest & Shipping System
A seamless multi-carrier shipping solution that integrates to Infor VISUAL ERP. See how it can simplify your small parcel and LTL shipping and package tracking.
Sales Tax Automation with AvaTax
Easily automate sales and use tax in VISUAL with AvaTax. No more manually entering data or uploading rate tables and tax information.
Workforce Management with Kebrite Solutions
Streamlines the collection of Job, Labor, Payroll, Time & Attendance, and a vast array of HR related data-- with live VISUAL integration.