Custom Event

To capture user-defined attributes in the mobile SDK, define the source properties in a custom event. You can then map the fields to a Custom Event Schema using the Mobile Schema naming conventions.

Custom Event Example for iOS 

CustomEvent(
    name: "Custom Event",
    attributes: [
        "giftWrap" : true,
        "giftMessage" : "Happy Birthday",
        "giftWrapOptions": [
            "paperColor": "green",
            "ribbon": false
  ]
    ]
)

Custom Event Example for Android 

EventManager.customEvent(
    name = "Custom Event",
    attributes = mapOf(
        "gift" to mapOf(
            "message" to "Happy Birthday",
            "wrap" to true,
            "wrapOptions" to mapOf(
                "paper-color" to "green",
                "ribbon" to false
            )
        )
    )
)