Skip to content

data

const data: {
submitForm: void;
getProducts: Promise<Product[]>;
getProduct: Promise<Product>;
getLabels: Promise<Label[]>;
getLabel: Promise<Label>;
getFolders: Promise<Folder[]>;
getFolder: Promise<Folder>;
getCustomers: Promise<Customer[]>;
getCustomer: Promise<Customer>;
};

Defined in: domains/data.ts:10

submitForm(formName, formInput): void;

Submit a data capture form event.

Records the form submission in the Mobile Locker analytics pipeline under the 'data-capture' category. Use this to track lead forms, survey responses, or any structured input the user submits during a presentation.

Parameter Type Description
formName string Identifier for the form (e.g. 'lead-form', 'product-interest').
formInput Record<string, unknown> Key/value pairs representing the form fields and their values.

void

mobilelocker.data.submitForm('lead-form', { firstName: 'Jane', email: 'jane@example.com' })
getProducts(): Promise<Product[]>;

Get all products available to the current team.

Promise<Product[]>

Array of Product objects.

MobileLockerError on network failure or server error.

getProduct(id): Promise<Product>;

Get a specific product by ID.

Parameter Type Description
id number The numeric product ID.

Promise<Product>

The matching Product.

MobileLockerError on network failure or if not found.

getLabels(): Promise<Label[]>;

Get all labels available to the current team.

Promise<Label[]>

Array of Label objects.

MobileLockerError on network failure or server error.

getLabel(id): Promise<Label>;

Get a specific label by ID.

Parameter Type Description
id number The numeric label ID.

Promise<Label>

The matching Label.

MobileLockerError on network failure or if not found.

getFolders(): Promise<Folder[]>;

Get all folders in the current user’s library.

Promise<Folder[]>

Array of Folder objects.

MobileLockerError on network failure or server error.

getFolder(id): Promise<Folder>;

Get a specific folder by ID.

Parameter Type Description
id number The numeric folder ID.

Promise<Folder>

The matching Folder.

MobileLockerError on network failure or if not found.

getCustomers(): Promise<Customer[]>;

Get all customers synced for the current user.

Promise<Customer[]>

Array of Customer objects.

MobileLockerError on network failure or server error.

getCustomer(id): Promise<Customer>;

Get a specific customer by their CRM object ID.

Parameter Type Description
id string The CRM object ID (e.g. a Salesforce 18-char ID).

Promise<Customer>

The matching Customer.

MobileLockerError on network failure or if not found.