Here are the steps to Create Dynamic Sitecore Package

The dynamic package is useful when the items or files to be included are difficult to select manually, such as when you want to include everything created after a specific date.

To create Dynamic Sitecore Package, Login to your Sitecore account then go to

Sitecore > Login > Desktop > Development Tools > Package Designer

sitecore-login-screen

sitecore-package-designer

Create-Dynamic-Sitecore-Package

In Popup click on Items dynamically

Create-Dynamic-Sitecore-Package

Select items dynamically; then you can see a window where you need to select the database and root item from a Sitecore content tree

Create-Dynamic-Sitecore-Package

Once you click ‘Select’, you may apply any of the following filters:

Usage Options:

Choose one of the lookup methods listed below:

Simple Search: Conducts a basic substring search. This method does not support wildcards and is not case-sensitive.
Regular Expression: Supports common regular expressions as well as standard .NET expressions. For detailed information on .NET expressions, refer to the official Microsoft documentation.
Wildcards: Allows common wildcard characters. A question mark (?) represents a single character, while an asterisk (*) represents any sequence of characters. Matches are made exactly as typed and the search is not case-sensitive.

Creation Date Filter:

Recent Days: Filter items by their creation date within a specified number of past days. Note: This option uses a static date range and is not dynamically updated each day. The number of days entered translates into a fixed date range.
Specify Dates: Choose specific dates to filter items by their creation dates.
Recent Days: Filter items by their modification date within a specified number of past days. Note: Like the creation date filter, this setting converts the number of days into a static date range.
Specify Dates: Filter items by choosing specific modification dates.

Publish Date Filter:

Specific Date: Include items that are set to be publishable on a particular date. Only items visible in the web database after a republish on this date are included.
Consider Workflow: Check the “Take workflow into account” box to apply workflow constraints to the publishing filter.
Template Filter: Filter items based on the templates they utilize. Items must be based on at least one of the templates listed to be included.
Created By Filter: Filter items by the users who created them or by the roles of these users. Click “Add” to view and select from a list of users or roles.
Updated By Filter: This filter functions similarly to the “Created by Filter”. It filters items based on the last users who updated them or their roles.
Language Filter: Select the desired languages from the checkboxes to include only items available in those languages.

Create-Dynamic-Sitecore-Package-6

Create-Dynamic-Sitecore-Package-7

Create-Dynamic-Sitecore-Package-8

Create-Dynamic-Sitecore-Package-9

Add the filters you need and click next.

Enter the source name and now you can generate your package.

Then Click on Close.

Then Add Sitecore Package Name and click on Generate Zip.

Add Package Name is Not Added then Click on Next.

It will take some time to generate package. Once it’s done click on Download Icon.

That’s It. 😊

Following these steps, you can create dynamic Sitecore package efficiently, automating content deployment and configurations across different Sitecore environments. This approach enhances consistency and reduces manual effort in managing Sitecore deployments.

Important Note:

When multiple filters are applied simultaneously, they operate with a logical AND combination. To achieve a logical OR effect, you should create two separate packages with the same search root item but different filters. This approach requires conducting two distinct exports—one for newly created items and another for recently modified items. The combined results of these two content packages will produce the logical OR effect desired. Subsequently, both packages must be imported into the target instance. Updated By Filter

Suppose certain items are included in both packages because items newly created within the time frame will also have an updated date from the same period. In that case, a conflict may arise during import. During the import process, you will be prompted to resolve this conflict. In such cases, it is advisable to select the “Merge” option in the dialogue that appears.

For instance, if you aim to export items created or modified within the past three days, you should create two separate packages with the same search root item. One package should include the condition “Created within the past 3 days,” and the other should be “Modified within the past 3 days.” Combining these conditions into a single package would result in a condition that requires items to be both created and modified within the past three days, which is different from the intended outcome.

Additional Resources for Further Information

For more in-depth guidance and insights into creating dynamic Sitecore packages, consider exploring these resources:

The above resources will help to expand your knowledge and optimize your Sitecore development practices.

email subscribe image

Subscribe to our Newsletter and Dive into Exclusive Content!