Try our conversational search powered by Generative AI!

Campaigns not copied


I use Commerce version 11 with the new Marketing UI, where I set up one campaign. After I copied our Commerce database to a test environment I noticed that the campaign list is now empty. 

Where are these campaigns stored?

Jul 17, 2018 9:47

That would make sense if you only copied the Commerce database, because Campaigns and Promotions are actually CMS Content and are stored as such :)

Jul 17, 2018 9:58

I see :-) Is it possible to export these campaigns then?

Jul 17, 2018 10:01

As far as I know, the export data admin tool doesn't include Marketing content. I've never had the use case to export campaigns from 1 epi to another so I haven't explored the possibilities. But you can of course do it programmatically, albeit that might not be worth the effort unless you plan to do this automated and regularly :)

Jul 17, 2018 10:06

Okay, thanks for clearing that out :-)

By the way, I wonder why EpiServer decided to store campaigns and promotions in the CMS database. The Commerce database should be the right place to store this.

Edited, Jul 17, 2018 10:09

Depends on how you look at it :) Ultimately, CMS is the "core", Commerce is an addon to the CMS core site. You cannot have a Epi Commerce site without Epi CMS. So in that sense, seeing as they modeled the new promotions as content, it would fit to store it just like other content, to get the same benefits and re-use a well tested storage.

Edit: And to add to this, they created this content from scratch. Commerce content wasn't created from scratch, it was and still is a part of the metadata system. The content approach is really more of an abstraction in that case.

Another thing that usually comes up in these discussions is that you shouldn't need to know how and where it is stored in the database, as you shouldn't be querying the database directly, you should use the APIs for this. Which has some logic, I suspect epi can change the way something is stored without releasing a breaking change. But IMO this is quite far away from reality that you shouldn't care where it lies. If you want a performant epi commerce site, you need to know the entire picture...

But ultimately I don't know the reasons, I can just speculate :D I do agree that it can be confusing, however!

Edited, Jul 17, 2018 10:23

Joels reasoning about why the campaigns and promotions are stored where they are is pretty much bang on. I just wanted to add to the question about how to export campagins. You can do that through the CMS admin view, the same way you would do with pages. 

Admin -> Tools -> Export Data. There, select "Export content items" and chose the "Campaigns" node. That should generate an episerverdata file containing all campaigns and promotions.


Per Gunsarfs

Jul 17, 2018 11:38

Apparently I was wrong, they were included!

Also, where's your [e]-badge Per?

Jul 17, 2018 11:51

Excellent Per, thanks :-)

Maybe EpiServer could make this part more intuitive.

Edited, Jul 17, 2018 11:52

In addition to Per's answer, note that you need both, campaigns need information regarding markets, while promotions need information regarding catalog items, so you need campaign/promotion data and catalog import (which includes the markets data)

Jul 17, 2018 12:34

Good question Joel, I wonder where my badge has gone.

Jul 17, 2018 12:36

It's back @Per

Edited, Jul 23, 2018 6:12
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.