Integration within SFCC
This guide describes how to integrate DataDome SDK in your Android application within Salesforce Commerce Cloud (SFCC) environment.
Integration within SFCC is only supported through OkHttp Integration. Manual integration is not supported yet.
Prerequisites
- Complete the SDK installation and configuration steps.
- Complete the OkHttp Integration steps.
Additional configuration for Challenge display
In SFCC, the Challenge display is handled through a redirection. Add the steps below to ensure this redirection works correctly.
- Enable
bypassAcceptHeader
at the SDK initializationdataDomeSdk = DataDomeSDK .with(application, BuildConfig.DATADOME_SDK_KEY, BuildConfig.VERSION_NAME) .listener(dataDomeSDKListener) // optional .manualListener(dataDomeSDKManualIntegrationListener) // optional .bypassAcceptHeader(true) // must set to true for SFCC
- Disable OkHttp client redirection
val builder = OkHttpClient.Builder()
.followRedirects(false)
.followSslRedirects(false)
CookieJar implementation
A CookieJar is essential for maintaining SFCC session integrity between your OkHttp client and DataDome SDK by passing the dwsid
SFCC cookie, ensuring the correct display of challenges.
- Complete CookieJar interface implementation steps.
- Make sure to attach the
CookieJar
to your OkHttp client so that it can correctly persist thedwsid
SFCC cookie from your API call response.
Updated 3 months ago