# Get all campains for an article

**URL:** <https://forum.litium.com/t/get-all-campains-for-an-article/2231>\
**Category:** Questions\
**Created:** [October 1, 2021, 1:57pm UTC](https://forum.litium.com/t/get-all-campains-for-an-article/2231 "2021-10-01T13:57:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![adam.clettborn](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/adam.clettborn/32/956_2.png) [@adam.clettborn](https://forum.litium.com/u/adam.clettborn)\
**Post date:** [October 1, 2021, 1:57pm UTC](https://forum.litium.com/t/get-all-campains-for-an-article/2231/1 "2021-10-01T13:57:16Z")

</div>

Hi,

I’m trying to get all campaigns available for an article, and the most fitting method “[GetAllForArticle](https://docs.litium.com/api-reference/api?product=Litium&version=7.7&xref=Litium.Foundation.Modules.ECommerce.Campaigns.CampaignCollection#Litium_Foundation_Modules_ECommerce_Campaigns_CampaignCollection_GetAllForArticle_System_Guid_)” is obsolete. Is there any good way to do this?

(I don’t care about the conditions of the campaign, I just want to find all campaigns that is connected to an article in any way, either through an assortment, product list, category or the specific article)

Litium version: 7.6.2

---

<div class="post-metadata">

**Author:** ![NilsN](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/nilsn/32/302_2.png) [@NilsN](https://forum.litium.com/u/NilsN)\
**Post date:** [October 4, 2021, 7:44am UTC](https://forum.litium.com/t/get-all-campains-for-an-article/2231/2 "2021-10-04T07:44:33Z")

</div>

Unfortunately, there’s no built-in way to do this. You could create your own memory cache and listen for the related events to update the data in it.

Another approach could be the one discussed in this thread where you’re retrieving the campaigns that are currently active. Sort of starting in the other end of your question. [Get all the campaigns that a user have "unlocked"](https://forum.litium.com/t/get-all-the-campaigns-that-a-user-have-unlocked/1484)

Keep performance in mind if these are frequent calls.

---

<div class="post-metadata">

**Author:** ![adam.clettborn](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/adam.clettborn/32/956_2.png) [@adam.clettborn](https://forum.litium.com/u/adam.clettborn)\
**Post date:** [October 4, 2021, 7:59am UTC](https://forum.litium.com/t/get-all-campains-for-an-article/2231/3 "2021-10-04T07:59:48Z")

</div>

Okay, thanks.

I found that thread and got an idea from it earlier, which I got working.  
Is the “[Campaigns](https://docs.litium.com/api-reference/api?product=Litium&version=7.7&xref=Litium.Foundation.Modules.ECommerce.Plugins.Campaigns)” collection cached in anyway, in ModuleECommerce?

---

<div class="post-metadata">

**Author:** ![NilsN](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/nilsn/32/302_2.png) [@NilsN](https://forum.litium.com/u/NilsN)\
**Post date:** [October 4, 2021, 8:20am UTC](https://forum.litium.com/t/get-all-campains-for-an-article/2231/4 "2021-10-04T08:20:07Z")

</div>

Yes, campaigns are cached to disk.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [November 1, 2021, 8:21am UTC](https://forum.litium.com/t/get-all-campains-for-an-article/2231/5 "2021-11-01T08:21:00Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
