Skip to content

CampusTech/zp2fo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zp2fo

Syncs Zoom Phone users (grouped by department) into First Orion INFORM as Business Units, Programs, and registered phone numbers — enabling branded caller ID for outbound calls.

How it works

  1. Fetches all Zoom Phone users and their assigned numbers
  2. Groups users by department to build a desired First Orion state
  3. Diffs against the current FO state (Business Units, Programs, phone numbers)
  4. Creates/deletes Business Units, Programs, and number registrations to converge

Installation

go install github.com/CampusTech/zp2fo@latest

Or build from source:

git clone https://github.com/CampusTech/zp2fo
cd zp2fo
go build -o zp2fo .

Setup

1. Zoom credentials

Create a Server-to-Server OAuth app in the Zoom Marketplace:

  • Scopes required: phone:read:list_users, phone:read:list_numbers
  • Note the Account ID, Client ID, and Client Secret

2. First Orion credentials

Obtain from your First Orion account:

  • API Key and Secret Key for authentication
  • Business ID of your pre-existing FO Business entity

3. Configure

cp config.yaml.example ~/.zp2fo.yaml
$EDITOR ~/.zp2fo.yaml

Or set credentials via environment variables (see Configuration below).

4. Run

# Preview changes without writing anything
zp2fo sync --dry-run

# Apply
zp2fo sync

Commands

sync

Syncs Zoom Phone departments and numbers to First Orion.

zp2fo sync [flags]
Flag Description
--dry-run Print planned changes without writing to First Orion
--debug Enable HTTP trace logging
--limit N Limit sync to the first N users with phone numbers
--phone-number E.164 Limit sync to the single user owning this number

cleanup

Lists all First Orion display name assets and their approval status (APPROVED, PENDING, REJECTED). Use this to find approved display_name_content_id values for your config.

zp2fo cleanup

link-branded

Links Zoom phone numbers to First Orion branded calling programs via the Zoom CP API. Requires a short-lived JWT from an authenticated browser session at us01cp.zoom.us.

zp2fo link-branded --jwt <token> [--phone-number E.164]

token

Prints a First Orion access token — useful for testing API calls with curl.

zp2fo token

Configuration

Config is loaded from ~/.zp2fo.yaml by default. Override with --config path. All credential fields can be set via environment variable instead of the config file.

Config key Env var Description
zoom.account_id ZOOM_ACCOUNT_ID Zoom Server-to-Server OAuth account ID
zoom.client_id ZOOM_CLIENT_ID Zoom OAuth client ID
zoom.client_secret ZOOM_CLIENT_SECRET Zoom OAuth client secret
first_orion.api_key FIRST_ORION_API_KEY First Orion API key
first_orion.secret_key FIRST_ORION_SECRET_KEY First Orion secret key
first_orion.business_id FIRST_ORION_BUSINESS_ID First Orion Business ID
first_orion.brand_name FIRST_ORION_BRAND_NAME Brand name prefix for caller IDs
first_orion.fallback_department FIRST_ORION_FALLBACK_DEPARTMENT Department for users with no Zoom department set

See config.yaml.example for the full set of options including per-department overrides.

Logo / display name setup

Logos and display name assets must be pre-approved by First Orion before use:

  1. Upload an SVG via the FO portal and wait for APPROVED status
  2. Run zp2fo cleanup to list assets and find the contentId
  3. Set first_orion.image_content_id (global) or per-department in config

License

MIT

About

Sync Zoom Phone departments to First Orion INFORM for branded caller ID

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages