This codelab guides you through building a Zoom Contact Center app with Next.js. The sample application serves as a boilerplate showing how to extend a web application into the Zoom client and integrate with various Zoom services. You'll learn to create a Zoom Marketplace app using the Zoom Manifest API and display your Contact Center application within the Zoom client. This tutorial also covers core concepts for creating engaging experiences in Zoom Workplace—including Zoom Contact Center Apps.

⚠️ Warning: Some feature requires a paid plan.

💡 Tip: If you don't have a paid workspace for development, you can join by signing up for a free Zoom account, which provides access to all Zoom Developer platform features. To learn more about powering your service with Zoom, visit Zoom for Startups.

✓ How to build a Zoom Contact Center app

✓ How to implement secure API communication by configuring proper OAuth scopes and webhook endpoints.

✓ How to manage manifest versioning to maintain your app's functionality during updates.

What you'll Need

Prerequisites

Ngrok is a tool that creates secure tunnels to your local development server, allowing you to expose your localhost to the internet over HTTPS. It's especially useful for testing webhooks, APIs, or any feature that requires a publicly accessible URL during development.

In this tutorial, ngrok is used to serve the sample Zoom App over HTTPS. This is a requirement for all Zoom Apps, as they must be hosted on a secure (HTTPS) endpoint in order to be embedded within the Zoom client and interact with Zoom services.

Run:

ngrok http 3000

Ngrok will output the origin it has created for your tunnel, eg https://9a20-38-99-100-7.ngrok.io. You should see the tunnel traffic:

Use your ngrok URL

After starting ngrok, you'll get a public HTTPS URL like https://9a20-38-99-100-7.ngrok.io. Use those origins for any Zoom Manifest or configuration that requires a secure URL.

Replace any placeholder URL such as https://example.ngrok.io with your actual ngrok-generated URL.

For example:

"https://example.ngrok.io" → "https://9a20-38-99-100-7.ngrok.io"

Make sure to update all instances in your manifest file, environment variables, and redirect URIs accordingly.

App manifests are JSON files that define the configuration of Zoom App Marketplace apps.

Manifest schema

Manifests are JSON-formatted configuration files for Zoom Apps. You can use a manifest to create a general app via the Marketplace build flow or API, or to update the configuration of an existing general app. Manifests are portable, allowing you to share and reuse them across environments.

In this section, you will create a user-managed Zoom App Marketplace general app and configure it with Zoom App and Team Chatbot features.

Create your App: How to Create and Configure a Zoom App (User-Managed) with the Manifest API

  1. Visit the Zoom App Marketplace
  2. Start Building a New App
    • Click the "Develop" dropdown in the top-right.
    • Select "Build App".
  3. Choose App Type:
    • When prompted to choose an app type, select "General App" unless you have a specific use case.
    • Click "Create".
  4. Choose App Management Type
    • Select User-managed App. This allows individual users to install and authorize your app to access their Zoom data — similar to apps accessing a user's Google Drive or Gmail
  5. Configure Basic App Information
    • On the "Basic Information" page:
    • Scroll down to the Redirect URL for OAuth section. For testing with Postman, add the Postman redirect URI:
https://oauth.pstmn.io/v1/callback

  1. Get App ID from URL: App ID
  2. Make a PATCH request to update the app (test with Postman). After configuring the app, test it by sending a PATCH request to Zoom's API to update your app metadata or description.

Example Postman setup:

Use the Ngrok output origins created for your tunnel, eg https://9a20-38-99-100-7.ngrok.io:

{
  "manifest": {
      "display_information": {
          "display_name": "ZCC-NextJS-Sample"
      },
      "oauth_information": {
          "usage": "USER_OPERATION",
          "development_redirect_uri": "https://oauth.pstmn.io/v1/callback",
          "production_redirect_uri": "",
          "oauth_allow_list": [
              "https://oauth.pstmn.io/v1/callback"
          ],
          "strict_mode": false,
          "subdomain_strict_mode": false,
          "scopes": [
              {
                  "scope": "user:read:user",
                  "optional": false
              },
              {
                  "scope": "marketplace:read:app",
                  "optional": false
              },
              {
                  "scope": "marketplace:write:app",
                  "optional": false
              }
          ]
      },
      "features": {
          "products": [
              "ZOOM_CONTACT_CENTER"
          ],
          "development_home_uri": "Your.domain.ngrok.app",
          "production_home_uri": "",
          "domain_allow_list": [
              {
                  "domain": "appssdk.zoom.us",
                  "explanation": ""
              },
              {
                  "domain": "Your.domain.ngrok.app",
                  "explanation": ""
              }
          ],
          "in_client_feature": {
              "zoom_app_api": {
                  "enable": true,
                  "zoom_app_apis": [
                      "connect",
                      "getEngagementContext",
                      "getEngagementStatus",
                      "getRunningContext",
                      "getSupportedJsApis",
                      "getUserContext",
                      "onConnect",
                      "onEngagementContextChange",
                      "onEngagementMediaRedirect",
                      "onEngagementStatusChange",
                      "onEngagementVariableValueChange",
                      "onMyUserContextChange"
                  ]
              },
              "guest_mode": {
                  "enable": false,
                  "enable_test_guest_mode": false
              },
              "in_client_oauth": {
                  "enable": false
              },
              "collaborate_mode": {
                  "enable": false,
                  "enable_screen_sharing": false,
                  "enable_play_together": false,
                  "enable_start_immediately": false,
                  "enable_join_immediately": false
              }
          },
          "zoom_client_support": {
              "mobile": {
                  "enable": false
              },
              "zoom_room": {
                  "enable": false,
                  "enable_personal_zoom_room": false,
                  "enable_shared_zoom_room": false,
                  "enable_digital_signage": false,
                  "enable_zoom_rooms_controller": false
              },
              "pwa_client": {
                  "enable": false
              }
          },
          "embed": {
              "meeting_sdk": {
                  "enable": false,
                  "enable_device": false,
                  "devices": []
              },
              "contact_center_sdk": {
                  "enable": false
              },
              "phone_sdk": {
                  "enable": false
              }
          },
          "team_chat_subscription": {
              "enable": false,
              "enable_support_channel": false,
              "shortcuts": []
          },
          "event_subscription": {
              "enable": false,
              "events": []
          }
      }
  }
}

Resource:

  1. Update an app by manifest API

Agents are internal team members who use ZCC to engage with external users. Depending on the workflow and environment, agents typically operate in the following contexts:

Zoom Workplace App: For a native experience, agents use the Zoom Contact Center desktop interface. You can enhance this experience by building Zoom Contact Center Apps, which embed your custom web tools directly into the agent's call UI — enabling a seamless, "single pane of glass" workflow that reduces context-switching and boosts productivity.

CRM Integration: Use the Zoom Contact Center API endpoints and events to integrate access to Contact Center features and data directly into your application. See the Zoom Contact Center Support page for further details on CRM integraton.

Account Setup

  1. Add User : Start tunnel
  2. Add Queue: Queue
  3. Add Number: Add Number
  4. Assign Number: Assign Number
  5. Add Agent Profile (Optional): Assign agent
  6. Flow - Configure Queue: Configure Queue
  7. Integration: Integration
  8. Add Zoom Apps: Add Zoom Apps
  9. Manage/Add Queues: Integration

Zoom Contact Center engagment compoment

Create oom Contact Center engagment compoment

"use client";

import * as React from "react";
import { useCallback, useEffect, useMemo, useState } from "react";

import zoomSdk from "@zoom/appssdk";

import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Label } from "@/components/ui/label";
import { Textarea } from "@/components/ui/textarea";
import { Input } from "@/components/ui/input";
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";
import { Checkbox } from "@/components/ui/checkbox";
import { Slider } from "@/components/ui/slider";

type EngagementStatusState = "start" | "hold" | "resume" | "end" | string;

type EngagementContextPayload = {
  engagementContext: {
    engagementId: string;
    queueName?: string;
  };
};

type EngagementStatusPayload = {
  engagementStatus: {
    state: EngagementStatusState;
  };
};

type FormData = {
  text: string;
  date: string;
  contactMethod: "email" | "phone" | "";
  interests: string[];
  range: number;
};

const DEFAULT_FORM: FormData = {
  text: "",
  date: "",
  contactMethod: "",
  interests: [],
  range: 50,
};

const isBrowser = typeof window !== "undefined";
const storageKey = (id: string) => `zcc-engagement:${id}`;

export default function Engagement() {
  const [engagementId, setEngagementId] = useState<string>("");
  const [engagementStatus, setEngagementStatus] = useState<EngagementStatusState>("");
  const [engagementContext, setEngagementContext] = useState<string>("");
  const [config, setConfig] = useState<any>(null);

  // Configure SDK once, then fetch initial context/status
  useEffect(() => {
    let cancelled = false;

    const init = async () => {
      if (typeof zoomSdk?.config !== "function") {
        console.warn("zoomSdk not available (are you outside the Zoom embedded browser?)");
        return;
      }

      const cfg = await zoomSdk.config({
        capabilities: [
          "shareApp",
          "getEngagementContext",
          "getEngagementStatus",
          "onEngagementContextChange",
          "onEngagementMediaRedirect",
          "onEngagementStatusChange",
          "onEngagementVariableValueChange",
        ],
      });

      if (cancelled) return;
      setConfig(cfg);

      const [ctx, status] = await Promise.all([
        zoomSdk.callZoomApi("getEngagementContext") as Promise<EngagementContextPayload>,
        zoomSdk.callZoomApi("getEngagementStatus") as Promise<EngagementStatusPayload>,
      ]);

      if (cancelled) return;
      setEngagementId(ctx?.engagementContext?.engagementId ?? "");
      setEngagementContext(ctx?.engagementContext?.queueName ?? "");
      setEngagementStatus(status?.engagementStatus?.state ?? "");
    };

    init().catch((e) => console.error("Zoom SDK init error:", e));
    return () => {
      cancelled = true;
    };
  }, []);

  // Local storage
  const initialForm = useMemo<FormData>(() => DEFAULT_FORM, []);
  const [formData, setFormData] = useState<FormData>(initialForm);

  const loadFromStorage = useCallback((id: string) => {
    if (!isBrowser || !id) return DEFAULT_FORM;
    try {
      const raw = localStorage.getItem(storageKey(id));
      if (!raw) return DEFAULT_FORM;
      const parsed = JSON.parse(raw) as Partial<FormData>;
      return {
        text: parsed.text ?? "",
        date: parsed.date ?? "",
        contactMethod: (parsed.contactMethod as FormData["contactMethod"]) ?? "",
        interests: Array.isArray(parsed.interests) ? parsed.interests : [],
        range: typeof parsed.range === "number" ? parsed.range : 50,
      } satisfies FormData;
    } catch {
      return DEFAULT_FORM;
    }
  }, []);

  const persistToStorage = useCallback(
    (id: string, patch: Partial<FormData>) => {
      if (!isBrowser || !id) return;
      try {
        const current = loadFromStorage(id);
        const next = { ...current, ...patch };
        localStorage.setItem(storageKey(id), JSON.stringify(next));
      } catch {
        // no-op
      }
    },
    [loadFromStorage]
  );

  const handleChange = useCallback(
    <K extends keyof FormData>(field: K, value: FormData[K]) => {
      setFormData((prev) => {
        const next = { ...prev, [field]: value };
        if (engagementId) persistToStorage(engagementId, { [field]: value } as Partial<FormData>);
        return next;
      });
    },
    [engagementId, persistToStorage]
  );

  const handleCheckboxToggle = useCallback(
    (value: string, checked: boolean) => {
      setFormData((prev) => {
        const nextInterests = checked
          ? Array.from(new Set([...prev.interests, value]))
          : prev.interests.filter((v) => v !== value);
        const next = { ...prev, interests: nextInterests };
        if (engagementId) persistToStorage(engagementId, { interests: nextInterests });
        return next;
      });
    },
    [engagementId, persistToStorage]
  );

  // Reload saved form when engagement changes
  useEffect(() => {
    if (!engagementId) return;
    setFormData(loadFromStorage(engagementId));
  }, [engagementId, loadFromStorage]);

  // Event listeners (only after config is ready)
  useEffect(() => {
    if (!config || typeof zoomSdk?.addEventListener !== "function") return;

    const onContextChange = (event: EngagementContextPayload) => {
      try {
        setEngagementId(event?.engagementContext?.engagementId ?? "");
        setEngagementContext(event?.engagementContext?.queueName ?? "");
      } catch (err) {
        console.error("Error handling engagement context change:", err);
      }
    };

    const onStatusChange = (event: EngagementStatusPayload) => {
      try {
        const state = event?.engagementStatus?.state ?? "";
        setEngagementStatus(state);
        if (state === "end" && engagementId) {
          if (isBrowser) localStorage.removeItem(storageKey(engagementId));
          setFormData(DEFAULT_FORM);
        }
      } catch (err) {
        console.error("Error handling engagement status change:", err);
      }
    };

    zoomSdk.addEventListener("onEngagementContextChange", onContextChange);
    zoomSdk.addEventListener("onEngagementStatusChange", onStatusChange);

    return () => {
      zoomSdk.removeEventListener("onEngagementContextChange", onContextChange);
      zoomSdk.removeEventListener("onEngagementStatusChange", onStatusChange);
    };
  }, [config, engagementId]);

  return (
    <Card className="max-w-3xl mx-auto">
      <CardHeader>
        <CardTitle className="text-xl">ZCC Engagement Notes</CardTitle>
      </CardHeader>
      <CardContent className="space-y-6">
        <div className="text-sm grid gap-1">
          <div><strong>Engagement Id:</strong> {engagementId || "—"}</div>
          <div><strong>Engagement Status:</strong> {engagementStatus || "—"}</div>
          <div><strong>Engagement Context:</strong> {engagementContext || "—"}</div>
        </div>

        <div className="space-y-5">
          <div className="grid gap-2">
            <Label htmlFor="notes"><strong>Text</strong></Label>
            <Textarea
              id="notes"
              value={formData.text}
              onChange={(e) => handleChange("text", e.target.value)}
              className="min-h-48"
              placeholder="Type notes..."
            />
          </div>

          <div className="grid gap-2">
            <Label htmlFor="date"><strong>Choose a Date</strong></Label>
            <Input
              id="date"
              type="date"
              value={formData.date}
              onChange={(e) => handleChange("date", e.target.value)}
              className="w-56"
            />
          </div>

          <div className="grid gap-2">
            <Label><strong>Preferred Contact Method</strong></Label>
            <RadioGroup
              value={formData.contactMethod}
              onValueChange={(v: "email" | "phone") => handleChange("contactMethod", v)}
              className="flex gap-6"
            >
              <div className="flex items-center space-x-2">
                <RadioGroupItem id="contact-email" value="email" />
                <Label htmlFor="contact-email">Email</Label>
              </div>
              <div className="flex items-center space-x-2">
                <RadioGroupItem id="contact-phone" value="phone" />
                <Label htmlFor="contact-phone">Phone</Label>
              </div>
            </RadioGroup>
          </div>

          <div className="grid gap-2">
            <Label><strong>Interests</strong></Label>
            <div className="flex flex-wrap gap-6">
              {["coding", "music", "sports"].map((opt) => {
                const checked = formData.interests.includes(opt);
                return (
                  <div key={opt} className="flex items-center space-x-2">
                    <Checkbox
                      id={`interest-${opt}`}
                      checked={checked}
                      onCheckedChange={(v) => handleCheckboxToggle(opt, Boolean(v))}
                    />
                    <Label htmlFor={`interest-${opt}`} className="capitalize">
                      {opt}
                    </Label>
                  </div>
                );
              })}
            </div>
          </div>

          <div className="grid gap-2">
            <Label><strong>Set a Range</strong> <span className="opacity-70">({formData.range})</span></Label>
            <Slider
              value={[formData.range]}
              min={1}
              max={100}
              step={1}
              onValueChange={(vals: number[]) => handleChange("range", vals[0] ?? 50)}
              className="max-w-md"
            />
          </div>
        </div>
      </CardContent>
    </Card>
  );
}


Congratulations! You have successfully built a multi-feature Zoom app using a manifest file.

To continue learning and extend your app's capabilities, explore the following resources:

Learn more