Indice.Features.Messages.Core 8.14.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package Indice.Features.Messages.Core --version 8.14.2
                    
NuGet\Install-Package Indice.Features.Messages.Core -Version 8.14.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Indice.Features.Messages.Core" Version="8.14.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Indice.Features.Messages.Core" Version="8.14.2" />
                    
Directory.Packages.props
<PackageReference Include="Indice.Features.Messages.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Indice.Features.Messages.Core --version 8.14.2
                    
#r "nuget: Indice.Features.Messages.Core, 8.14.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Indice.Features.Messages.Core@8.14.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Indice.Features.Messages.Core&version=8.14.2
                    
Install as a Cake Addin
#tool nuget:?package=Indice.Features.Messages.Core&version=8.14.2
                    
Install as a Cake Tool

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[8.1.10] - 2025-08-05

Added support alias in Distribution list

ALTER TABLE [msg].[DistributionList] 
    ADD [Alias]     NVARCHAR (64)      NULL
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_DistributionList_Alias]
    ON [msg].[DistributionList]([Alias] ASC) WHERE ([Alias] IS NOT NULL);
GO

Added support to persist communication preferences for users.

Add Message type in template table for linking templates to message types and eventually preferences.

ALTER TABLE [#schema#].[Template]
	ADD [MessageTypeId]  UNIQUEIDENTIFIER  
ALTER TABLE [#schema#].[Template] WITH NOCHECK
    ADD CONSTRAINT [FK_Template_MessageType_MessageTypeId] FOREIGN KEY ([MessageTypeId]) REFERENCES [msg].[MessageType] ([Id]);
ALTER TABLE [#schema#].[Template] WITH CHECK CHECK CONSTRAINT [FK_Template_MessageType_MessageTypeId];

The following migration script is needed to add the ContactPreference and ContactCommunicationOption tables.

CREATE TABLE [#schema#].[ContactPreference] (
    [Id]                    UNIQUEIDENTIFIER   NOT NULL,
    [RecipientId]           NVARCHAR (64)      NOT NULL,
    [Locale]                NVARCHAR (16)      NULL,
    [ConsentCommercial]     BIT                NOT NULL,
    [ConsentCommercialDate] DATETIMEOFFSET (7) NULL,
    [DefaultChannels]       TINYINT            NULL,
    [UpdatedAt]             DATETIMEOFFSET (7) NULL,
    CONSTRAINT [PK_ContactPreference] PRIMARY KEY CLUSTERED ([Id] ASC)
);
GO

CREATE UNIQUE NONCLUSTERED INDEX [IX_ContactPreference_RecipientId]
    ON [#schema#].[ContactPreference]([RecipientId] ASC);
GO

CREATE TABLE [#schema#].[ContactCommunicationOption] (
    [ContactPreferenceId] UNIQUEIDENTIFIER   NOT NULL,
    [MessageTypeId]       UNIQUEIDENTIFIER   NOT NULL,
    [Channels]            TINYINT            DEFAULT (CONVERT([tinyint],(0))) NOT NULL,
    [UpdatedAt]           DATETIMEOFFSET (7) NULL,
    CONSTRAINT [PK_ContactCommunicationOption] PRIMARY KEY CLUSTERED ([ContactPreferenceId] ASC, [MessageTypeId] ASC),
    CONSTRAINT [FK_ContactCommunicationOption_ContactPreference_ContactPreferenceId] FOREIGN KEY ([ContactPreferenceId]) REFERENCES [#schema#].[ContactPreference] ([Id]) ON DELETE CASCADE,
    CONSTRAINT [FK_ContactCommunicationOption_MessageType_MessageTypeId] FOREIGN KEY ([MessageTypeId]) REFERENCES [#schema#].[MessageType] ([Id]) ON DELETE CASCADE
);
GO

CREATE NONCLUSTERED INDEX [IX_ContactCommunicationOption_MessageTypeId]
    ON [#schema#].[ContactCommunicationOption]([MessageTypeId] ASC);
GO

In case that you have used communication preferences in your project, you need to run the following migration script to populate the CommunicationPreference and CommunicationPreferenceMessageType tables.


CREATE TABLE #TempContactPreference
(
    [RecipientId] nvarchar(64) NOT NULL,
    [Locale] nvarchar(16) NULL,
    [ConsentCommercial] bit NOT NULL DEFAULT(0),
    [DefaultChannels] TINYINT NULL
);

INSERT INTO #TempContactPreference
    ([RecipientId]
    ,[Locale]
    ,[ConsentCommercial]
    ,[DefaultChannels])
SELECT RecipientId, Locale, ConsentCommercial,CommunicationPreferences
FROM (
    SELECT RecipientId, Locale, ConsentCommercial,CommunicationPreferences,
        row_number() over (partition by RecipientId order by [UpdatedAt] desc) as rn
    FROM [msg].[Contact]
    WHERE NULLIF(RecipientId,'') IS NOT NULL
) t
WHERE rn = 1 


INSERT INTO [msg].[ContactPreference]
    ([Id]
    ,[RecipientId]
    ,[Locale]
    ,[ConsentCommercial])
SELECT NEWID(),  RecipientId, Locale, ConsentCommercial
FROM  #TempContactPreference AS CT
WHERE NOT EXISTS (SELECT TOP 1 1 FROM  [msg].[ContactPreference] WHERE RecipientId = ct.RecipientId)


DROP TABLE #TempContactPreference    

The last step is to drop the prefernece columns from the Contact table.

ALTER TABLE [#schema#].[Contact] DROP COLUMN [CommunicationPreferences], COLUMN [ConsentCommercial], COLUMN [Locale];

[8.1.0] - 2025-06-15

For performance reasons, the following indexes were added to the media schema in cases db.


CREATE NONCLUSTERED INDEX [IX_MediaFile_FolderId]
    ON [media].[MediaFile]([FolderId] ASC);
GO

CREATE NONCLUSTERED INDEX [IX_MediaFile_Name]
    ON [media].[MediaFile]([Name] ASC);
GO

CREATE UNIQUE NONCLUSTERED INDEX [IX_MediaFile_Path]
    ON [media].[MediaFile]([Path] ASC);
GO

CREATE NONCLUSTERED INDEX [IX_MediaFolder_Name]
    ON [media].[MediaFolder]([Name] ASC);
GO

CREATE NONCLUSTERED INDEX [IX_MediaFolder_ParentId]
    ON [media].[MediaFolder]([ParentId] ASC);
GO

CREATE UNIQUE NONCLUSTERED INDEX [IX_MediaFolder_Path]
    ON [media].[MediaFolder]([Path] ASC);
GO

For performance reasons, the following indexes were added to the messaging schema in cases db.


CREATE NONCLUSTERED INDEX [IX_Campaign_AttachmentId]
    ON [#Schema#].[Campaign]([AttachmentId] ASC);
GO

CREATE NONCLUSTERED INDEX [IX_Campaign_DistributionListId]
    ON [#Schema#].[Campaign]([DistributionListId] ASC);
GO

CREATE NONCLUSTERED INDEX [IX_Campaign_TypeId]
    ON [#Schema#].[Campaign]([TypeId] ASC);
GO


CREATE UNIQUE NONCLUSTERED INDEX [IX_Contact_RecipientId]
    ON [#Schema#].[Contact]([RecipientId] ASC) WHERE ([RecipientId] IS NOT NULL);
GO


CREATE UNIQUE NONCLUSTERED INDEX [IX_Contact_RecipientId]
    ON [#Schema#].[Contact]([RecipientId] ASC) WHERE ([RecipientId] IS NOT NULL);
GO

CREATE UNIQUE NONCLUSTERED INDEX [IX_DistributionList_Name]
    ON [#Schema#].[DistributionList]([Name] ASC);
GO

CREATE NONCLUSTERED INDEX [IX_DistributionListContact_DistributionListId]
    ON [#Schema#].[DistributionListContact]([DistributionListId] ASC);
GO


CREATE NONCLUSTERED INDEX [IX_Hit_CampaignId]
    ON [#Schema#].[Hit]([CampaignId] ASC);
GO

CREATE NONCLUSTERED INDEX [IX_Message_CampaignId]
    ON [#Schema#].[Message]([CampaignId] ASC);
GO

CREATE NONCLUSTERED INDEX [IX_Message_RecipientId]
    ON [#Schema#].[Message]([RecipientId] ASC);
GO

CREATE NONCLUSTERED INDEX [IX_MessageSender_Sender]
    ON [#Schema#].[MessageSender]([Sender] ASC);
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_MessageType_Alias]
    ON [#Schema#].[MessageType]([Alias] ASC) WHERE ([Alias] IS NOT NULL);
GO

CREATE UNIQUE NONCLUSTERED INDEX [IX_MessageType_Name]
    ON [#Schema#].[MessageType]([Name] ASC);
GO


CREATE UNIQUE NONCLUSTERED INDEX [IX_Template_Alias]
    ON [#Schema#].[Template]([Alias] ASC) WHERE ([Alias] IS NOT NULL);
GO

CREATE UNIQUE NONCLUSTERED INDEX [IX_Template_Name]
    ON [#Schema#].[Template]([Name] ASC);
GO


[8.0.0-rc32] - 2025-05-25

  • Added support for logging message events.
CREATE TABLE [#Schema#].[MessageEvent](
	[Id] [uniqueidentifier] NOT NULL,
	[CampaignId] [uniqueidentifier] NOT NULL,
	[ContactId] [uniqueidentifier] NOT NULL,
	[MessageId] [uniqueidentifier] NULL,
	[Type] [nvarchar](64) NOT NULL,
	[Channel] [nvarchar](64) NOT NULL,
	[CreatedOn] [datetimeoffset](7) NOT NULL,
 CONSTRAINT [PK_MessageEvent] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO

[8.0.0] - 2024-12-03

  • Added support for persisting User communication channel preferences, locale and Consent.
  • Campaign and Template define whether user communication preferences must be ingored if needed.
  • Send messages respects user communication preferences unless campaign specifies otherwise
ALTER TABLE [#Schema#].[Campaign]
ADD IgnoreUserPreferences BIT DEFAULT(0) NOT NULL;
GO
ALTER TABLE [#Schema#].[Contact]
ADD 
	CommunicationPreferences TINYINT DEFAULT(0) NOT NULL,
	ConsentCommercial		 BIT DEFAULT(0) NOT NULL,
	Locale					 VARCHAR(16);
GO
ALTER TABLE [#Schema#].[DistributionListContact]
ADD Unsubscribed BIT DEFAULT(0) NOT NULL;	
GO
ALTER TABLE [#Schema#].[Template]
ADD IgnoreUserPreferences BIT DEFAULT(0) NOT NULL;
GO
ALTER TABLE [#Schema#].[MessageType]
ADD Classification TINYINT DEFAULT(0) NOT NULL;		
GO

[7.27.0] - 2024-07-26

Added

  • Added support for persisting sample data for facilitating template rendering on message templates.
ALTER TABLE [cmp].[Template]
ADD [Data] [nvarchar](max) NULL
GO

[7.23.0] - 2024-05-16

Added

  • New column MediaBaseHref in DbCampaign
ALTER TABLE [cmp].[Campaign]
ADD [MediaBaseHref] [nvarchar](1024) NULL

[7.4.4] - 2023-10-04

Added

  • ContactRetainPeriodInDays option to keep in sync a contact with the identity system. After the configured period of time the system patches and updates the contact with the latest values.

[7.4.1] - 2023-09-22

Changed

  • CampaignId is returned in PushNotification data in property "messageId". Intentioanally added for naming consistency. external MessageId == internal CampaignId.

[7.3.8] - 2023-08-07

Added

  • Message Id is included in PushNotification data
  • Inbox service enhanced to return other channels also

[7.3.7] - 2023-08-02

Added

  • New entity DbMessageSender

Migration

CREATE TABLE [dbo].[MessageSender](
	[Id] [uniqueidentifier] NOT NULL,
	[Sender] [nvarchar](max) NULL,
	[DisplayName] [nvarchar](max) NULL,
	[Kind] [tinyint] NOT NULL,
	[IsDefault] [bit] NOT NULL,
	[CreatedBy] [nvarchar](max) NULL,
	[CreatedAt] [datetimeoffset](7) NOT NULL,
	[UpdatedBy] [nvarchar](max) NULL,
	[UpdatedAt] [datetimeoffset](7) NULL,
 CONSTRAINT [PK_MessageSender] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on Indice.Features.Messages.Core:

Package Downloads
Indice.Features.Messages.AspNetCore

Package Description

Indice.Features.Messages.Worker.Azure

Package Description

Indice.Features.Messages.Worker

Package Description

Indice.Hive.Core

Package Description

Indice.Hive.Server

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.35.0 40 1/23/2026
8.34.0 177 1/19/2026
8.33.0 138 1/19/2026
8.32.0 188 1/13/2026
8.31.2 218 1/8/2026
8.31.1 174 12/29/2025
8.31.0 250 12/24/2025
8.30.0 406 12/18/2025
8.29.0 361 12/15/2025
8.28.0 285 12/15/2025
8.27.1 566 12/9/2025
8.27.0 274 12/4/2025
8.26.0 1,505 11/18/2025
8.25.0 463 11/17/2025
8.24.1 310 11/14/2025
8.24.0 600 11/13/2025
8.23.0 361 11/10/2025
8.22.0 376 11/7/2025
8.21.1 237 10/31/2025
8.21.0 265 10/30/2025
8.20.0 299 10/24/2025
8.19.0 333 10/19/2025
8.18.3 228 10/10/2025
8.18.2 198 10/10/2025
8.18.1 265 10/8/2025
8.18.0 287 10/1/2025
8.17.3 283 9/30/2025
8.17.2 289 9/25/2025
8.17.1 259 9/25/2025
8.17.0 290 9/24/2025
8.16.1 308 9/22/2025
8.16.0 304 9/19/2025
8.15.0 1,124 9/16/2025
8.14.3 252 9/12/2025
8.14.2 268 9/11/2025
8.14.1 256 9/10/2025
8.14.0 253 9/10/2025
8.13.0 300 9/1/2025
8.12.0 280 8/29/2025
8.11.0 307 8/27/2025
8.10.0 360 8/5/2025
8.9.0 222 7/30/2025
8.8.0 189 7/29/2025
8.7.0 630 7/23/2025
8.6.0 630 7/23/2025
8.5.0 607 7/21/2025
8.4.0 263 7/17/2025
8.3.0 264 7/17/2025
8.2.0 1,479 6/26/2025
8.1.0 251 6/20/2025
8.1.0-rc04 272 6/18/2025
8.1.0-rc03 342 6/13/2025
8.1.0-rc02 329 6/13/2025
8.1.0-rc01 388 6/11/2025
8.0.1 500 6/5/2025
8.0.0 312 6/3/2025
8.0.0-rc32 254 5/27/2025
8.0.0-rc31 304 5/22/2025
8.0.0-rc30 269 5/20/2025
8.0.0-rc29 270 5/9/2025
8.0.0-rc28 294 5/7/2025
8.0.0-rc27 282 4/30/2025
8.0.0-rc26 281 4/24/2025
8.0.0-rc25 387 4/2/2025
8.0.0-rc24 266 3/27/2025
8.0.0-rc23 287 3/19/2025
8.0.0-rc22 410 3/6/2025
8.0.0-rc21 346 3/5/2025
8.0.0-rc20 228 2/27/2025
8.0.0-rc19 262 2/21/2025
8.0.0-rc18 231 2/20/2025
8.0.0-rc17 208 2/17/2025
8.0.0-rc16 220 2/11/2025
8.0.0-rc15 406 2/3/2025
8.0.0-rc14 222 1/30/2025
8.0.0-rc13 218 1/23/2025
8.0.0-rc12 199 1/20/2025
8.0.0-rc11 199 1/13/2025
8.0.0-rc10 239 1/3/2025
8.0.0-rc09 254 12/10/2024
8.0.0-rc08 226 12/6/2024
8.0.0-rc07 213 12/6/2024
8.0.0-rc06 208 12/6/2024
8.0.0-rc05 214 12/6/2024
8.0.0-rc04 195 12/4/2024
8.0.0-rc03 186 12/2/2024
8.0.0-rc02 168 12/1/2024
8.0.0-rc01 126 11/29/2024
7.47.0 725 11/28/2024
7.46.0 267 11/27/2024
7.45.0 277 11/26/2024
7.44.0 305 11/26/2024
7.43.4 289 11/25/2024
7.43.3 269 11/22/2024
7.43.2 311 11/22/2024
7.43.1 279 11/22/2024
7.43.0 266 11/22/2024
7.42.0 283 11/21/2024
7.41.0 298 11/15/2024
7.40.0 278 11/14/2024
7.39.0 267 11/6/2024
7.38.0 278 11/5/2024
7.37.0 271 11/1/2024
7.36.0 271 10/30/2024
7.35.0 279 10/30/2024
7.34.0 3,614 10/24/2024
7.33.0 292 10/23/2024
7.32.0 331 10/18/2024
7.31.0 357 10/3/2024
7.30.0 320 9/25/2024
7.29.0 443 9/10/2024
7.28.0 543 7/26/2024
7.27.0 254 7/25/2024
7.26.0 251 7/24/2024
7.25.0 542 7/12/2024
7.24.0 328 6/26/2024
7.23.1 317 6/26/2024
7.23.0 326 6/3/2024
7.22.5 707 5/13/2024
7.22.4 370 4/2/2024
7.22.3 343 3/21/2024
7.22.2 324 3/21/2024
7.22.1 351 3/21/2024
7.22.0 585 3/14/2024
7.21.0 359 3/12/2024
7.20.1 349 2/15/2024
7.20.0 433 2/8/2024
7.19.0 339 1/29/2024
7.18.0 389 1/9/2024
7.17.0 370 1/5/2024
7.16.0 326 1/4/2024
7.15.0 338 1/3/2024
7.14.0 409 12/15/2023
7.13.0 353 12/12/2023
7.12.0 380 12/11/2023
7.11.1 367 11/29/2023
7.11.0 316 11/27/2023
7.10.0 323 11/24/2023
7.8.0 334 11/17/2023
7.7.0 347 11/1/2023
7.6.4 348 10/20/2023
7.6.3 342 10/13/2023
7.6.2 344 10/12/2023
7.6.1 396 10/11/2023
7.6.1-beta-01 191 10/11/2023
7.6.0 364 10/10/2023
7.5.1 345 10/10/2023
7.5.0 354 10/5/2023
7.4.4 346 10/4/2023
7.4.3 375 9/28/2023
7.4.2 371 9/27/2023
7.4.1 343 9/22/2023
7.4.0 329 9/19/2023
7.3.24 338 9/15/2023
7.3.23 353 9/14/2023
7.3.22 332 9/12/2023
7.3.21 371 9/8/2023
7.3.20 340 9/6/2023
7.3.19 330 9/6/2023
7.3.18 358 9/5/2023
7.3.17 4,854 8/29/2023
7.3.16 368 8/24/2023
7.3.15 366 8/24/2023
7.3.14 336 8/23/2023
7.3.13 354 8/22/2023
7.3.12 363 8/14/2023
7.3.11 396 8/10/2023
7.3.10 384 8/10/2023
7.3.9 398 8/10/2023
7.3.8 408 8/9/2023
7.3.7 387 8/2/2023
7.3.6 426 7/24/2023
7.3.5 530 7/10/2023
7.3.4 387 7/10/2023
7.3.3 426 7/6/2023
7.3.2 420 7/5/2023
7.3.1 461 6/26/2023
7.2.0 494 5/29/2023
7.1.6 438 5/9/2023
7.1.5 411 5/8/2023
7.1.4 455 5/2/2023
7.1.3 495 4/24/2023
7.1.2 501 4/19/2023
7.1.1 505 4/19/2023
7.1.0 534 4/13/2023
7.0.9 525 4/12/2023
7.0.8 570 4/11/2023
7.0.7 536 4/6/2023
7.0.6 554 4/2/2023
7.0.5 559 3/30/2023
7.0.4 590 3/29/2023
7.0.3 543 3/27/2023
7.0.2 605 3/23/2023
7.0.1 465 3/23/2023
7.0.0 585 3/23/2023
6.12.3 632 3/22/2023
6.12.1 594 3/20/2023
6.12.0 639 3/17/2023
6.11.1 598 3/6/2023
6.11.0 582 3/3/2023
6.10.2 680 2/16/2023
6.10.1 672 2/15/2023
6.10.0 697 2/8/2023
6.9.0 684 2/6/2023
6.8.0 734 2/3/2023
6.7.0 676 2/2/2023
6.6.0 721 1/30/2023
6.5.0 715 1/24/2023
6.4.10 932 1/20/2023
6.4.9 668 1/20/2023
6.4.5 892 1/19/2023
6.4.0 953 12/22/2022
6.2.1 1,093 11/16/2022
6.2.0 929 11/15/2022
6.1.14 1,079 11/14/2022
6.1.13 1,106 11/11/2022
6.1.12 1,304 10/3/2022
6.1.11 1,342 9/30/2022
6.1.10 1,367 9/23/2022
6.1.9 1,345 9/13/2022
6.1.8 1,428 9/1/2022
6.1.7 1,375 9/1/2022
6.1.6 1,741 9/1/2022
6.1.5 1,458 8/25/2022
6.1.4 1,458 8/23/2022
6.1.3 1,612 8/12/2022
6.1.0-beta-08 544 4/28/2022
6.1.0-beta-07 477 4/27/2022
6.1.0-beta-06 454 4/27/2022
6.1.0-beta-05 484 4/21/2022
6.1.0-beta-04 470 4/21/2022
6.1.0-beta-03 483 4/19/2022
6.1.0-beta-02 486 4/18/2022
6.1.0-beta-01 329 4/18/2022