# Snippet details

```
// window.zengain.initialize({
    apiKey: 'YOUR_API_KEY',
    user: {
      firstName: 'John', // Required: First name of the user
      lastName: 'Doe', // Required: Last name of the user
      email: 'john.doe@example.com', // Required: User's email address,
      refId: 'user-abc123', // Optional: Unique identifier for the user
      title: 'Manager' // Optional: User's job title or role in the company
    },
    subscription: {
      refId: 'sub-67890', // Required: Unique identifier for the subscription
      offering: {
        sku: 'PROD1234', // Recommended: Product SKU or identifier
        name: 'Premium Plan 1m trial' // Required: Name of the service offering
      },
      startDate: '2024-01-01', // Recommended: Subscription start date (YYYY-MM-DD format)
      endDate: '2025-01-01', // Required: Subscription end date (YYYY-MM-DD format)
      type: 'trial', // Required: Subscription type (e.g., trial, paid)
      customer: {
        name: 'Acme Corp', // Required: Customer name
        accountRefId: '12345' // Required: Unique identifier for the customer account
      }
    },
    session: 'session-xyz789' // Optional: Unique session ID for the current user session
  });
```

#### User details:

<mark style="color:red;">firstName: 'John', // Required: First name of the user</mark>\ <mark style="color:red;">lastName: 'Doe', // Required: Last name of the user</mark>\ <mark style="color:red;">email: 'john.doe@example.com', // Required: User's email address,</mark>\
refId: 'user-abc123', // Optional: Unique identifier for the user\
title: 'Manager' // Optional: User's job title or role in the company

#### Subscription:&#x20;

<mark style="color:red;">refId: 'sub-67890', // Required: Unique identifier for the subscription</mark>

#### Offering:&#x20;

sku: 'PROD1234', // Recommended: Product SKU or identifier\
<mark style="color:red;">name: 'Premium Plan 1m trial' // Required: Name of the service offering</mark>

startDate: '2024-01-01', // Recommended: Subscription start date (YYYY-MM-DD format)\
<mark style="color:red;">endDate: '2025-01-01', // Required: Subscription end date (YYYY-MM-DD format)</mark>\ <mark style="color:red;">type: 'trial', // Required: Subscription type (e.g., trial, paid)</mark>

#### Customer:&#x20;

<mark style="color:red;">name: 'Acme Corp', // Required: Customer name</mark>\ <mark style="color:red;">accountRefId: '12345' // Required: Unique identifier for the customer account</mark>

#### Session:&#x20;

session: 'session-xyz789' // Optional: Unique session ID for the current user session

