diff --git a/Makefile.am b/Makefile.am
index 7d65c7a..261cd6b 100755
--- a/Makefile.am
+++ b/Makefile.am
@@ -37,6 +37,7 @@
 
 phosphor_image_updater_SOURCES = \
 	activation.cpp \
+	version.cpp \
 	item_updater.cpp \
 	item_updater_main.cpp
 
diff --git a/item_updater.cpp b/item_updater.cpp
index bc382e8..9e909d9 100644
--- a/item_updater.cpp
+++ b/item_updater.cpp
@@ -5,6 +5,7 @@
 #include "item_updater.hpp"
 #include "xyz/openbmc_project/Software/Version/server.hpp"
 #include <experimental/filesystem>
+#include "version.hpp"
 
 namespace phosphor
 {
@@ -24,6 +25,8 @@
 void ItemUpdater::createActivation(sdbusplus::message::message& msg)
 {
     sdbusplus::message::object_path objPath;
+    auto purpose = server::Version::VersionPurpose::Unknown;
+    std::string version;
     std::map<std::string,
              std::map<std::string,
                       sdbusplus::message::variant<std::string>>> interfaces;
@@ -32,28 +35,31 @@
 
     for (const auto& intf : interfaces)
     {
-        if (intf.first.compare(VERSION_IFACE))
+        if (intf.first == VERSION_IFACE)
         {
-            continue;
-        }
-
-        for (const auto& property : intf.second)
-        {
-            if (!property.first.compare("Purpose"))
+            for (const auto& property : intf.second)
             {
-                // Only process the BMC images
-                auto value = sdbusplus::message::variant_ns::get<std::string>(
-                        property.second);
-                if (value !=
-                    convertForMessage(server::Version::VersionPurpose::BMC) &&
-                    value !=
-                    convertForMessage(server::Version::VersionPurpose::System))
+                if (property.first == "Purpose")
                 {
-                    return;
+                    std::string str = sdbusplus::message::variant_ns::
+                        get<std::string>(property.second);
+                    purpose = server::Version::
+                        convertVersionPurposeFromString(str);
+                }
+                else if (property.first == "Version")
+                {
+                    version = sdbusplus::message::variant_ns::
+                        get<std::string>(property.second);
                 }
             }
         }
     }
+    if (version.empty() ||
+        (purpose != server::Version::VersionPurpose::BMC &&
+        purpose != server::Version::VersionPurpose::System))
+    {
+        return;
+    }
 
     // Version id is the last item in the path
     auto pos = path.rfind("/");
@@ -81,12 +87,21 @@
             activationState = server::Activation::Activations::Active;
         }
         activations.insert(std::make_pair(
+                               versionId,
+                               std::make_unique<Activation>(
+                                        bus,
+                                        path,
                                         versionId,
-                                        std::make_unique<Activation>(
-                                            bus,
-                                            path,
-                                            versionId,
-                                            activationState)));
+                                        activationState)));
+        versions.insert(std::make_pair(
+                            versionId,
+                            std::make_unique<phosphor::software::
+                                manager::Version>(
+                                bus,
+                                path,
+                                version,
+                                purpose,
+                                "")));
     }
     return;
 }
diff --git a/item_updater.hpp b/item_updater.hpp
index 14737fb..705b320 100644
--- a/item_updater.hpp
+++ b/item_updater.hpp
@@ -2,6 +2,7 @@
 
 #include <sdbusplus/server.hpp>
 #include "activation.hpp"
+#include "version.hpp"
 
 namespace phosphor
 {
@@ -79,6 +80,11 @@
           * version id */
         std::map<std::string, std::unique_ptr<Activation>> activations;
 
+        /** @brief Persistent map of Version dbus objects and their
+          * version id */
+        std::map<std::string, std::unique_ptr<phosphor::software::
+            manager::Version>> versions;
+
         /** @brief sdbusplus signal match for Software.Version */
         sdbusplus::bus::match_t versionMatch;
 
