entryKey static method

String entryKey(
  1. CEPTriggerPayload payload
)

The key an entry's chance and campaign are stored under: the live-test cep id for a live-test send, else the campaign key. A test send and the published campaign share a campaign key, so keying both by it would let one overwrite (or a hide wipe) the other's chance. Port of Android's and iOS's entryKey (kept here, with triggerIdOrNull, so tests can pin it without the SDK).

Implementation

static String entryKey(CEPTriggerPayload payload) =>
    isLiveTestCepId(payload.cepCampaignId)
        ? payload.cepCampaignId
        : payload.campaignKey;