diff --git a/writefru.mako.hpp b/writefru.mako.hpp
new file mode 100755
index 0000000..f7a2aa8
--- /dev/null
+++ b/writefru.mako.hpp
@@ -0,0 +1,91 @@
+## This file is a template.  The comment below is emitted
+## into the rendered file; feel free to edit this file.
+// WARNING: Generated header. Do not edit!
+
+
+#pragma once
+
+#include <map>
+#include <iostream>
+#include "defines.hpp"
+#include "store.hpp"
+
+namespace openpower
+{
+namespace vpd
+{
+namespace inventory
+{
+
+using Inner = Parsed::mapped_type;
+using Outer = std::map<std::string, Inner>;
+
+// TODO: Remove once the call to inventory manager is added
+auto print = [](Outer&& object, const std::string& path)
+{
+    std::cout << "\n";
+    std::cout << path << "\n";
+    std::cout << "\n";
+    for(const auto& o : object)
+    {
+        std::cout << o.first << "\n";
+        for(const auto& i : o.second)
+        {
+            std::cout << i.first << " : " << i.second << "\n";
+        }
+        std::cout << "\n";
+    }
+};
+
+/** @brief API to write parsed VPD to inventory,
+ *      for a specifc FRU
+ *
+ *  @param [in] vpdStore - Store object containing
+ *      parsed VPD
+ *  @param [in] path - FRU object path
+ */
+template<Fru F>
+void writeFru(const Store& vpdStore, const std::string& path);
+
+% for key in fruDict.iterkeys():
+<%
+    fru = fruDict[key]
+%>\
+// Specialization of ${key}
+template<>
+void writeFru<Fru::${key}>(const Store& vpdStore,
+                           const std::string& path)
+{
+    Outer object;
+
+    // Inventory manager needs object path, list of interface names to be
+    // implemented, and property:value pairs contained in said interfaces
+
+    % for interfaces, properties in fru.iteritems():
+<%
+        interface = interfaces.split(".")
+        intfName = interface[0] + interface[-1]
+%>\
+    Inner ${intfName};
+        % for name, value in properties.iteritems():
+            % if fru and interfaces and name and value:
+<%
+                record, keyword = value.split(",")
+%>\
+    ${intfName}["${name}"] =
+        vpdStore.get<Record::${record}, record::Keyword::${keyword}>();
+            % endif
+        % endfor
+    object.emplace("${interfaces}",
+                   std::move(${intfName}));
+    % endfor
+
+    // TODO: Need integration with inventory manager, print serialized dbus
+    // object for now.
+    print(std::move(object), path);
+}
+
+% endfor
+} // namespace inventory
+} // namespace vpd
+} // namespace openpower
