Creating a Custom On-Premises Agent Using a Sample

Set Up a Custom Agent

  1. Install Java on the system.
    • Agents require Java 17.
    • Either the PATH environment variable must include the folder that contains the “java” executable, or the JRE_HOME or JAVA_HOME environment variable must be set to the root of the Java installation.
      Note: Older installations of the agent support only the JAVA_HOME variable.
  2. Download Maven 3.9.9 or later from maven.apache.org.
  3. Add the Maven bin directory to $PATH or %PATH%.
  4. Set or the export JAVA_HOME environment variable to point at the Java install root directory.
  5. Install the SDK JAR file into your local repository: mvn install:install-file -Dfile=<path where the agent was downloaded>/sdk/mkt-agent-sdk-jar-1.<current release>.jar \ -DpomFile=<path where the agent was downloaded>/sdk/pom.xml
  6. Create a directory for building the sample custom agent.
  7. Copy <path where the agent was downloaded>/sdk/sample/pom.xml to the <sample custom agent> folder
  8. Copy <path where the agent was downloaded>/sdk/sample/logback.xml to the <sample custom agent> folder
  9. Create the src/main/java/sample subfolder under the <sample custom agent> folder.
  10. Copy <path where the agent was downloaded>/sdk/sample/*.java to the <sample custom agent>/src/main/java/sample folder.
  11. Change the directory to the <sample custom agent> directory that you created.
  12. Build the sample custom agent’s mvn compile.
  13. On the navigation bar in SAS Customer Intelligence 360, click Administration Administrationthen selectData and Integrations. Click Access Points.

  14. Copy the URL for the external gateway. This value is used in the subsequent sections of these instructions.
    Note: Only the host name is used in the URL for the gateway (for example, extapigwservice-prod.ci360.sas.com).
  15. Create a custom agent definition in SAS Customer Intelligence 360 that is used in the following sections. For more information, see Add a General Access Point.

Run the Sample Custom Agent to Retrieve and Display Events from SAS Customer Intelligence 360

Use the following code to run the sample access point from the <sample access point> directory:

mvn exec:java -Dci360.gatewayHost=<SAS Customer Intelligence 360 Gateway host> -Dci360.tenantID=<tenant ID> -Dci360.clientSecret=<client secret> \ -

Dlogback.configurationFile=logback.xml -Dexec.mainClass="sample.SampleAgent" -s "<maven install root directory>\conf\settings.xml"

Connect the Custom Agent to SAS Customer Intelligence 360 through a Proxy Server

The SDK for the custom agent supports connecting to SAS Customer Intelligence 360 through a proxy HTTP server. To use a proxy server, you enter the following options in the mvn command lines in the previous sections:

Note: The connection to the proxy can be secure or non-secure and can be authenticated or unauthenticated.
  • Options for the proxy server using the http protocol handler:
    • -Dhttp.proxyHost: the host name of the proxy server
    • -Dhttp.proxyPort: the port used by the proxy server
    • -Dhttp.nonProxyHosts: the hosts for which communication should not go through the proxy server
  • Options for the proxy server using the http protocol handler when the connection is authenticated:
    • -Dhttp.proxyUser: the user name on the proxy server
    • -Dhttp.proxyPassword: the user password on the proxy server
    • -Dhttp.proxyRealm: the authentication realm for the proxy server
Last updated: August 11, 2026