Proposal For Auto Invoice Creation From Item Fulfilments

Proposal summary 

 
This proposal covers the development plan for the automated invoice generation in the client’s NetSuite account for orders placed through Magento.

Requirement 

 
The client wants to have a functionality to automatically generate invoices for item fulfillment records when they are created through Magento. Currently, they follow the manual process and the user has to manually invoice each order. All the items having a shipping date on or before the next day of the order should be invoiced as an external delivery order and other items should be invoiced as an internal delivery order. 

Deliverables 

  1. The auto-invoicing functionality will be triggered on changing the status of an item fulfillment to ‘shipped’. 
  1. The functionality will check if the ‘item fulfillment’ record is related to a sales order placed through Magento. The sales orders created through the Magento platform can be identified by using the sales order custom body field ‘order type’ which is already built into the NetSuite account. 
  1. If the sales order belongs to the ‘Magento Sales Order’ type, then invoices will be created based on the value of the custom line-item field ‘Shipping Date’ next to each item in the sales order record.  
  1. If the shipping date is on or before the next day of the order, then the ‘Delivery Team’ field value in the invoice will be set as ‘External delivery’. Similarly, if the shipping date is after one day from the order, then the ‘Delivery Team’ field value will be set as ‘Internal delivery’. If any items in the fulfillment record do not have a shipping date value, those items will be invoiced as an ‘internal delivery’ type. We will not exclude weekends and Sundays and they will be also counted like a normal day while checking the difference between the order and shipping date. 
  1. If an error happens while invoicing an order, a notification email will be sent to the admin with the order number, item fulfillment number, and error details. 

Assumptions 

  • The auto-invoicing process will be started only after changing the status of the item fulfillment record to ‘Shipped’.  
  • There can be a maximum of two invoices generated from an item fulfillment; one will be an ‘internal delivery’ order and the next one will be an ‘external delivery’ order. 
  • We are only considering inventory items, non-inventory items, and kit items. The invoicing process will not work for Group items, Mark-up items, and service items. 
  • If an item is having a ‘shipping date’ then all the items under it before the next item with a shipping date in the sales order will be invoiced together. But if there is a non-inventory item that is fulfillable, then it will be invoiced only if it is present in the item fulfillment record. We will not invoice the items which are fulfillable but not present in the item fulfillment record. 
  • We assume that there will be only one line-level discount item per item in the sales order. The line-level discount item will be invoiced with the previous item in the sales order list. 
  • The line-level and body-level discount amount is applied to the invoiced items by NetSuite’s native/standard behavior, we won’t be calculating/modifying the discount value in Invoice. 
  • We assume that if promotions (using the Suite Promotions feature) are applied to Magento sales orders, then they will have the discount values applied as line items or a body-level discount value. These discount values will be handled like the normal discount items in the order. 
  • The ‘Shipping date’ field will not be empty for items present in the item fulfillment record. If an item is having empty ‘shipping date’ field value, then it will be invoiced as an internal delivery type item. 
  • The auto-invoicing functionality is designed considering the item fulfillment records are created and updated through UI. Item fulfillment record creation/modification through scripting/bulk update/workflow methods is out of the scope of the development. 

Risks 

  • If an item fulfillment is having many items, it can cause a delay in invoice creation. 
  • If no items in the sales order have value for ‘shipping date’, it will be invoiced as an ‘internal delivery’ type by the functionality. 
  • Editing/Deleting an item fulfillment or sales order after invoicing will not apply the changes to the related invoice. We expect no such modifications in the item fulfillment and sales order record once it is shipped and the invoice is generated. 
  • Item fulfillment records can be created for other transactions like transfer orders, but the current development scope only includes invoicing the item fulfillment records created from sales orders.  
  • At the time of this proposal submission, “Invoice in Advance of Fulfilment” is not enabled in the Yallatoys NetSuite account, and the auto-invoicing functionality could break if invoices are created before item fulfillment by enabling this feature. 
  • In the Yallatoys NetSuite account, the ‘Overage item fulfillment’ feature is disabled by default. If the items are shipped in quantities greater than specified in the sales order using this feature, it can cause issues in the auto-invoicing process. 
  • Invoice cannot be generated for sales orders where payment method (field Id: ‘payment method’) is selected in Sales Order 

Estimate 

Total Estimated Time/Effort: 48 hours 

Leave a comment

Your email address will not be published. Required fields are marked *