Skip to content

Getting Started - E-Commerce

Causal Foundry SDK E-Commerce module consists of events for online marketplace platforms. You need to implement this module if your app offers e-commerce content that may include showcasing items to purchase, logging impressions, checking out events, and also events related to delivery as well. In order to use e-commerce, you need to include the respective dependency in your project but make sure you have the Core Module already integrated.

This documentation covers the steps to integrating SDK in your apps. We’ll also discuss a few fundamentals of how the dashboard works in tandem with your app usage to view your users and engage them with contextually personalized messages.

Initialization

To use the SDK, Core is mandatory to include as it contains the elements regarding the basic app navigation and workflow including nudges. Moreover, all the modules require the core to be integrated to successfully log the events. If you have already integrated the core, you don't need to repeat initialization steps for this and can start using the SDK after including the dependency.

    implementation 'ai.causalfoundry.android.sdk:e_commerce:<version-number>'

For version-number please refer to Maven Repository

You can directly get the SDK as a Swift package since the SDK is as OpenSource Repo on GitHub OR you can use the SDK as a Cocoapod. Add the following line in your Podfile.

    pod 'CausalFoundrySDKEcom', '~> <version-number>'

The easiest way to integrate Causal Foundry react native (android) SDK in your project is using an NPM package. Add dependencies of react-native SDK in the dependencies section of your package.json of your project and Android Lifecycle Components in the app/build.gradle file.

    "dependencies":{
        "@causalfoundry/react-native-cf-e-com":"<version_number>"
    }

for version_number please head to npm package.

For Web Apps you don't need any new NPM package but can use the already existing one. The only thing required to import the correct module in your files.

    import { ECommerce } from '@causalfoundry/js-sdk'


As per the SDK structure, content blocks are further divided into 2 main categories: Ingest Events and Catalog Events.

  • Ingest Events helps with time sensitive elements such as when an event is happening.
  • Catalog Events helps with static content that provide details about the elements in the events.

To get into more details, You can view both Ingest events and Catalog Events for E-Commerce Module.

thumb_ingest thumb_catalog