Once initialized , the Benji Connect SDK supports the following methods and events

Methods

open()

  • This method opens the Benji Connect modal through the SDK. Typically tou would attach this method to an onClick function in your member connect flow.
$('#connectBtn').on('click', function(e) {
        e.preventDefault();
        if (sdk) {
            sdk.open();
        }
    });

Events

As a user goes through the Benji Connect flow, your application will receive the following events to the callback functions you specified as part of the initialization flow :

onSuccess

Event that indicates a succesfull authentication between the member and a Benji loyalty rewards partner.

onExit

Event that indicates that the user has exited the Benji Connect flow

onEvent

Event that indicates an event as part of the user flow on the Benji Connect flow

onError

Event that indicates an error has occured as part of the Benji Connect flow