---
name: juicebox-core-workflow-b-2f8d8afce1e5
description: |
  Implement Juicebox candidate enrichment workflow.
  Use when enriching profile data, gathering additional candidate details,
  or building comprehensive candidate profiles.
  Trigger with phrases like "juicebox enrich profile", "juicebox candidate details",
  "enrich candidate data", "juicebox profile enrichment".
allowed-tools: Read, Write, Edit, Bash(npm:*), Bash(pip:*), Grep
version: 1.0.0
license: MIT
author: Jeremy Longshore <jeremy@intentsolutions.io>
---

# Juicebox Candidate Enrichment Workflow

## Overview
Enrich candidate profiles with additional data including contact information, work history, and skills verification.

## Prerequisites
- Juicebox SDK configured
- Search workflow implemented (`juicebox-core-workflow-a`)
- Data storage for enriched profiles

## Instructions

### Step 1: Define Enrichment Schema
```typescript
// types/enrichment.ts
export interface EnrichedProfile {
  id: string;
  basicInfo: {
    name: string;
    title: string;
    company: string;
    location: string;
  };
  contact: {
    email?: string;
    phone?: string;
    linkedin?: string;
  };
  experience: WorkExperience[];
  education: Education[];
  skills: Skill[];
  lastEnriched: Date;
}

export interface WorkExperience {
  company: string;
  title: string;
  startDate: string;
  endDate?: string;
  description?: string;
}
```

### Step 2: Implement Enrichment Service
```typescript
// services/enrichment.ts
import { JuiceboxService } from '../lib/juicebox-client';

export class ProfileEnrichmentService {
  constructor(private juicebox: JuiceboxService) {}

  async enrichProfile(profileId: string): Promise<EnrichedProfile> {
    // Fetch full profile details
    const fullProfile = await this.juicebox.getProfile(profileId, {
      include: ['contact', 'experience', 'education', 'skills']
    });

    // Validate and structure data
    const enriched: EnrichedProfile = {
      id: profileId,
      basicInfo: {
        name: fullProfile.name,
        title: fullProfile.title,
        company: fullProfile.company,
        location: fullProfile.location
      },
      contact: {
        email: fullProfile.email,
        phone: fullProfile.phone,
        linkedin: fullProfile.linkedinUrl
      },
      experience: this.parseExperience(fullProfile.workHistory),
      education: this.parseEducation(fullProfile.education),
      skills: this.parseSkills(fullProfile.skills),
      lastEnriched: new Date()
    };

    return enriched;
  }

  async batchEnrich(profileIds: string[]): Promise<EnrichedProfile[]> {
    const batchSize = 10;
    const results: EnrichedProfile[] = [];

    for (let i = 0; i < profileIds.length; i += batchSize) {
      const batch = profileIds.slice(i, i + batchSize);
      const enriched = await Promise.all(
        batch.map(id => this.enrichProfile(id))
      );
      results.push(...enriched);

      // Rate limit protection
      if (i + batchSize < profileIds.length) {
        await sleep(1000);
      }
    }

    return results;
  }
}
```

### Step 3: Store Enriched Data
```typescript
// storage/profiles.ts
export class ProfileStorage {
  async saveEnrichedProfile(profile: EnrichedProfile): Promise<void> {
    await db.profiles.upsert({
      where: { id: profile.id },
      create: profile,
      update: {
        ...profile,
        lastEnriched: new Date()
      }
    });
  }

  async getStaleProfiles(olderThan: Date): Promise<string[]> {
    const stale = await db.profiles.findMany({
      where: {
        lastEnriched: { lt: olderThan }
      },
      select: { id: true }
    });
    return stale.map(p => p.id);
  }
}
```

## Output
- Enriched profile schema
- Batch enrichment service
- Data persistence layer
- Freshness tracking

## Error Handling
| Error | Cause | Solution |
|-------|-------|----------|
| Profile Not Found | Invalid ID | Verify profile exists |
| Partial Data | Limited access | Handle optional fields |
| Rate Limited | Too many requests | Implement backoff |

## Examples

### Enrichment Pipeline
```typescript
const enrichmentService = new ProfileEnrichmentService(juicebox);
const storage = new ProfileStorage();

// Enrich search results
const candidates = await searchPipeline.searchCandidates(criteria);
const profileIds = candidates.slice(0, 20).map(c => c.id);

const enriched = await enrichmentService.batchEnrich(profileIds);

for (const profile of enriched) {
  await storage.saveEnrichedProfile(profile);
  console.log(`Enriched: ${profile.basicInfo.name}`);
}
```

## Resources
- [Profile API Reference](https://juicebox.ai/docs/api/profiles)
- [Enrichment Guide](https://juicebox.ai/docs/enrichment)

## Next Steps
After enrichment, explore `juicebox-common-errors` for error handling patterns.


---
Source attribution: HelixDevelopment
Original project: https://github.com/HelixDevelopment/HelixAgent/blob/2fca246d93eb2b643eb88fb2a91a1d3b0071ae02/skills/plugins/saas-packs/juicebox-pack/juicebox-core-workflow-b/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Dave AI.

## Upstream license notice

MIT License

Copyright (c) 2025-2026 Milos Vasic

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Dave AI resource metadata

Creator / publisher: HelixDevelopment
Original project: https://github.com/HelixDevelopment/HelixAgent/blob/2fca246d93eb2b643eb88fb2a91a1d3b0071ae02/skills/plugins/saas-packs/juicebox-pack/juicebox-core-workflow-b/SKILL.md
Attribution basis: Source repository record

Fields of work: Human Resources, Sales
Roles: Customer Success Manager, HR Generalist, Recruiter
Specialties: Specialty not specified
Tools: Juicebox Sdk
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 5f2be39b9c12ddbf33bef1dee671e9d9de85e8ddac2f6b7ae98e882cac5d9a7a
