Skip to content

Ticketmaster Integration

Sam Woodall edited this page Sep 10, 2019 · 3 revisions

Rover Campaigns includes support for integrating with the Ticketmaster Presence SDK. This will allow your team to surface some Ticketmaster information within the Rover Audience and Campaigns tools.

The integration is indirect; you integrate both the Presence SDK and the Rover Campaigns SDK into your app, and write a little bit of glue code.

Installing the Module

Import the Ticketmaster module:

implementation "io.rover.campaigns:debug:3.4.0"

Initialize the TicketmasterAssembler:

RoverCampaigns.initialize(
    ...,
    TicketmasterAssembler(),
    ...
)

Then you need to implement and configure a PresenceLoginListener in an Activity (as described in the Presence SDK documentation), and then from there you'll resolve Rover Campaigns' TicketmasterAuthorizer objects and call functions on it to keep Rover Campaigns up to date on Ticketmaster logins.

First, set the user's Ticketmaster credentials into Rover after a successful sign-in with the Presence SDK. Implement the onMemberUpdated(backendName: TMLoginApi.BackendName, memberInfo: TMLoginApi.MemberInfo?) method and call the setCredentials method passing in values from the MemberInfo object.

override fun onMemberUpdated(backendName: TMLoginApi.BackendName, memberInfo: TMLoginApi.MemberInfo?) {
    RoverCampaigns.sharedInstance.ticketmasterAuthorizer.setCredentials(
        memberInfo?.memberId,
        memberInfo?.email,
        memberInfo?.firstName
    )
}

Then clear the user's Ticketmaster credentials after a successful sign-out with the Presence SDK. Implement the onLogoutSuccessful() method and call the clearCredentials method.

override fun onLogoutSuccessful(backendName: TMLoginApi.BackendName) {
    RoverCampaigns.shared?.resolve(TicketmasterAuthorizer::class.java)?.clearCredentials()
}
Clone this wiki locally