PO Box 55056 RPO Windermere, Edmonton, AB T6W 5B4, Canada

Flow Integration & Apex Action Guide

Generate and update Apple Wallet and Google Wallet passes directly from a Salesforce Flow — no custom code required. Based on the Kemicard Apex Action & Custom Configuration Guide (Kemicard v2.27, May 2026).

Overview

Kemicard exposes an Apex Invocable Action for Flow, plus two additional configuration surfaces beyond Kemicard Studio:

  • Kemicard Console → Configuration — controls pass generation behaviour per object (whether to send an email, which wallet platforms to enable).
  • Template record settings — pass-level design properties (restricting pass sharing, suppressing the strip shine effect) not exposed in the Studio builder.

Permission sets & access

Kemicard ships seven permission sets that control access to different parts of the package — assign by role; no custom profile changes are required. A single user can hold multiple sets when their role spans areas (e.g., Kemicard Digital Pass User plus Kemicard Template Configuration).

Seeing FLS errors or "Insufficient Privileges" when a Flow fires? Confirm the running user (or the automation/integration user) has the appropriate Kemicard permission set assigned — the Flow runs in that user's context.

Finding the action in Flow Builder

  1. Open Setup → Flows and open (or create) your Flow.
  2. Add an Action element.
  3. Search for "Generate Pass" or filter the category to Apple Pass.
  4. Select Generate Pass from list of String as pass details.
  5. Map the input and output variables below.
Flow Builder's action search filtered to pass, showing Generate Pass from list of String as pass details
Add an Action, search pass, and pick Generate Pass from list of String as pass details.

Two inputs do almost all the work. configurationId points at the Configuration record that holds the field bindings and email settings; whatId is the record the pass is generated from.

The Generate Pass action's input values with configurationId highlighted
Set Input Values. configurationId is the one that matters; doNotCreateAppleWalletPass and doNotCreateGoogleWalletPass let you suppress one platform.
The whatId input and the Store Output Values panel on the Generate Pass action
whatId is whichever object you want to generate the pass from and send the email to. Store the output — that is the new Pass record Id.
Keep it simple with configurationId: for most flows you only need to provide configurationId and whatId — everything else is read from the Configuration record automatically.

Return value — and why you should save it

The action returns a Text value containing the Salesforce record ID of the created or updated Pass. Store it in a Text variable (e.g., PassId) and write it back to your object with an Update Records element. Storing the Pass ID lets future flow runs detect that a pass already exists and perform an update (including push notifications) instead of creating a duplicate.

Example flow patterns (shipped with the package)

Five example flows ship as unmanaged metadata when you select the Sample Data option during install. They form a deliberate hierarchy: Send Membership Pass is the core flow that invokes the Apex Action; every other entry point calls it as a subflow, keeping pass-generation logic in one place.

FlowTypeWhat it demonstrates
Send Membership Pass (core)AutolaunchedInvokes the Apex Action. Accepts an optional ConfigurationId; when blank, it falls back to reading the configuration from the Contact's linked template — reusable across template setups.
Send Membership Pass From CheckboxRecord-triggered (Contact, after save)Fires when Send_Membership_Pass__c changes to true; delegates to the core subflow, then resets the checkbox so subsequent saves don't create duplicate passes.
ContactMessagingScreenFlowScreen flowStaff-facing UI to send a pass or message from a Contact record.
Update Contact Google and Apple Wallet URLAutolaunchedWrites the generated wallet URLs back onto the Contact for use in emails and portals.
Kemicard Expired Member Scan ProcessorAutolaunchedHandles scans of expired members — the pattern for scan-driven automation.

Building a Configuration, step by step

A Configuration is what configurationId resolves to, and it is created through a five-step wizard in Kemicard Console → Configuration. Each step decides one thing.

Configuration wizard step 1, Object Selection and Description, with Contact chosen
1. Object Selection. Which object the pass is generated from — Contact here — plus a name and description.
Configuration wizard step 2, Pass and Template Pass Selection
2. Pass & Template Pass Selection. Which field on the record holds the resulting Pass, and which holds the template. Create them here if they do not exist yet.
Configuration wizard step 3, Apple and Google Wallet Selection with attachment options
3. Apple & Google Wallet. Enable each platform independently, and decide whether the generated pass is attached to the record, to the email, or both.
Configuration wizard step 4, Event and Relevant Date Selection with the email field
4. Event & Relevant Date. The email field the enrollment message goes to, plus the relevant and expiration date fields.
Configuration wizard step 5, Scanner and Campaign Manager flow selection
5. Scanner & Campaign Manager. Which flow each one runs. Save & Finish writes the Configuration.
Set the email template before you use Campaign Manager. A Configuration with no email template is the most common cause of an immediate bulk failure — see Campaign Manager.

Template-level settings (not in the Studio)

  • Apple Wallet — advanced: sharing prohibited, suppress strip shine, grouping identifier, max distance, label/strip colors (strict rgb(R, G, B) format — no decimals).
  • Google Wallet — advanced: Smart Tap (NFC terminal data), state handling (inactive objects move to "Expired passes"), hero/detail imagery.
  • Shared: relevant date, expiration date, from-address settings.

Reference screens

A Salesforce Flow that gets the contact, checks whether a configuration is set, resolves the template and creates the pass
A complete example flow: get the contact, branch on whether a configuration is set, resolve the template, then create and email the pass.
The Kemicard Console Configuration tab listing the Contact configuration record
Kemicard Console → Configuration. The configuration record is what the Flow action resolves against.

Related: Architecture & upsertPasses · API Reference · Campaign Manager

Kemicard with Salesforce Marketing Cloud

Passes slot into Marketing Cloud journeys as both a channel and a trigger. The common patterns:

  • Issue on journey entry — when a contact enters a welcome or renewal journey, a Flow (fired from the journey's Salesforce activity) generates the pass and sends the enrollment email, so the add-to-wallet link rides your existing journey emails.
  • Push as a journey step — use pass push notifications alongside email and SMS: a lock-screen message for the time-sensitive touch, email for the detail. The pass channel has no per-message cost.
  • Engagement data back to journeys — installs, scans, and check-ins land on the Salesforce record, where journey entry criteria and decision splits can read them: re-target members whose pass isn't installed, or branch on event attendance.
Where it runs: Kemicard's automation lives in Salesforce core (Flow/Apex); Marketing Cloud connects through Marketing Cloud Connect the same way it reaches any CRM data — no extra Kemicard integration required.