When your app is ready to present your Retention Flow to your subscriber, the simplest call you can make is: 

raaft('startCancelFlow',
    {
        subscriptionId: '<processor-subscription-id>',
        authKey: '<security-token>'
});

However, did you know that there are additional pieces of data that you can send?

subscriptionId (required): the subscription identifier issued by your processor

authKey (required): the security token ensures that communication between your site and Raaft remain private and secure. more details

customer.name (optional): overrides the name of the customer shown in the dashboard. Default: the name is retrieved from your processor.

customer.email (optional): overrides the email address of the customer shown in the dashboard. Default: the name is retrieved from your processor.

customer.photo (optional): sets a url for the customer's photo shown in the dashboard. Default: we attempt to resolve a profile photo based on the email address from several public sources.

settings.zIndex (optional): specify a zIndex for the modal to appear. Default: 100.

settings.spinnerColor (optional): specify a hex value color for the spinner: Default.

settings.demoMode (optional): In Demo mode all data saves are simulated. Default: false.

onComplete (optional): a callback function that will be executed prior to exiting the flow. The callback will receive a single argument: an object representing the results of the flow. more details

raaft('startCancelFlow', 
    subscriptionId: 'fdak4k3k4223m',
    customer: {
        name: 'Bill Gates',
        email: 'bill.gates@microsoft.com',
        photo: 'https://news.microsoft.com/uploads/prod/2017/03/gates_page.png'
    },

    settings: {
        zIndex: 100,
        spinnerColor: '#42b983',
        demoMode: true
    },
    onComplete: function (outcome) {
        // do something interesting                  
    }

}

Did this answer your question?