diff --git a/ibm_vpd_app.cpp b/ibm_vpd_app.cpp
index ba03318..ecbe110 100644
--- a/ibm_vpd_app.cpp
+++ b/ibm_vpd_app.cpp
@@ -572,6 +572,31 @@
 }
 
 /**
+ * @brief Fills the Decorator.AssetTag property into the interfaces map
+ *
+ * This function should only be called in cases where we did not find a JSON
+ * symlink. A missing symlink in /var/lib will be considered as a factory reset
+ * and this function will be used to default the AssetTag property.
+ *
+ * @param interfaces A possibly pre-populated map of inetrfaces to properties.
+ * @param vpdMap A VPD map of the system VPD data.
+ */
+static void fillAssetTag(inventory::InterfaceMap& interfaces,
+                         const Parsed& vpdMap)
+{
+    // Read the system serial number and MTM
+    // Default asset tag is Server-MTM-System Serial
+    inventory::Interface assetIntf{
+        "xyz.openbmc_project.Inventory.Decorator.AssetTag"};
+    inventory::PropertyMap assetTagProps;
+    std::string defaultAssetTag =
+        std::string{"Server-"} + getKwVal(vpdMap, "VSYS", "TM") +
+        std::string{"-"} + getKwVal(vpdMap, "VSYS", "SE");
+    assetTagProps.emplace("AssetTag", defaultAssetTag);
+    insertOrMerge(interfaces, assetIntf, std::move(assetTagProps));
+}
+
+/**
  * @brief Set certain one time properties in the inventory
  * Use this function to insert the Functional and Enabled properties into the
  * inventory map. This function first checks if the object in question already
@@ -1194,6 +1219,8 @@
         }
     }
 
+    auto processFactoryReset = false;
+
     if (isSystemVpd)
     {
         string systemJsonName{};
@@ -1206,6 +1233,9 @@
         fs::path target = systemJsonName;
         fs::path link = INVENTORY_JSON_SYM_LINK;
 
+        // If the symlink does not exist, we treat that as a factory reset
+        processFactoryReset = !fs::exists(INVENTORY_JSON_SYM_LINK);
+
         // Create the directory for hosting the symlink
         fs::create_directories(VPD_FILES_PATH);
         // unlink the symlink previously created (if any)
@@ -1338,6 +1368,15 @@
             insertOrMerge(interfaces, invItemIntf, move(presProp));
         }
 
+        if constexpr (is_same<T, Parsed>::value)
+        {
+            // Restore asset tag, if needed
+            if (processFactoryReset && objectPath == "/system")
+            {
+                fillAssetTag(interfaces, vpdMap);
+            }
+        }
+
         objects.emplace(move(object), move(interfaces));
     }
 
