public async Task CreateRMShreddingPlan(List <ShreddingPlanItemModel> items)
        {
            var rmSite = await _alfrescoHttpClient.GetRMSite(
                ImmutableList <Parameter> .Empty
                .Add(new Parameter(AlfrescoNames.Headers.MaxItems, "100", ParameterType.QueryString)));

            if (rmSite?.Entry?.Guid == null)
            {
                Log.Error("RM site doesn't exist");
                return;
            }

            var documentLibrary = await _alfrescoHttpClient.GetNodeInfo(rmSite.Entry.Guid, ImmutableList <Parameter> .Empty
                                                                        .Add(new Parameter(AlfrescoNames.Headers.RelativePath, "documentLibrary/ShreddingPlan", ParameterType.QueryString)));

            var documentLibraryId = documentLibrary?.Entry?.Id;

            if (documentLibraryId == null)
            {
                Log.Error("RM documentlibrary doesn't exist");
                return;
            }

            // update permissions
            await SetPermissionInheritence(documentLibrary.Entry.Id);

            foreach (var item in items)
            {
                if (item.FileMark == null || item.Period == null)
                {
                    continue;
                }

                var fileMarkId = await CreateShreddingPlan(documentLibraryId, item.FileMark, new RMNodeBodyCreateWithRelativePath
                {
                    Name       = item.FileMark,
                    NodeType   = "rma:recordCategory",
                    Properties = new Dictionary <string, string>
                    {
                        { AlfrescoNames.ContentModel.Title, item.FileMark }
                    }
                });

                if (fileMarkId == null)
                {
                    continue;
                }

                await CreateRetentionSchedule(fileMarkId, (uint)item.Period);

                var nodeId = await CreateShreddingPlan(fileMarkId, "Contents", new RMNodeBodyCreateWithRelativePath
                {
                    Name       = "Contents",
                    NodeType   = "rma:recordFolder",
                    Properties = new Dictionary <string, string>
                    {
                        { AlfrescoNames.ContentModel.Title, "Contains Documents, files" }
                    }
                });

                await CheckCreatePermissions(nodeId, new List <Permission>
                {
                    new Permission
                    {
                        Id   = SpisumNames.Groups.SpisumAdmin,
                        Role = "Filing"
                    },
                    new Permission
                    {
                        Id   = SpisumNames.Groups.RepositoryGroup,
                        Role = "Filing"
                    }
                });
            }
        }