Automated Scheduler Programs

SmithCart > Integration

SmithCart comes with built in DNN scheduler programs to automate the integration with your back office systems:

Contents

Order Import Scheduler

The order import scheduler allows you to automate the import of the following tables:
 
  • Customer
  • Orders
  • Order Details
  • Payment History
  • DNN User Profile
 
In addition, to importing to the following tables the order import will create a DNN user account and profile for a customer if one does not exists.
 
The order import function provides the ability to import an unlimited number of records to the customer, order, order detail, and payment history tables.
 

Setup and Configuration

1.  Navigate to the root of your DNN install and open you web.config file and add the following keys:
 
    The following app key setting specifies the portal id and is required:
 
    <add key="SCPortalID" value="0"/>
 
    The following app key setting specifies the import file name and is optional:
 
    <add key="SCOrderImportFile" value="OrderImport.txt"/>
 
    If the “SCOrderImportFile” app key is not defined the program will default to look for an input file named “OrderImport.txt”
 
    The following app key specifies the field delimiter in the input file and is optional:
 
    <add key="SCOrderImportDelimiter" value="comma"/>
 
    Currently, “comma” is the only delimiter supported
 
    The following app key specifies if the first row in your input file contains field headers and is optional:
 
    <add key="SCOrderImportHeader" value="Yes"/>
 
    “Yes” indicates the first row includes field names.  “No” indicates no first row header.
 
2.  Navigate to your Portals/[YourPortalID]/SmithCart/ folder and create a folder titled “OrderImport”.   For example, the folder path should be as follows:
 
    Portals/[YourPortalID]/SmithCart/OrderImport/ 
 
3.  Go into the DNN Host menu > Schedule page and click on the Add Item to Schedule link.
 
4.  In the “Full Class Name and Assembly” field enter the following:
 
    Smith.DNN.Modules.BuyNow.ImportOrderScheduler
 
5.  Check “Schedule Enabled” and enter the desired schedule.
 
6.  Click the “Update” to save.
 
After you are finished the DNN Scheduler setup screen should look like the following:
 
 
 
 

Input File – Field Specification

 

  Click here to download sample CSV

 

Process - How It Works

1.  The Order input file should be dropped off by the source system in the following folder in your DNN install portals folder:
 
    Portals/[YourPortalID]/SmithCart/OrderImport/OrderImport.txt
                       
2.  The SC Order Import program will be kicked off by the DNN scheduler on the interval you configured and will import all the records from the input file.
 
3.  The customers email address is used to determine if an insert or update will be performed on the customer record.  This prevents duplicate customers from being inserted in the database.
 
4.  After all rows in the input file have been processed the SC Order Import program will append a date stamp plus a random number to the end of the input file name to ensure uniqueness of output files in the “Done” folder.  The output file will be in the following format:
     
    OrderImport_102011_343874.txt
 
5.  Finally, after processing is complete, the program will move the input file to the following folder:
 
    portals/[YourPortalID]/SmithCart/OrderImport/Done
 
 

Shipping Import Scheduler

The shipping import scheduler allows you to automate the import of the following shipping data into the Smith_StoreOrders table:
  • OrderID
  • TrackingNumber
  • ShipCarrier        
  • ShipMethod        
  • ShipDate – Defaults to today
  • OrderStatus – Automatically set to “Shipped”
 
The shipping import program allows you to automate the import of tracking numbers from your warehouse shipping/postage system.   SmithCart is pre integrated with the following shipping carriers:
  • USPS
  • Stamps.com
  • Endicia
  • UPS
  • FedEx
  • Shipwire
  • Any other carrier that supports exporting tracking #’s in CSV format
     

Setup and Configuration

1.  Navigate to the root of your DNN install and open you web.config file and add the following keys:
 
    The following app key setting specifies the portal id and is required:
 
    <add key="SCPortalID" value="0"/>
 
    The following app key setting specifies the portal id and is required:
 
    <add key="SCBuyNowTabModuleID" value="408"/>
 
    The following app key setting specifies the import file name and is optional:
 
    <add key="SCShippingImportFile" value="Tracking.txt"/>
 
    If the “SCShippingImportFile” app key is not defined the program will default to look for an input file named “ShippingImport.txt”
 
    The following app key specifies the field delimiter in the input file and is optional:
 
    <add key="SCShippingImportDelimiter" value="comma"/>
 
    Currently, “comma” is the only delimiter supported
 
    The following app key specifies if the first row in your input file contains field headers and is optional:
 
    <add key="SCShippingImportHeader" value="Yes"/>
 
    “Yes” indicates the first row includes field names.  “No” indicates no first row header.
 
    The following app key specifies if the shipping confirmation email will be sent to the customer:
 
    <add key="SCShippingImportSendEmail" value="Yes"/>
 
    “Yes” indicates to send the ship confirmation email.  “No” indicates no ship confirmation email sent to customer.
 
2.  Navigate to your Portals/[YourPortalID]/SmithCart/ folder and create a folder titled “ShippingImport”.   For example, the folder path should be as follows:
 
    Portals/[YourPortalID]/SmithCart/ShippingImport/ 
 
3. Go into the DNN Host menu > Schedule page and click on the Add Item to Schedule link.
 
4. In the “Full Class Name and Assembly” field enter the following:
 
    Smith.DNN.Modules.BuyNow.ImportShippingScheduler
 
5. Check “Schedule Enabled” and enter the desired schedule.  Click the “Update” to save.
 
    After you are finished the DNN Scheduler setup screen should look like the following:
 
 
 

 

Input File – Field Specification

Field Description Data Type
OrderID
OrderID created by SmithCart. 
Integer
TrackingNumber
Ship tracking number created by your shipping/postage system.  For example, tracking numbers are used by the customer to track the status of their package with the shipping carriers (USPS, UPS, FedEx, etc.)
Varchar(50)
ShipCarrier
The shipping carrier used to ship the package (USPS, UPS, FedEx, etc.)
Varchar(50)
ShipMethod
The shipping method used to ship the package.  i.e. Ground, Next Day, Second Day, First Class, etc.
Varchar(50)
 

  Click here to download sample CSV

 

Process - How It Works

1.  The Shipping import file should be dropped off by the source system in the following folder in your DNN portals folder:
 
    Portals/[YourPortalID]/SmithCart/ShippingImport/Tracking.csv
 
2.  The SC Shipping Import program will be kicked off by the DNN scheduler on the interval you configured and will import all the records from the input file.
 
3.  The OrderID in the shipping import file will be used to lookup the SmithCart order and update the order with the shipping data from your import file.  If the OrderID is not found in the Smith_StoreOrders table a message will be logged in the DNN event log and the program will move on to the next record in your import file.
 
    Please Note:   For all the shipping records imported to the  Smith_StoreOrders table the following fields will be automatically set as follows:
  • ShipDate = Todays date
  • OrderStatus = Shipped
4.  After all rows in the input file have been processed the SC Shipping Import program will append a date stamp plus a random number to the end of the input file name to ensure uniqueness of output files in the “Done” folder.  The output file will be in the following format:
 
    Tracking_102014_343874.csv
 
5.  Finally, after processing is complete, the program will move the input file to the following folder:
 
    Portals/[YourPortalID]/SmithCart/ShippingImport/Done
 
 

Variant Import Scheduler

The variant inventory import can be configured to use the built in DNN Scheduler to import product variant inventory.  The DNN Scheduler can be configured to run the import program on any interval desired, from every 5 minutes to every hour or once a day.
 

Setup and Configuration

1.  In the root of your DNN install you will need to add the following “key” to your web.config file:

    <add key="SCPortalID" value="0"/>

2.  Navigate to your Portals/[YourPortalID]/SmithCart/ folder and create a folder titled “VariantImport”.   For example, the folder path should be as follows:
 
    Portals/[YourPortalID]/SmithCart/VariantImport/ 
 
3.  Go into the DNN Host menu > Schedule page and click on the Add Item to Schedule link.
 
4.  In the “Full Class Name and Assembly” field enter the following:
 
    Smith.DNN.Modules.BuyNow.ImportVariantInventoryScheduler
 
5.  Check “Schedule Enabled” and enter the desired schedule.
 
6.  Click the “Update” to save.
 
After you are finished the DNN Scheduler setup screen should look like the following:
 
 
 
 

Input File

 
File Naming Convention:  
The input XLS should be named “stockimport.xls” 
 
XLS Import Spec
The Variant Inventory input file must be in XLS format and requires the following two fields with columns headings as follows:
  • VariantSku
  • VariantQtyOnHand
Other fields can exist in the xls but the two columns listed above are required for the import to process correctly.
 

Process - How It Works

1.  The input file should be dropped off by the source system in the following folder in your DNN install portals folder:
 
    Portals/[YourPortalID]/SmithCart/VariantImport/stockimport.xls
                       
2.  The SC variant inventory import program will be kicked off by the DNN scheduler on the interval you configured and will import the ”VariantQtyOnHand” field from the xls and update the “QuantityOnHand” field in the “Smith_ProductVariantInventory” table for all the rows that exist in the  xls. 
 
3.  The “VariantSku” in the input xls will be mapped to the “Sku” field in the “Smith_ProductVariantInventory” table.
 
4.  When the SC variant inventory import program finds a match on the “productid” in the input xls with a “Sku” in the “Smith_ProductVariantInventory” table the “QuantityOnHand” will be updated with the quantity on hand in the input xls.
 
5.  After all rows in the input xls have been processed the SC variant inventory import program will append a date stamp plus a random number to the end of the xls file name to ensure uniqueness of output files in the “Done” folder.  The output file will be in the following format:
 
    stockimport_102011_343874.xls
 
6.  Finally, after processing is complete, the program will move the xls to the following folder:
 
    portals/[YourPortalID]/SmithCart/VariantImport/Done
 
 

Order Export Scheduler

The Order Export program utilizes the built in DNN Scheduler to schedule the automated export of orders from SmithCart to a CSV file.  This is useful if you need to automate the export of orders from your online store to either a backend ERP system or to a third party fulfillment house.  The DNN Scheduler can be configured to run the SmithCart order export program on any interval desired, from every 5 minutes to every hour or once a day.
 

Setup and Configuration

1.  In the root of your DNN install you will need to add the following “key” to your web.config file:

    <add key="SCPortalID" value="0"/>

2.  Configure the DNN Scheduler setup screen as follows:
 
    In the “Full Class Name and Assembly” field enter the following:
 
    Smith.DNN.Modules.BuyNow.ExportOrdersFlatScheduler
 
 
 

Process - How It Works

The order export program will be kicked off by the DNN scheduler on the interval you configure and will export all Orders with a status of “Open” to the following path:
 
    Portals/[YourPortalID]/SmithCart/OrderExport/
 
The file naming convention is as follows:
 
    "Upload_" + DateTime.Today.ToString("MMddyyyy") + ".csv
 
The file naming convention above ensures uniqueness by appending the current date and time to the file name.
 

Saved Cart/Wishlist Automated Email Reminder

The Saved Cart Automated Email Reminder can be setup to automatically send a notification email to users who have saved items in their saved cart. The automated email can be configured only send a reminder email to users who have saved carts that meet the aging criteria you defined in the BuyNow module settings “Email Reminder Days” field.  To setup the Saved Cart Automated Email Reminder do the following:
 
1. Go into the DNN Host menu > Schedule page and click on the Add Item to Schedule link.
 
2. In the “Full Class Name and Assembly” field enter the following:
 
Smith.DNN.Modules.BuyNow.SavedCartEmailScheduler
 
3. Check “Schedule Enabled” and enter the desired schedule in the “Time Lapse” field to schedule the email reminders to be sent out. Click Update to save.
 
After you are finished the DNN Scheduler setup screen should look like the following:
 
 
 
 
 
4. The following is the email template that can be customized for the Saved Cart Email Reminder:
 
/Desktopmodules/Smith.BuyNow/Templates/Email/SCEmailReminder.htm
 
 

Saved Cart/Wishlist Purge and Email

 
SmithCart comes with the ability to configure the number of days to purge users saved carts and send the user an email notification that their saved cart was purged.  To enable the automated saved cart purge and email notifications, please do the following:
 
1.  In the BuyNow settings Saved Cart/Wishlist section enter the number of days you would like to purge Saved Carts.  Enter 0 if you do not want to purge user’s saved carts.
 
2. Go into the DNN Host menu > Schedule page and click on the Add Item to Schedule link.
 
3.  In the “Full Class Name and Assembly” field enter the following:
 
    Smith.DNN.Modules.BuyNow.SavedCartPurgeScheduler
 
4. Check “Schedule Enabled” and enter the desired schedule in the “Time Lapse” field. Click Update to save.
 
    After you are finished the schedule screen should look like the following:
 
 
 
 
 
5. The following is the email template that can be customized for the Saved Cart Purge email notification:
 
    /Desktopmodules/Smith.BuyNow/Templates/Email/EmailSaveCartDelete.htm