How to Use an Infoplus Script to Streamline Transfer Orders

An Infoplus script can help create an order in a warehouse and transfer the order to a different warehouse to be fulfilled.

Infoplus offers an out-of-the-box warehouse transfer feature that enables our users to create orders in one warehouse and seamlessly receive them into a different destination warehouse. 


When you utilize the transfer feature, the ASN for the new warehouse location will end in '-T' (to signify Transfer). The ASN will have a PO with the Order Number and then end in the '-T', creating something like this: 1.000-T. 


In order for the Transfer ASN to be created, users must first Execute the Transfer from the action menu dropdown of the order in question. With the use of Infoplus Scripts, it becomes possible for our users to streamline this process. 


The script below will take an order and turn it into an ASN automatically. With the correct inputs, Infoplus can detect these orders and automatically create your Transfer ASN. 


This also offers a lot more flexibility within the ASN as the script will allow you to populate any values across any of the ASN fields. For example, if you don't like the standard 1.000-T nomenclature you can update it to something like "1.000-Transfer" or whatever makes sense for you. Custom fields can be populated as well. 

How to Implement a Transfer Order Script: 

In Infoplus, go to the Script table via one of two ways: 

  • Dashboard: Apps>Tools>Scripts>Tables>Scripts
  • Quick Actions Shortcut: Press a dot (period) on your keyboard, then select 'Script' from the list of Quick Actions.
  1. Once you are on the Scripts Table, click the Create New button in the top right corner. 

  2. Fill out the required fields 

    • Name: Enter a descriptive name to identify this script by 
    • Script Type: select 'Manifest' from the dropdown menu
    • API Version:  Beta

     
  3. Enter the JavaScript Code for the script noted below.


Please Note: Be careful to read through the script comments so that you have it coded properly for your specific use case(s). To test, you can manually run the script on existing orders by selecting 'Run Script' or 'Bulk Run Script' via the actions menu on the item table.

Example Code: 

 

2. Navigate to the Orders Table and Setup and Save a Smart Filter with the following filters:

  • Transfer Orders
  • Pending Status

    Pro Tip: The warehouse service type will have a value of 'Transfer' and the status field will have a value of 'Pending' that can be selected. All orders will be in a pending status for the first few seconds of their lifecycle in Infoplus. It is in this stage where Infoplus is analyzing the order and running any triggers that may apply to it.

3. Save the Smart Filter and name is something related to the Transfer Orders action


4. Now you will need to create a trigger to activate the smart filter and script. Navigate to the Manage Trigger Table via one of two ways

  • 1 - Use the period key and begin typing 'Order', then click on Order from the drop-down
  • 2 - Navigate to the Apps>Account>Building Blocks>Manage Triggers from the Infoplus dashboard




5. Once you are on the Manage Triggers table, select 'Create New' in the top right and fill in the required fields:

  • Name: Transfer Orders (or any identifying description you would like to use)
  • Description: any additional identifying information
  • Smart Filter: Select the Transfer Orders Smart Filter (that you just created) from the drop-down
  • Make sure 'Insert' is checked
  • Set Active to 'Yes'
  • Then click 'OK'


6.  Once the trigger is created, you will need to add an action to run the script. 

  • Stay on the Manage Triggers Page
  • Find the Trigger in the Table and Navigate to the 'Actions' column
  • Click on the Number in the Actions column associated with your Trigger
  • Click on 'Create New'
  • From the dropdown menu for 'Action Type', select 'Run Script'
  • Then, select the Transfer Script you created in Step 1
  • Click Save 


7. Create a new transfer order to test the trigger/script. Within a few seconds of the order being in an 'on order' status, you should have visibility of the ASN. If you do not see it, check your script logs for any errors.