Skip to main content

Starting New Application Forms

This section covers how an agent creates a new application form from your custom terminal. If agents have restricted permissions, your Quote Start service will create application forms for users.

Prerequisites

Creating the application form and updating the store

To create and load the application form for the agent, your custom terminal will:

  • Get the current SDK config
  • Send a request to create a new application form
  • Dispatch a Redux store action to load the application form
import {
ApplicationForm,
getPartnerEngineConfig,
loadSingleApplicationForm,
getStore
} from '@boldpenguin/sdk';

const newApplicationForm = async () => {
const store = getStore();
const config = getPartnerEngineConfig(store.getState());

const response = await ApplicationForm.createApplicationForm({}, config);
const newApplicationFormId = response?.parsedBody?.id;

const action = loadSingleApplicationForm({
config,
id: newApplicationFormId
});

store.dispatch(action);
return newApplicationFormId;
}