Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kentico/xperience-by-kentico-crm

Xperience by Kentico integration with Salesforce Sales Cloud and MS Dynamics
https://github.com/kentico/xperience-by-kentico-crm

aspnetcore csharp dotnet kentico xperience-by-kentico xperience-by-kentico-integrations

Last synced: about 12 hours ago
JSON representation

Xperience by Kentico integration with Salesforce Sales Cloud and MS Dynamics

Awesome Lists containing this project

README

        

# Xperience by Kentico CRM

[![7-day bug-fix policy](https://img.shields.io/badge/-7--days_bug--fixing_policy-grey?labelColor=orange&logo=data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ic3ZnLWljb24iIHN0eWxlPSJ3aWR0aDogMWVtOyBoZWlnaHQ6IDFlbTt2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO2ZpbGw6IGN1cnJlbnRDb2xvcjtvdmVyZmxvdzogaGlkZGVuOyIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik04ODguNDkgMjIyLjY4NnYtMzEuNTRsLTY1LjY3Mi0wLjk1NWgtMC4yMDVhNDY1LjcxNSA0NjUuNzE1IDAgMCAxLTE0NC4zMTUtMzEuMzM0Yy03Ny4wMDUtMzEuMTk4LTEyNi4yOTQtNjYuNzY1LTEyNi43MDMtNjcuMTA3bC0zOS44LTI4LjY3Mi0zOS4xODUgMjguNDY4Yy0yLjA0OCAxLjUwMS00OS45MDMgMzYuMDQ0LTEyNi45MDggNjcuMzFhNDQ3LjQyIDQ0Ny40MiAwIDAgMS0xNDQuNTIgMzEuMzM1bC02NS44NzcgMC45NTZ2Mzc4Ljg4YzAgODcuMDQgNDkuODM0IDE4NC42NjEgMTM3LjAxIDI2Ny44MSAzNy41NDcgMzUuODQgNzkuMjU4IDY2LjM1NSAxMjAuODMzIDg4LjIgNDMuMjggMjIuNzMzIDg0L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TE1Ljg1IDExNS44NWEzMi4yOSAzMi4yOSAwIDAgMCA0NS4zMjggMEw3MTMuMzIgNDEzLjlhMzIuMjIyIDMyLjIyMiAwIDAgMCAwLTQ1LjMzeiIgIC8+PC9zdmc+)](https://github.com/Kentico/.github/blob/main/SUPPORT.md#full-support)
[![CI: Build and Test](https://github.com/Kentico/xperience-by-kentico-crm/actions/workflows/ci.yml/badge.svg)](https://github.com/Kentico/xperience-by-kentico-crm/actions/workflows/ci.yml)

| Name | Package |
| ------------- |:-------------:|
| Kentico.Xperience.CRM.Common | [![NuGet Package](https://img.shields.io/nuget/v/Kentico.Xperience.CRM.Common.svg)](https://www.nuget.org/packages/Kentico.Xperience.CRM.Common) |
| Kentico.Xperience.CRM.Dynamics | [![NuGet Package](https://img.shields.io/nuget/v/Kentico.Xperience.CRM.Dynamics.svg)](https://www.nuget.org/packages/Kentico.Xperience.CRM.Dynamics) |
| Kentico.Xperience.CRM.Salesforce | [![NuGet Package](https://img.shields.io/nuget/v/Kentico.Xperience.CRM.Salesforce.svg)](https://www.nuget.org/packages/Kentico.Xperience.CRM.Salesforce) |

## Description

Xperience by Kentico CRM integration Starter kit for general CRM integrations. Plus plug-and-play packages for Microsoft Dynamics Sales and Salesforce Sales Cloud. This integration enables sending form submissions from Xperience by Kentico to a CRM as leads and checking synchronizatino status in the admin UI.

## Screenshots

![Synchronized leads](https://raw.githubusercontent.com/Kentico/xperience-by-kentico-crm/main/images/screenshots/CRM_form_sync_table.png)

![Dynamics settings](https://raw.githubusercontent.com/Kentico/xperience-by-kentico-crm/main/images/screenshots/Dynamics_CRM_settings.png)

## Library Version Matrix

The versions of this library are supported by the following versions of Xperience by Kentico

| Xperience Version | Library Version |
|-------------------|-----------------|
| >= 28.0.0 | >= 1.0.0 |
| >= 28.3.1 | >= 2.0.0 |
| >= 30.0.0 | >= 3.0.0 |

### Dependencies

- [ASP.NET Core 8.0](https://dotnet.microsoft.com/en-us/download)
- [Xperience by Kentico](https://docs.xperience.io/xp/changelog)

## Package Installation

### Dynamics Sales integration

Add the package to your application using the .NET CLI

```powershell
dotnet add package Kentico.Xperience.CRM.Dynamics
```

### Salesforce Sales integration

Add the package to your application using the .NET CLI

```powershell
dotnet add package Kentico.Xperience.CRM.Salesforce
```

## Quick Start

1. Fill CRM (Dynamics/Salesforce) settings in appsettings.json
2. Register services and setup form-lead mapping
3. Start using it

### CRM settings

There are 2 options how to fill settings:

- Use application settings: [appsettings.json](./docs/Usage-Guide.md#crm-settings) (API config is recommended to have in [User Secrets](https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-6.0&tabs=windows))
- Use CMS settings: CRM integration settings category is created after first run. It is primarily for testing and demo purposes and we do not recommend it due to low security standards.
This is primary option when you don't specify IConfiguration section during services registration.

No API keys? Use our [Salesforce Quick Start Guide](./docs/Salesforce-Quick-Guide.md) to deliver a quick demo with a free Salesforce developer account.

### Forms data - Leads integration

Configure mapping for each form between Kentico Form fields and Dynamics Lead entity fields:

#### Dynamics Sales

Added form with auto mapping based on Form field mapping to Contacts atttibutes. Uses CMS settings:

```csharp
// Program.cs

var builder = WebApplication.CreateBuilder(args);
// ...
builder.Services.AddKenticoCRMDynamics(builder =>
builder.AddFormWithContactMapping(DancingGoatContactUsItem.CLASS_NAME));
```

Example how to add form with own mapping:

```csharp
// Program.cs

var builder = WebApplication.CreateBuilder(args);
// ...
builder.Services.AddKenticoCRMDynamics(builder =>
builder.AddForm(DancingGoatContactUsItem.CLASS_NAME, //form class name
c => c
.MapField("UserFirstName", "firstname")
.MapField("UserLastName", e => e.LastName) //you can map to Lead object or use own generated Lead class
.MapField(c => c.UserEmail, e => e.EMailAddress1) //generated form class used
.MapField(b => b.GetStringValue("UserMessage", ""), e => e.Description) //general BizFormItem used
));
```

Example how to add form with custom converter.
Use this option when you need complex logic and need to use another service via DI:

```csharp
// Program.cs

var builder = WebApplication.CreateBuilder(args);
// ...
builder.Services.AddKenticoCRMDynamics(builder =>
builder.AddFormWithConverter(DancingGoatContactUsItem.CLASS_NAME));
```

#### Salesforce

Added form with auto mapping based on Form field mapping to Contacts atttibutes. Uses CMS settings:

```csharp
// Program.cs

var builder = WebApplication.CreateBuilder(args);
// ...
builder.Services.AddKenticoCRMSalesforce(builder =>
builder.AddFormWithContactMapping(DancingGoatContactUsItem.CLASS_NAME));
```

Example how to add form with own mapping:

```csharp
// Program.cs

var builder = WebApplication.CreateBuilder(args);
// ...
builder.Services.AddKenticoCRMSalesforce(builder =>
builder.AddForm(DancingGoatContactUsItem.CLASS_NAME, //form class name
c => c
.MapField("UserFirstName", "FirstName") //option1: mapping based on source and target field names
.MapField("UserLastName", e => e.LastName) //option 2: mapping source name string -> member expression to SObject
.MapField(c => c.UserEmail, e => e.Email) //option 3: source mapping function from generated BizForm object -> member expression to SObject
.MapField(b => b.GetStringValue("UserMessage", ""), e => e.Description) //option 4: source mapping function general BizFormItem -> member expression to SObject
));
```

Example how to add form with custom converter.
Use this option when you need complex logic and need to use another service via DI:

```csharp
// Program.cs

var builder = WebApplication.CreateBuilder(args);

// ...
builder.Services.AddKenticoCRMSalesforce(builder =>
builder.AddFormWithConverter(DancingGoatContactUsItem.CLASS_NAME));
```

### Contacts integration
You can enable synchronization of online marketing contacts (OM_Contact table).
You can choose between Lead and Contact entities in CRM where to sync data (but only one option is supported at any given time).

#### Dynamics Sales

```csharp
// Program.cs
var builder = WebApplication.CreateBuilder(args);
// Choose between sync to Leads and Contacts (only one option is supported)!
// Add sync to Leads
builder.Services.AddKenticoCRMDynamicsContactsIntegration(crmType: ContactCRMType.Lead);
// Add sync to Contacts
builder.Services.AddKenticoCRMDynamicsContactsIntegration(crmType: ContactCRMType.Contact);
```

#### Salesforce

```csharp
// Program.cs
var builder = WebApplication.CreateBuilder(args);
// Choose between sync to Leads and Contacts (only one option is supported)!
// Add sync to Leads
builder.Services.AddKenticoCRMSalesforceContactsIntegration(crmType: ContactCRMType.Lead);
// Add sync to Contacts
builder.Services.AddKenticoCRMSalesforceContactsIntegration(crmType: ContactCRMType.Contact);
```

## Full Instructions

View the [Usage Guide](./docs/Usage-Guide.md) for more detailed instructions.

## Projects

| Project | Description |
| ------------------------------------ | ---------------------------------------------------------------------------------------- |
| src/Kentico.Xperience.CRM.Dynamics | Xperience by Kentico Dynamics Sales CRM integration library |
| src/Kentico.Xperience.CRM.Salesforce | Xperience by Kentico Salesforce CRM integration library |
| src/Kentico.Xperience.CRM.Common | Xperience by Kentico common integration functionality (used by Dynamics/Salesforce libs) |
| examples/DancingGoat | Example project to showcase CRM integration |

## Contributing

To see the guidelines for Contributing to Kentico open source software, please see [Kentico's `CONTRIBUTING.md`](https://github.com/Kentico/.github/blob/main/CONTRIBUTING.md) for more information and follow the [Kentico's `CODE_OF_CONDUCT`](https://github.com/Kentico/.github/blob/main/CODE_OF_CONDUCT.md).

Instructions and technical details for contributing to **this** project can be found in [Contributing Setup](./docs/Contributing-Setup.md).

## License

Distributed under the MIT License. See [`LICENSE.md`](./LICENSE.md) for more information.

## Support

[![7-day bug-fix policy](https://img.shields.io/badge/-7--days_bug--fixing_policy-grey?labelColor=orange&logo=data:image/svg+xml;base64,PHN2ZyBjbGFzcz0ic3ZnLWljb24iIHN0eWxlPSJ3aWR0aDogMWVtOyBoZWlnaHQ6IDFlbTt2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO2ZpbGw6IGN1cnJlbnRDb2xvcjtvdmVyZmxvdzogaGlkZGVuOyIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik04ODguNDkgMjIyLjY4NnYtMzEuNTRsLTY1LjY3Mi0wLjk1NWgtMC4yMDVhNDY1LjcxNSA0NjUuNzE1IDAgMCAxLTE0NC4zMTUtMzEuMzM0Yy03Ny4wMDUtMzEuMTk4LTEyNi4yOTQtNjYuNzY1LTEyNi43MDMtNjcuMTA3bC0zOS44LTI4LjY3Mi0zOS4xODU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S45NzdhNzM5Ljk0MiA3MzkuOTQyIDAgMCAwIDE0MC4yMi03NC42MTV2LTAuMDY5eiIgIC8+PHBhdGggZD0iTTcxMy4zMTggMzY4LjY0YTMyLjIyMiAzMi4yMjIgMCAwIDAtNDUuMzI5IDBMNDQ5LjE5NSA1ODcuNDM1bC05My4xODQtOTMuMTE2YTMyLjIyMiAzMi4yMjIgMCAwIDAtNDUuMzMgMCAzMi4yMjIgMzIuMjIyIDAgMCAwIDAgNDUuMjZsMTE1Ljg1IDExNS44NWEzMi4yOSAzMi4yOSAwIDAgMCA0NS4zMjggMEw3MTMuMzIgNDEzLjlhMzIuMjIyIDMyLjIyMiAwIDAgMCAwLTQ1LjMzeiIgIC8+PC9zdmc+)](https://github.com/Kentico/.github/blob/main/SUPPORT.md#full-support)

This project has **Full support by 7-day bug-fix policy**.

See [`SUPPORT.md`](https://github.com/Kentico/.github/blob/main/SUPPORT.md#full-support) for more information.

For any security issues see [`SECURITY.md`](https://github.com/Kentico/.github/blob/main/SECURITY.md).