Exporting / importing custom resources exporting-importing-custom-resources
This tutorial explains how to export and import a package of custom resources from a development environment to a production environment.
This example is aimed at functional administrators linked to Adobe Campaign.
The prerequisites are:
-
One or multiple custom resources that are available and published.
In addition, you must have defined a unique key for these resources because the automatic primary keys are not exported in the packages. The resource can therefore have a primary key and an additional unique key to guarantee the uniqueness of the records.
-
The necessary rights to create and export a package.
Additional resources:
Exporting the structure exporting-the-structure
In this section, we are going to carry out a first package export which details the physical structure of the custom resource data.
This example has two custom resources: Products and Orders.
-
Go to the Administration / Deployment / Package exports menu.
We are going to create a new package to export the Custom resource (cusResource) filtered with the two custom resources, “Products” and “Orders”.
-
In the Package exports page, click Create to create a new package.
-
Complete the label then click Create element.
-
Search for and select the Custom resource (cusResource).
-
Configure the details of the Custom resource by selecting the two resources, Products and Orders, in the filtering conditions.
Make sure that you don’t forget to change the logical operator. The value must be set to OR so that the structure of the products resource and the orders resource are integrated into the package.
-
Confirm and save the package definition.
You can now click Start export.
The package generated is available in the Downloads folder. The name of the zip file is randomly generated. You can rename it.
Exporting the data exporting-the-data
This second export will allow us to export the data from the Products and Orders custom resources.
Based on the same type of export as the structure export, you are going to create a second package that contains the data.
-
In the Package exports page, click Create to create a new package.
-
Complete the label with Export data of my resources then click Create element in the Export content tab.
-
Search for and select the Products resource.
-
Configure an advanced filtering condition with @Label IS NOT NULL.
-
Check the count.
-
Repeat the same operation for the Orders custom resource.
-
Confirm and save the package definition.
You can now click Start export.
The package generated is available in the Downloads folder. The name of the zip file is randomly generated. You can rename it.
Importing the structure importing-the-structure
Importing the package importing-the-structure-package
-
Connect to the target instance on which you want to import the newly created packages.
-
Go to the Administration / Deployment / Package imports menu to create a new package to import the file from the first export.
-
Drag and drop the structure file into the zone provided for this purpose. The formats accepted are ZIP or XML.
-
Modify the label, for example Import structure, then click Save.
-
Click Start import.
Publish publish-structure
-
Go to the Administration / Development / Publication menu.
-
Click Prepare publication then Publish to update the instance with the data from the new custom resources.
-
The menu entries corresponding to the package installed are going to be inserted into the Client data menu.
Importing the data importing-the-data
In this section, we are going to import the data linked to the package installed on the instance in the previous step.
In the same way as for the previous step, it is split into two parts: importing the package and publishing.
Importing the package importing-the-data-package
-
Go to the Administration / Deployment / Package imports menu to create a new package to import the file containing the data.
-
Drag and drop the data file into the zone provided for this purpose. The formats accepted are ZIP or XML.
-
Modify the label, for example “Import data”, then click Save.
-
Click Start import.
Publish publish-data
- Go to the Administration / Development / Publication menu.
- Click Prepare publication then Publish to update the instance with the data from the custom resources.