Certificates are official documents that participants receive after successfully completing a training or e-learning course. In Pluvo, certificates are issued based on a predefined template (design). These are then automatically or via a mutation assigned to users. Certificates subsequently appear as a PortfolioItem.
Use this query to retrieve available certificates and their id
. You'll then use this id
when issuing via a mutation.
query {
certificates {
edges {
node {
id
name
title
}
}
}
}
Use the generateCertificate
mutation to assign an existing certificate to one or more users. You can optionally link a training and provide a specific issue date.
mutation {
generateCertificate(
id: "uuid-certificate-template"
title: "Project Management Certificate"
userIds: ["uuid-user"]
trainingId: "uuid-training"
issueDate: "2024-01-01T00:00:00Z"
) {
bulkGenerate {
succeededIds
failedIds
}
}
}
certificates(first: Int, after: String, last: Int, before: String): CertificateConnection
This query returns a list of available certificates (templates) as a connection, following the GraphQL Relay-specific pattern. This provides support for cursor-based pagination via first
, after
, last
, and before
.
type CertificateConnection {
pageInfo: PageInfo!
edges: [CertificateEdge]!
count: Int
}
type CertificateEdge {
node: Certificate
cursor: String!
}
type PageInfo {
hasNextPage: Boolean!
hasPreviousPage: Boolean!
startCursor: String
endCursor: String
}
query {
certificates(first: 10) {
edges {
node {
id
name
title
}
cursor
}
pageInfo {
hasNextPage
endCursor
}
count
}
}
You can use endCursor
as the after
value for the next page, and in this way browse through all certificates.
generateCertificate(
id: UUID!,
title: String,
userIds: [UUID!]!,
trainingId: UUID,
issueDate: DateTime
): GenerateCertificate
Issues the specified certificate to one or more users.
type Certificate {
id: UUID!
name: String
title: String
}
type GenerateCertificate {
bulkGenerate: BulkAction!
}
type BulkAction {
succeededIds: [UUID!]!
failedIds: [UUID!]!
}
generateCertificate
mutation to assign certificates.createPortfolioItem
is not correct and is not recommended.EVENT_CERTIFICATE_ACHIEVED
to receive notifications of automatic issuance.