Adding action steps in advanced workflows

Kentico EMS required

Features described on this page require the Kentico EMS license.

­­­­­­­­­­­­­­­­This chapter describes how to enhance a workflow process with configurable automatic actions.

Using action steps, you can automate tasks that editors would have normally had to do manually after a document reached a certain step. For example, you might want to move a document to another section of the site the moment it reaches the Archived step. Advanced workflow makes this possible with the Move document action step.

The following is a list of all available action steps:

  • Copy document - copies a specified document to another location.
  • Delete document - deletes a specified document.
  • Import translation - imports translations of the document that are ready.
  • Link document - creates a linked document.
  • Move document - moves a specified document to another location.
  • Publish to Facebook - automatically sends a predefined post on Facebook.
  • Publish to Twitter - automatically sends a predefined post on Twitter.
  • Send for translation - submits a document for translation using the specified translation service.
  • Send e-mails - sends e-mails based on a specified e-mail template.
  • Send notification e-mails - sends e-mails according to the e-mail settings defined for the step that immediately follows.
  • Set document property - assigns a specified value to a document’s property.
  • Synchronize document - synchronizes a specified document to all enabled staging servers on the site the document is on.

For information how to add and configure a particular action step, refer to its respective section of this topic.

Manipulating documents within a workflow process

Copying a document

  1. Drag and drop the Copy document step onto the grid.
  2. Connect the step with a preceding step and optionally with a following step.
  3. Edit the step ().
  4. (Optional) Specify the document that you want to copy using the following properties:
    • Source site - site that the document should be copied from. If you don’t specify a site, the current site will be used.
    • Source path - path to the document that should be copied. If you don’t specify a document, the current document (i.e., the one that reaches the step) will be used.
  5. (Optional) Adjust the following properties:
    • Include child documents - copies also all child documents of the copied document.
    • Copy permissions - prevents resetting permissions for the document.
  6. Specify the document under which you want to make the copy using the following properties:
    • (Optional) Target site - site that contains the parent document for the copy. If you don’t specify a site, the current site will be used.
    • Target path - path to the parent document for the copy.
  7. Click Save.

Moving a document

  1. Drag and drop the Move document step onto the grid.
  2. Connect the step with a preceding step and optionally with a following step.
  3. Edit the step ().
  4. (Optional) Specify the document that you want to move using the following properties:
    • Source site - site that the document should be moved from. If you don’t specify a site, the current site will be used.
    • Source path - path to the document that should be moved. If you don’t specify a document, the current document (i.e., the one that reaches the step) will be used.
  5. (Optional) Adjust the following properties:
    • Only child documents - makes the action step move only the child documents of the specified document and not the document itself.
    • Preserve permissions - moves the document without resetting its permissions.
  6. Specify the document under which you want to move the document:
    • (Optional) Target site - site that contains the parent document for the move. If you don’t specify a site, the current site will be used.
    • Target path - path to the parent document for the move.
  7. Click Save.

Creating a linked document

  1. Drag and drop the Link document step onto the grid.
  2. Connect the step with a preceding step and optionally with a following step.
  3. Edit the step ().
  4. (Optional) Specify the document that you want to link using the following properties:
    • Source site - site that the document should be linked from. If you don’t specify a site, the current site will be used.
    • Source path - path to the document that you want to link. If you don’t specify a document, the current document (i.e., the one that reaches the step) will be used.
  5. (Optional) Adjust the following properties:
    • Include child documents - creates also links to the child documents of the document.
    • Copy permissions - copies the permissions for the document to the linked document.
  6. Specify the document under which you want to create the link:
    • (Optional) Target site - site that contains the parent document for the link. If you don’t specify a site, the current site will be used.
    • Target path - path to the parent document for the link.
  7. Click Save.

Deleting a document

  1. Drag and drop the Delete document step onto the grid.
  2. Connect the step with a preceding step and optionally with a following step.
  3. Edit the step ().
  4. Specify the document that you want to delete using the following properties:
    • Source site - site that the document should be copied from. If you don’t specify a site, the current site will be used.
    • Source path - path to the document that should be copied. If you don’t specify a document, the current document (i.e., the one that reaches the step) will be used.
  5. (Optional) Adjust the following deletion properties:
    • Destroy document - deletes the document without a chance to restore it from the Recycle bin.
    • Delete all culture versions - if the document is translated to more than one culture, the property makes sure that all the culture versions will be deleted.
  6. (Optional) Specify what to do with SKUs (stock keeping units, also known as products) assigned to the deleted documents in the Assigned SKUs section.
  7. (Optional) Define a replacement document for the deleted document. The replacement document will be served when visitors request the deleted document’s URL. You can also adjust the following related settings:
    • Copy all paths - the replacement document will be accessible via all the deleted document’s URLs instead of only the default one.
    • Include child documents - the replacement document will be applied also to child documents of the deleted documents.
  8. Click Save.

Adjusting document properties

You can use the Set document property action step to modify properties of a document, including document type specific fields.

  1. Drag and drop the Set document property step onto the grid.

  2. Connect the step with a preceding step and optionally with a following step.

  3. Edit the step ().

  4. Specify the document that you want to modify using the following attributes:

    • Source site - site that the document is on. If you don’t specify a site, the current site will be used.
    • Source path - path to the document that you want modified. If you don’t specify a document, the current document (i.e., the one that reaches the step) will be used.
  5. Enter the name of the property that you want to modify. To learn what properties documents have, consult Document database structure. The properties are listed in the CMS_Tree and CMS_Document tables.

  6. Enter a new value for the property. Make sure the type of the data you entered matches the data type of the respective database column.

  7. Click Save.

Synchronizing a document to staging servers

You can use the Synchronize document action step to synchronize changes in a specified document to other servers using the Staging.

  1. Drag and drop the Synchronize document step onto the grid.
  2. Connect the step with a preceding step and optionally with a following step.
  3. Edit the step ().
  4. Specify the document that you want to synchronize using the following properties:
    • Source site - site that the document should be synchronized from. If you don’t specify a site, the current site will be used.
    • Source path - path to the document that should be synchronized. If you don’t specify a document, the current document (i.e., the one that reaches the step) will be used.
  5. (Optional) Adjust the following properties:
    • Include child documents - synchronizes also all child documents of the synchronized document.
    • Log update tasks - forces synchronization of documents that don’t have any tasks generated for them. If you turn this setting off, the system will check whether there are any staging tasks generated for the document and synchronize them.
  6. Click Save.

Configuring workflow to automatically post to Facebook and Twitter

You can find more information about the auto post feature at Configuring automatic posting to Facebook or Twitter.

  1. Connect Kentico to Facebook or Twitter using an App.

  2. Create a Facebook page or a Twitter channel. Enable the Default check box when creating the page or channel.

  3. Drag and drop the Publish to Facebook or Publish to Twitter step onto the grid.

  4. Connect the step with a preceding and following step (the best position is before the Publish step).

  5. Edit the workflow step ().

  6. Enter the Text of the message which will be automatically posted on Facebook/Twitter when going to the next step.

    • You can click the provided button to open an editor with a macro selection control to define a message using macros. For example, Check out our new blog post at www.mydomain.com{% GetDocumentURL() %}.
  7. Click Save.

  8. Edit the previous step and set a User action text field to a suitable button text, for example, Publish to Facebook.

    • The default button text, which will be visible to content editors, is Submit for approval.
  9. Click Save.

Configuring workflow to automatically send e-mails

Advanced workflow offers two ways of incorporating sending of e-mails into a workflow process:

  • Send e‑mails action step - sends an e‑mail to specified recipients. You can choose an e-mail template or write the text of the e-mail from scratch.
  • Send notification e‑mails action step - sends e-mails associated with the next step to the content editors, who are allowed to work with documents in the next step of the workflow. You can use this step in a combination with the Wait step or timeout settings to notify users that a document is waiting for their approval for a long time.

Adding a Send e-mails step

  1. Drag and drop the Send e-mails step onto the grid.
  2. Connect the step with a preceding and a following step.
  3. Edit the step ().
  4. (Optional) Enter the sender’s e-mail address. If you don’t enter any address, the value from Settings -> Content -> Content management -> Send workflow e-mails from will be used.
  5. Enter the recipients of the e-mail into the To field. Separate multiple recipients by semicolons.
  6. Specify the text of the e-mail. You have two options:
    • Select an e-mail template or create a new one.
    • Select HTML formatted text in the Based on field and write the text into the text area that appears.
  7. Click Save.

Adding a Send notification e-mails step

  1. Drag and drop the Send notification e-mails step onto the grid.
  2. Connect the step with a step that will precede. This should typically be a Wait step or a step with a defined timeout.
  3. Connect the step with a step that will follow. This is the step that the notification steps will be sent for.

Managing document translations within workflow

You can leverage the following two action steps to facilitate translation of documents within a workflow process:

  • Send for translation - submits the current document for translation using the specified translation service.
  • Import translation - if the current document’s translation is ready, imports the translated data into the respective culture version of the document.

You can find more information about translation services in the Configuring translation services chapter.

Sending a document for translation

  1. Drag and drop the Send for translation step onto the grid.
  2. Connect the step with a preceding and optionally a following step.
  3. Edit the step ().
  4. Set the following attributes:
    • Translation service to use
    • Target language
    • Translate document attributes
    • Priority
    • Translation deadline
    • Instructions for translators
  5. Click Save.

Importing translations

  1. Drag and drop the Import translation step onto the grid.
  2. Connect the step with a preceding and optionally a following step.