Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Autogenerated Java SDK for the Salesforce Marketing Cloud Platform

License

Notifications You must be signed in to change notification settings

salesforce-marketingcloud/mcsdk-automation-java

Repository files navigation

Salesforce Marketing Cloud - Autogenerated SDK

Overview

The Salesforce Marketing Cloud Java SDK enables developers to easily access the Salesforce Marketing Cloud.

Supported Features

Environment Requirements

  • Java 1.8+

Download

The easiest way to install the Salesforce Marketing Cloud SDK is via Maven - simply add the following dependency to your project's pom.xml:

<dependency>
    <groupId>com.github.salesforce-marketingcloud</groupId>
    <artifactId>java-sdk</artifactId>
    <version>1.0.0</version>
</dependency>

Getting Started

Usage scenarios

1.Basic usage

Please note that the configuration in this scenario is taken from the environment variables.


Client client = new Client();
AssetApi assetApi = client.getAssetApi();
Asset asset = createAsset();   // your own implementation to get an Asset instance

Asset result = assetApi.createAsset(asset);

System.out.println(result);

Environment variables:

  • SFMC_ACCOUNT_ID
  • SFMC_AUTH_BASE_URL (Authentication TSE)
  • SFMC_CLIENT_ID
  • SFMC_CLIENT_SECRET
  • SFMC_COUNTRY_CODE (eg: US)
  • SFMC_KEYWORD (SMS keyword)
  • SFMC_SHORT_CODE (SMS short code)

2.Setting the configuration using the Client class constructor parameters


Client client = new Client(
    "<AUTH_BASE_URL>",
    "<CLIENT_ID>",
    "<CLIENT_SECRET>",
    "<ACCOUNT_ID>",
    "<APPLICATION_DATA-ACCESS_PERMISSIONS>"
);

AssetApi assetApi = client.getAssetApi();
Asset asset = createAsset();   // your own implementation to get an Asset instance

Asset result = assetApi.createAsset(asset);

System.out.println(result);

To find more information on how to consume the SDK, Refer to the Regression tests or the Code Samples

Note

Contact us

  • Request a new feature, add a question or report a bug on GitHub.
  • Vote for Popular Feature Requests by making relevant comments and add your reaction. Use a reaction in place of a "+1" comment:
  • 👍 - upvote
  • 👎 - downvote

License

By contributing your code, you agree to license your contribution under the terms of the BSD 3-Clause License.

About

Autogenerated Java SDK for the Salesforce Marketing Cloud Platform

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages