diff --git a/dump_utils.hpp b/dump_utils.hpp
index 6d39bef..c3d9d36 100644
--- a/dump_utils.hpp
+++ b/dump_utils.hpp
@@ -1,5 +1,6 @@
 #pragma once
 #include "dump_manager.hpp"
+#include "dump_types.hpp"
 
 #include <systemd/sd-event.h>
 #include <unistd.h>
@@ -300,5 +301,60 @@
     return (getHostState() == HostState::Quiesced);
 }
 
+/**
+ * @brief Validates dump type and returns corresponding collection type
+ *
+ * This function checks the provided dump type against the specified category.
+ * If the dump type is empty, it defaults to "user". If the dump type does not
+ * exist or does not match with the specified category, it logs an error and
+ * throws an InvalidArgument exception.
+ *
+ * @param[in] type - The dump type to be validated.
+ * @param[in] category - The category to match against the dump type.
+ *
+ * @return The corresponding dump collection type if the dump type and category
+ * match an entry in the dumpTypeTable. If the type is empty or does not match
+ * any entry, it returns "user".
+ *
+ * @throws InvalidArgument - Thrown if the type does not match the specified
+ * category or does not exist in the table.
+ */
+DumpTypes validateDumpType(const std::string& type,
+                           const std::string& category);
+
+/** @brief Extract the dump create parameters
+ *  @param[in] key - The name of the parameter
+ *  @param[in] params - The map of parameters passed as input
+ *
+ *  @return On success, a std::optional containing the value of the parameter
+ * (of type T). On failure (key not found in the map or the value is not of type
+ * T), returns an empty std::optional.
+ */
+template <typename T>
+T extractParameter(const std::string& key,
+                   phosphor::dump::DumpCreateParams& params)
+{
+    using InvalidArgument =
+        sdbusplus::xyz::openbmc_project::Common::Error::InvalidArgument;
+    using Argument = xyz::openbmc_project::Common::InvalidArgument;
+
+    auto it = params.find(key);
+    if (it != params.end())
+    {
+        const auto& [foundKey, variantValue] = *it;
+        if (std::holds_alternative<T>(variantValue))
+        {
+            return std::get<T>(variantValue);
+        }
+        else
+        {
+            lg2::error("An invalid input passed for key: {KEY}", "KEY", key);
+            elog<InvalidArgument>(Argument::ARGUMENT_NAME(key.c_str()),
+                                  Argument::ARGUMENT_VALUE("INVALID INPUT"));
+        }
+    }
+    return T{};
+}
+
 } // namespace dump
 } // namespace phosphor
