Campaigns not copied

Vote:
 

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?

#195179
Jul 17, 2018 9:47
Vote:
 

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

#195180
Jul 17, 2018 9:58
Vote:
 

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

#195181
Jul 17, 2018 10:01
Vote:
 

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 :)

#195182
Jul 17, 2018 10:06
Vote:
 

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.

#195184
Edited, Jul 17, 2018 10:09
Vote:
 

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!

#195185
Edited, Jul 17, 2018 10:23
Vote:
 

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.

Regards

Per Gunsarfs

#195188
Jul 17, 2018 11:38
Vote:
 

Apparently I was wrong, they were included!

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

#195189
Jul 17, 2018 11:51
Vote:
 

Excellent Per, thanks :-)

Maybe EpiServer could make this part more intuitive.

#195190
Edited, Jul 17, 2018 11:52
Vote:
 

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)

#195191
Jul 17, 2018 12:34
Vote:
 

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

#195192
Jul 17, 2018 12:36
Vote:
 

It's back @Per

#195386
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.