Skip to content

Latest commit

 

History

History
300 lines (219 loc) · 14 KB

File metadata and controls

300 lines (219 loc) · 14 KB

AttendeeInsights

Overview

The Attendee Insights feature provides valuable information about your event attendees. It assists planners, marketers, and exhibitors in targeting customers effectively, thereby enhancing engagement and conversion rates for marketing campaigns. Utilize these APIs to fetch engagement score data from your event and integrate it into your marketing systems.

Engagement Score - Engagement scores are a container that track individual attendees' engagement with your event. Attendees earn points by performing actions, which indicates their relative engagement with your content.

Actions - These are distinct, trackable activities that attendees can perform during an event. Points are awarded for these actions and contribute to the engagement score.

Available Operations

listAttendeeInsights

Gets a paginated list of engagement scores (attendee insights) and their associated events. Use the returned IDs to retrieve further details using other attendee insight endpoints.

More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>

Example Usage

package hello.world;

import com.cvent.CventSDK;
import com.cvent.models.components.SchemeOAuth2ClientCredentials;
import com.cvent.models.components.Security;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.ListAttendeeInsightsRequest;
import com.cvent.models.operations.ListAttendeeInsightsResponse;
import java.lang.Exception;
import java.time.OffsetDateTime;
import java.util.List;

public class Application {

    public static void main(String[] args) throws ErrorResponse1, Exception {

        CventSDK sdk = CventSDK.builder()
                .security(Security.builder()
                    .oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
                        .clientID("<id>")
                        .clientSecret("<value>")
                        .tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
                        .scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
                        .build())
                    .build())
            .build();

        ListAttendeeInsightsRequest req = ListAttendeeInsightsRequest.builder()
                .after(OffsetDateTime.parse("2017-01-02T02:00:00Z"))
                .before(OffsetDateTime.parse("2017-01-02T02:00:00Z"))
                .token("0e28af57-511f-47ab-ae46-46cd1ca51a1a")
                .filter("event.id eq '6f004fd8-7a06-4b25-94f2-46270d3fbc79'")
                .build();


        sdk.attendeeInsights().listAttendeeInsights()
                .callAsStream()
                .forEach((ListAttendeeInsightsResponse item) -> {
                   // handle page
                });

    }
}

Parameters

Parameter Type Required Description
request ListAttendeeInsightsRequest ✔️ The request object to use for the request.

Response

ListAttendeeInsightsResponse

Errors

Error Type Status Code Content Type
models/errors/ErrorResponse1 400, 401, 403, 429 application/json
models/errors/APIException 4XX, 5XX */*

getAttendeeInsightsById

Retrieve the details of a specific engagement score (attendee insight) using its ID.

More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>

Example Usage

package hello.world;

import com.cvent.CventSDK;
import com.cvent.models.components.SchemeOAuth2ClientCredentials;
import com.cvent.models.components.Security;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.GetAttendeeInsightsByIdRequest;
import com.cvent.models.operations.GetAttendeeInsightsByIdResponse;
import java.lang.Exception;
import java.util.List;

public class Application {

    public static void main(String[] args) throws ErrorResponse1, Exception {

        CventSDK sdk = CventSDK.builder()
                .security(Security.builder()
                    .oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
                        .clientID("<id>")
                        .clientSecret("<value>")
                        .tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
                        .scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
                        .build())
                    .build())
            .build();

        GetAttendeeInsightsByIdRequest req = GetAttendeeInsightsByIdRequest.builder()
                .id("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
                .build();

        GetAttendeeInsightsByIdResponse res = sdk.attendeeInsights().getAttendeeInsightsById()
                .request(req)
                .call();

        if (res.attendeeInsights().isPresent()) {
            System.out.println(res.attendeeInsights().get());
        }
    }
}

Parameters

Parameter Type Required Description
request GetAttendeeInsightsByIdRequest ✔️ The request object to use for the request.

Response

GetAttendeeInsightsByIdResponse

Errors

Error Type Status Code Content Type
models/errors/ErrorResponse1 401, 403, 404, 429 application/json
models/errors/APIException 4XX, 5XX */*

getScores

Retrieves a paginated list of attendees and their scores for the given engagement score (attendee insight).

More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>

Example Usage

package hello.world;

import com.cvent.CventSDK;
import com.cvent.models.components.SchemeOAuth2ClientCredentials;
import com.cvent.models.components.Security;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.GetScoresRequest;
import com.cvent.models.operations.GetScoresResponse;
import java.lang.Exception;
import java.util.List;

public class Application {

    public static void main(String[] args) throws ErrorResponse1, Exception {

        CventSDK sdk = CventSDK.builder()
                .security(Security.builder()
                    .oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
                        .clientID("<id>")
                        .clientSecret("<value>")
                        .tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
                        .scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
                        .build())
                    .build())
            .build();

        GetScoresRequest req = GetScoresRequest.builder()
                .id("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
                .token("0e28af57-511f-47ab-ae46-46cd1ca51a1a")
                .filter("attendee.id eq '6f004fd8-7a06-4b25-94f2-46270d3fbc79'")
                .build();


        sdk.attendeeInsights().getScores()
                .callAsStream()
                .forEach((GetScoresResponse item) -> {
                   // handle page
                });

    }
}

Parameters

Parameter Type Required Description
request GetScoresRequest ✔️ The request object to use for the request.

Response

GetScoresResponse

Errors

Error Type Status Code Content Type
models/errors/ErrorResponse1 400, 401, 403, 404, 429 application/json
models/errors/APIException 4XX, 5XX */*

getStats

Retrieves a summary of scores for the given engagement score (attendee insight).

More about OAuth2 authorization code support for administrators <#oauth2-auth-code-planner-admin>

Example Usage

package hello.world;

import com.cvent.CventSDK;
import com.cvent.models.components.SchemeOAuth2ClientCredentials;
import com.cvent.models.components.Security;
import com.cvent.models.errors.ErrorResponse1;
import com.cvent.models.operations.GetStatsRequest;
import com.cvent.models.operations.GetStatsResponse;
import java.lang.Exception;
import java.util.List;

public class Application {

    public static void main(String[] args) throws ErrorResponse1, Exception {

        CventSDK sdk = CventSDK.builder()
                .security(Security.builder()
                    .oAuth2ClientCredentials(SchemeOAuth2ClientCredentials.builder()
                        .clientID("<id>")
                        .clientSecret("<value>")
                        .tokenURL("https://api-platform.cvent.com/ea/oauth2/token")
                        .scopes(List.of(System.getenv().getOrDefault("SCOPES", "")))
                        .build())
                    .build())
            .build();

        GetStatsRequest req = GetStatsRequest.builder()
                .id("04ca6ae2-0dc3-487b-953e-86d6abbdf7d3")
                .build();

        GetStatsResponse res = sdk.attendeeInsights().getStats()
                .request(req)
                .call();

        if (res.attendeeInsightsStats().isPresent()) {
            System.out.println(res.attendeeInsightsStats().get());
        }
    }
}

Parameters

Parameter Type Required Description
request GetStatsRequest ✔️ The request object to use for the request.

Response

GetStatsResponse

Errors

Error Type Status Code Content Type
models/errors/ErrorResponse1 401, 403, 404, 429 application/json
models/errors/APIException 4XX, 5XX */*