Integrate with external publishing system

A step-by-step tutorial to integrate your external publishing system

Sirius offers a bidirectional communication system with any publishing system. It gives you the opportunity to synchronize work with the entire newsroom.

Internally Sirius uses a branch system to make it possible. When a periodical publication is linked to the article, Sirius automatically creates a branch of that periodical. It is possible to subscribe to this branch and to submit changes to this branch. When a branch is updated by Sirius (manually using "Print export button" or automatically), an "articleBranch" event is emitted with a "published" action. Using a updateBranch mutation it is possible to update a branch. Changes are automatically visible in Sirius. As soon as a branch has been updated, Sirius does not synchronize it anymore. It means you will not receive any "articleBranch.published" after your first updateBranch.

Receive article from Sirius

Subscribe to "articleBranch" event

  • Manage your apps (https://*.sirius.press/cms-client/admin/apps)
  • Select "Branche d’article" event
  • events contains branch data (title, chapo, blocks...), query API for missing fields
  • Event > articleBranch
  • Add a status to inform users when success copies or failed

Export statuses

see App documentation for further details & watch the "Apps & Events" screencast

Trigger event

Export print

  1. Create "print" export
  2. Select which periodical, section and edition date (see https://*.sirius.press/cms-client/admin/periodicals to manage periodicals)

or from API with updateArticle mutation:

  1. Then export to your print system
  2. Well received ✅

Article print edition

At this moment, Sirius has no more control in the article, it follows your print system life-cycle...

Printing

Before sending back article, you have to register your external workflow state into Sirius.

Register external workflow state

Register external workflow state

These records will be useful while you update article "print" branch to inform version state. State will be displayed directly into Sirius article version panel (with chosen acronym + color)

Query Article branches

Once article has related periodical (periodicalId), you able to query article branches.

⚠️ Currently, articles have only one branch for printing

query {
node(id: "<Article ID>") {
id
... on Article {
branches {
published
firstPublishedAt
publishedAt
article {
id
}
title
chapo
blocks {
id
}
featureImage {
image {
id
}
}
periodical {
id
}
periodicalSection {
id
}
periodicalSectionLayout {
id
}
periodicalRelease {
id
}
periodicalEditionDate
externalWorkflowState {
id
}
}
}
}
}

Update article print branch

Article branch

Now, you can update your article print branch !

For instance:

  • Redefined title & chapo
  • Created four new blocks
  • set new external workflow state
mutation {
updateArticleBranch(
input: {
articleId: "<Article ID>"
title: "New title"
chapo: "New chapo"
blocks: [
{ type: text, textBlock: { textType: paragraph, html: "block text" } }
{ type: image, imageBlock: { imageView: { imageId: "<Image ID>" } } }
{
type: link
linkBlock: {
url: "https://twitter.com/LarsJohanL/status/1543612532291674115"
}
}
{ type: separator }
#...
]
externalWorkflowStateId: "<Previously created external workflowState ID>"
}
) {
featureImage {
image {
id
}
}
article {
id
}
publishedAt
firstPublishedAt
published
title
blocks {
... on TextBlock {
textType
html
styleName
}
... on ImageBlock {
imageView {
image {
id
}
croppings {
aspectRatio {
key
}
width
height
top
left
}
defaultCropping {
aspectRatio {
key
}
width
height
top
left
}
caption
url(width: 20, height: 50)
}
caption
position
size
}
... on LinkBlock {
url
... on ArticleLinkBlock {
title
article {
id
}
displayMode
prefix
}
... on TweetLinkBlock {
tweet {
id
}
}
... on VideoLinkBlock {
video {
id
}
}
}
... on SnippetBlock {
snippet {
id
}
}
... on ProductBlock {
product {
id
}
}
... on ProductSummaryBlock {
productSummary {
id
name
}
}
}
}
#...
}

If you don't pass blocks, title and/or chapo in input, these will be copied from previous version

On Sirius

Go on your article > Select "Historique" > "Versions" tab. Here, you are able to visualize your changes, and restore article from this version.

Article version panel This panel will be upgrade soon! Better branches visualization, and so on

You're now able to integrate your external publishing system 🚀

Edit this page on GitHub