1. Home
  2. Docs
  3. People Ops
  4. Talent Certificate Generator

Talent Certificate Generator

Tutorial: How to Generate Talent Certificate & Send Email using Lovia ERP

Summary:

  1. Ensure you have a Talent document, or create it first
  2. In the Talent document, click Talent > New Certificate
  3. Fill certificate information: Type, Certificate Date, Issuer Name. Check Generated by Talentiva. Fill Role in Event, Event Start Date, Event End Date.
  4. Click Generate Certificate.
  5. Click Menu > Reload.
  6. Click Menu > Email.
  7. Enter the recipient email address.
  8. Select Email Template: Talent Certificate Issued.
  9. Uncheck Attach Document Print.
  10. Check Select Attachments using talentiva_certs_*.pdf.
  11. Click Send.

How It Works Behind The Scenes

  • [x] Use NestJS
  • [x] Use Fastify
  • [x] JWT token
  • [x] Deploy to AWS Lambda
    • [x] Custom domain
  • [x] Use from Lovia ERP
  • [x] Configure Talentiva.net WordPress redirect
  • [x] Send email directly from Lovia ERP with proper template

certificate2pdf REST API

Our Talent Certificate Generator is called certificate2pdf, implemented using NestJS framework, Fastify, and PDFKit.

The production instance is in https://certificate2pdf.talentiva.net/production and deployed using Serverless Framework to AWS Lambda.

Note: Due to the way AWS API Gateway Binary Media Types work, specific Accept header is required.

POST /production/generatePdf
Accept: application/pdf
Authorization: Bearer 
{
    "awardeeName": "Angela Marpaung",
    "gender": "F",
    "programName": "Internship",
    "role": "Sales Chatbot Engineer",
    "startDate": "2020-01-07",
    "endDate": "2020-02-06",
    "signatureDate": "2020-02-07",
    "certificateUrl": "https://talentiva.net/certs/ABCDEF"
}

Response:

ERPNext Integration

This integration adds a “Generate Certificate” action to Talent Form > Certificates > Talent Certificate. The certificate needs to have “Generated by Talentiva” checked. By performing this action:

  1. ERPNext calls certificate2pdf API with certificate’s information
  2. The resulting PDF file is then saved as (public) Talent Certificate’s attachment using the pattern: /files/talentiva-certificate-CODE.pdf

This pattern is intentional as it enables us to set up regex-based redirection rule: https://talentiva.net/certs/CODE -> https://erp.lovia.life/files/talentiva-certificate-CODE.pdf

Later on, the permalink certificate URL should redirect to talent’s public profile page, but scrolling to the appropriate certificate.

Was this article helpful to you? Yes No

How can we help?

Leave a Reply

Your email address will not be published. Required fields are marked *