UnileverRewardsConnector 1.0.2

dotnet add package UnileverRewardsConnector --version 1.0.2
                    
NuGet\Install-Package UnileverRewardsConnector -Version 1.0.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="UnileverRewardsConnector" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="UnileverRewardsConnector" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="UnileverRewardsConnector" />
                    
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 UnileverRewardsConnector --version 1.0.2
                    
#r "nuget: UnileverRewardsConnector, 1.0.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 UnileverRewardsConnector@1.0.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=UnileverRewardsConnector&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=UnileverRewardsConnector&version=1.0.2
                    
Install as a Cake Tool

UnileverRewardsConnector

Connector library for Unilever Rewards platform integration.

Overview

This library provides seamless integration with Unilever's Rewards platform, offering:

  • Rewards Services: API client for Unilever Rewards operations
  • Streaming Support: Event-driven consumers for real-time data synchronization
  • Actions & Jobs: Background processing for rewards synchronization tasks
  • Recurring Jobs: Scheduled operations for distributor and company data sync

Features

Services

  • Complete Rewards API client with authentication
  • Event outbox consumer for streaming data
  • Progress tracking and sync monitoring

Actions

  • Company synchronization (articles, census, points, regions, etc.)
  • Distributor synchronization (accounts, points of sales, sellers)
  • Campaign and sensibilization management
  • TPU and EDD data synchronization

Jobs

  • Census data synchronization use cases
  • CSV import processing
  • Progress tracking use cases

Recurring Operations

  • Daily rewards processing
  • Distributor scheduling (standard and advance)

Requirements

  • .NET Core 3.1 or higher
  • Valid Unilever Rewards API token and endpoint

Configuration

Configure the following settings in your appsettings.json:

{
  "UnileverRewardsEndpoint": "https://your-rewards-endpoint",
  "UnileverRewardsToken": "your-rewards-api-token"
}

Usage

Register services in your startup:

using Unilever;

public void ConfigureServices(IServiceCollection services)
{
    StartupServicesConfig.ConfigureServices(services, Configuration, false);
}

Inject and use the Rewards service:

public class MyController
{
    private readonly IUnileverRewardsService _rewardsService;

    public MyController(IUnileverRewardsService rewardsService)
    {
        _rewardsService = rewardsService;
    }

    public void SyncArticles()
    {
        var request = new ActionExecuteRequest
        {
            organizationCode = "YOUR_ORG_CODE"
        };

        var response = _rewardsService.UnileverRewardsActionsPost(
            NameOfJobRewards.UnileverRewardsCompanySyncArticles.ToString(),
            request
        );
    }
}

Event Streaming

The library provides event streaming capabilities through the outbox pattern:

public class MyStreamingService
{
    private readonly IUnileverRewardsService _rewardsService;

    public void ProcessEvents()
    {
        var eventsIndex = _rewardsService.GetEventsIndex();

        foreach (var index in eventsIndex)
        {
            var events = _rewardsService.GetEvents(
                index.Partition,
                index.LastProcessedId,
                50
            );

            // Process events...
        }
    }
}

Available Job Actions

  • UnileverRewardsCompanyEndCampaign
  • UnileverRewardsCompanyEndSensibilization
  • UnileverRewardsCompanySyncArticles
  • UnileverRewardsCompanySyncAxumCentralDistributor
  • UnileverRewardsCompanySyncCensus
  • UnileverRewardsCompanySyncCsv
  • UnileverRewardsCompanySyncPoints
  • UnileverRewardsCompanySyncPosClusters
  • UnileverRewardsCompanySyncProgress
  • UnileverRewardsCompanySyncRegions
  • UnileverRewardsCompanySyncSurveyTypes
  • UnileverRewardsCompanySyncTpuEdds
  • UnileverRewardsDistributorSyncAccountsUsers
  • UnileverRewardsDistributorSyncPointsOfSales
  • UnileverRewardsDistributorSyncSellers
  • UnileverRewardsCollectionCensusData

Support

For issues and questions, please contact the Unilever Rewards Team.

License

MIT

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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 was computed.  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. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 243 11/26/2025
1.0.1 231 10/29/2025
1.0.0 207 10/29/2025