arcshrma / target-java-sdk-samples

Adobe Target Java SDK Samples & Demos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adobe Target Java SDK Samples

This repository contains Spring Boot based samples for Target Java SDK.

Initiating Client

The TargetClient is instantiated as a Spring bean in ClientSampleApplication class as follows:

@Bean
TargetClient marketingCloudClient() {
    ClientConfig clientConfig = ClientConfig.builder()
            .client("emeaprod4")
            .organizationId("0DD934B85278256B0A490D44@AdobeOrg")
            .build();

    return TargetClient.create(clientConfig);
}

Samples

The samples are divided into 3 sub-sections. All samples have java-docs provided to help explain what each API does.

ProductController: This example demonstrates live offers being applied to product listing page and product view page.

TargetController This example demonstrates different kind of target integrations for eg. Target-Only, Target-ECID, Target-ECID-CustomerId, Target-Analytics etc. It also demos how manage sessions using cookies and how to make asynchronous requests. All of this is demonstrated keeping browser as end client in mind. All the offers are set in serverState variable which are eventually applied by at.js in browser. The web pages displays cookie and serverState values in html for debugging purposes.

TargetRestController This example contains minimal samples to demonstrate target java backend as a rest service. This can serve various clients like: node.js serving front-end, mobile and IOT devices etc.

Development

Check out our Contribution guidelines as well as Code of Conduct prior to contributing to Target Java SDK Samples.

About

Adobe Target Java SDK Samples & Demos

License:Apache License 2.0


Languages

Language:JavaScript 87.0%Language:Java 9.8%Language:HTML 3.3%