Official C# SDK for Salesforce Marketing Cloud enabling developers to integrate transactional messaging and access Marketing Cloud APIs via .NET Standard.
git clone https://github.com/salesforce-marketingcloud/mcsdk-automation-csharp.gitThe Salesforce Marketing Cloud C# SDK is an autogenerated SDK built on .NET Standard 2.0 that replaces the community-supported Fuel-CSharp predecessor. It enables C# developers to programmatically access Salesforce Marketing Cloud services, with current support for Transactional Messaging APIs. The SDK is compatible with .NET Core 2.0+ and .NET Framework 4.6.1+, and includes authentication flow, caching, and regression tests for implementation guidance. Developers can install it via NuGet and reference code samples and regression tests in the GitHub repository to accelerate integration.
Install the SDK via NuGet with the command: Install-Package SalesforceMarketingCloudSDK. Refer to the regression tests in the src/Salesforce.MarketingCloud.Test/Api directory and code samples in the Samples folder for implementation examples. The SDK handles authentication flow and caching internally.
Sending transactional emails through Salesforce Marketing Cloud from .NET applications
Automating customer communication workflows in C# projects
Integrating Salesforce Marketing Cloud APIs into enterprise .NET systems
Building marketing automation features with .NET Standard compatibility
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/salesforce-marketingcloud/mcsdk-automation-csharpCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Generate a C# SDK for the Salesforce Marketing Cloud Platform. The SDK should include methods for [ACTIONS] such as sending emails, managing contacts, and tracking campaign performance. Use the following API endpoints: [ENDPOINTS]. Ensure the SDK is well-documented and includes example usage for each method.
```csharp
using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace SalesforceMarketingCloudSDK
{
public class MarketingCloudClient
{
private readonly HttpClient _httpClient;
private readonly string _apiKey;
public MarketingCloudClient(string apiKey)
{
_httpClient = new HttpClient();
_apiKey = apiKey;
}
public async Task SendEmailAsync(string emailAddress, string templateId, string subject)
{
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.marketingcloud.com/v1/email/send");
request.Headers.Add("Authorization", _apiKey);
request.Content = new StringContent(
$"{{\"emailAddress\": \"{emailAddress}\", \"templateId\": \"{templateId}\", \"subject\": \"{subject}\"}}",
System.Text.Encoding.UTF8,
"application/json");
var response = await _httpClient.SendAsync(request);
response.EnsureSuccessStatusCode();
}
}
}
```
### Example Usage
```csharp
var client = new MarketingCloudClient("your-api-key");
// Send an email
await client.SendEmailAsync("user@example.com", "template123", "Welcome to Our Service");
```Your one-stop shop for church and ministry supplies.
Enterprise CRM with AI-powered sales and service
Automate your browser workflows effortlessly
Automate your spreadsheet tasks with AI power
Career support and employment training for young adults
Write emails faster
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan