diff --git a/common/utils.cpp b/common/utils.cpp
index 80e1401..06ae48b 100644
--- a/common/utils.cpp
+++ b/common/utils.cpp
@@ -868,5 +868,47 @@
     return sensorIDs;
 }
 
+EffecterPDRs getStateEffecterPDRsByType(uint16_t entityType,
+                                        const pldm_pdr* repo)
+{
+    uint8_t* outData = nullptr;
+    uint32_t size{};
+    const pldm_pdr_record* record = nullptr;
+    EffecterPDRs pdrs;
+    if (repo)
+    {
+        while ((record = pldm_pdr_find_record_by_type(
+                    repo, PLDM_STATE_EFFECTER_PDR, record, &outData, &size)))
+        {
+            auto pdr = new (outData) pldm_state_effecter_pdr;
+            if (pdr && pdr->entity_type == entityType)
+            {
+                pdrs.emplace_back(outData, outData + size);
+            }
+        }
+    }
+    return pdrs;
+}
+
+std::vector<pldm::pdr::EffecterID> findEffecterIds(
+    const pldm_pdr* pdrRepo, uint16_t entityType, uint16_t entityInstance,
+    uint16_t containerId)
+{
+    std::vector<uint16_t> effecterIDs;
+    auto pdrs = getStateEffecterPDRsByType(entityType, pdrRepo);
+    for (const auto& pdr : pdrs)
+    {
+        auto effecterPdr =
+            reinterpret_cast<const pldm_state_effecter_pdr*>(pdr.data());
+        if (effecterPdr && effecterPdr->entity_type == entityType &&
+            effecterPdr->entity_instance == entityInstance &&
+            effecterPdr->container_id == containerId)
+        {
+            effecterIDs.emplace_back(effecterPdr->effecter_id);
+        }
+    }
+    return effecterIDs;
+}
+
 } // namespace utils
 } // namespace pldm
