Superface

Create Lead

recruitment/create-lead@1.0.1
14 providers

Create Lead

Creates a sourced prospect candidate either for some specific job or any job within a company.

Input
Job Id
First Name
Last Name
Email
Phone
Address
Education
Work Experience
Links
CV (Resume)
Source
Result
Id
Job Id
Rate limit

1.Choose a provider

2.Use CreateLead with mock in your code

Below instructions are for our Node.js SDK. Use OneService for other languages.
npm i @superfaceai/one-sdk
const { SuperfaceClient } = require('@superfaceai/one-sdk');

// You can manage tokens here: https://superface.ai/insights
const sdk = new SuperfaceClient({ sdkAuthToken: '<< Login to get your token >>' });

async function run() {
  // Load the profile
  const profile = await sdk.getProfile('recruitment/create-lead@1.0.1');

  // Use the profile
  const result = await profile
    .getUseCase('CreateLead')
    .perform({
      jobId: 'JOB_ID',
      firstName: 'Demo',
      lastName: 'Testing',
      email: 'demo_testing@fakemail.com'
    }, {
      provider: 'mock'
    });

  // Handle the result
  try {
    const data = result.unwrap();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

run();

Structure details

Input (object)

jobId
Unique identifier of a job that the lead is a good prospect for.
firstName
First name of a lead.
lastName
Last name of a lead.
email
Email of a lead.
phone
Phone number of a lead.
address
Address of a lead.
education
List of sourced education experiences relevant to lead.
id
Unique identifier of lead's education experience.
school
Name of a school.
degree
Degree aquired by finishing lead's education.
fieldOfStudy
Name of a field studied in lead's education.
startedAt
ISO8601 timestamp when the education started.
endedAt
ISO8601 timestamp when the education ended.
workExperience
List of sourced work experiences relevant to lead.
id
Unique identifier of lead's work experience.
position
Name of position, lead has occupied.
summary
Summary of lead's work experience.
company
Name of company.
industry
Name of industry, the company worked in.
current
Boolean representing whether lead still work there.
startedAt
ISO8601 timestamp when lead started working.
endedAt
ISO8601 timestamp when lead stoped working.
links
List of sourced links relevant to lead. Can contain links to social profiles, portfolios or other.
name
Descriptive name of a link to some URL.
url
Actual URL destination of the link.
cv
Object containing either URL to a CV or data encoded in Base64 format with CV document and name with the file name.
source
Name or list of names, with sources from where this lead comes from.

Example

{
  "jobId": "JOB_ID",
  "firstName": "Demo",
  "lastName": "Testing",
  "email": "demo_testing@fakemail.com"
}

Result (object)

id
Unique identifier of a lead
jobId
Unique identifier of a job that the lead is a good prospect for.
rateLimit
Rate limit details.
bucket
Different parts of API may have different rate limits. Bucket identifies to which part of API the rate limits apply.
totalRequests
Total requests available in the time window.
remainingRequests
Remaining requests available in the time window.
remainingRequestsPercentage
Remaining requests available in the time window in percents.
resetTimestamp
Timestamp when the rate limits will reset (in Unix Timestamp format). Available only for providers without rolling rate limit window.

Example

{
  "id": "LEAD_ID",
  "jobId": "JOB_ID"
}

Implementation details

Provider
mock
Use case
CreateLead
Author
@superface
Source
Verified