Skip to main content

Starting New Application Forms

Prerequisites

  • Your application has initialized the Bold Penguin SDK. To learn more, review how to initialize the SDK.
  • The guest has been redirected from your gateway service and your application has stored their auth tokens. To learn more, review how to authenticate guests.

Loading a guest application with a token

The token_id in the redirect URL allows a visitor to edit their application form while they're visiting your storefront. To load the application for them, your storefront application will:

  • Get the current SDK config
  • Get the stored token and token_id for auth
  • Dispatch a Redux store action to load the application form with tokens
import {
getPartnerEngineConfig,
loadSingleApplicationForm,
store
} from '@boldpenguin/sdk-redux';

const newGuestApplicationForm = () => {
const config = getPartnerEngineConfig(store.getState());

const token = getItem('token');
const token_id = getItem('token_id');

const configWithTokens = { ...config, ...{ token, token_id } };

store.dispatch(loadSingleApplicationFormFromToken(configWithTokens));
}