Skip to main content
Skip table of contents

Business Rule Automation

A Business Rule can execute actions when certain conditions are met. For each business rule you define general information (name, id, tracing, status), one or more trigger points (update or creation of content items, replacing of a file or via schedules), conditions (what should the business rule check e.g. metadata changed), transformations (e.g. to transform unstructured metadata into structured tags) and actions (that will be executed e.g. remove permissions). 

Business rules always run in the context of the service user (so FULL privileges to ensure that actions can be carried out), an indication that a business rule might have changed content can be found in the activity panel where the updating user would be the service user.

Please contact support@picturepark.com if you have questions or would like to discuss possible business rules for your Picturepark. If available please send over your documented workflows and business processes (BPMN) so we can validate the setup in the Picturepark Content Platform.   

Update a Business Rule
  1. Open Settings > Business Rules

  2. Select your Business Rule

  3. Update

  4. Save

The Business Rule will not execute after a change to the Business Rule, but only triggers when something happens to a Content Item (Create, Update, Replace). 

Delete a Business Rule
  1. Open Settings > Business Rules

  2. Select your Business Rule

  3. Delete

The actions applied will stay, there is no roll-back. 

Create a Scheduler
  1. Open Settings > Business Rules > Schedules

  2. Press Add

  3. See Schedulesfor information regarding each field

  4. Save

Create a Number Sequence
  1. Open Settings > Business Rules > Number sequences

  2. Press Add

  3. See Number Sequences for information regarding each field

  4. Save

Business Rule Use Cases

Business Rule Use Cases

  • Assigning or unassigning permission sets: Removing all or specific permission sets assigned to a content item when a layer is added to the content item. For example, if a user were to add a layer for archiving purposes to a content item, this could then trigger the content to become inaccessible for select user groups.

  • Assigning or unassigning layers and entering field values: This is helpful if, for example, a photographer uploads files and sets certain tags which then in turn add a tag such as “To be approved”. Or, a “multimedia” layer for capturing video-specific information could be added automatically on the upload of video or audio files, already populated with default values such as copyright mentions. This feature only supports static values at the moment, no dynamic values are resolved via the lookup of referenced items; which is scheduled for a later release.

  • Sending messages to integration if particular conditions are met. For example, once the above bespoke photographer has completed his upload, an integrated system can become notified about new content that requires approval, e.g tasking a user with approval via a third-party system.

  • Informing teams such as sales e.g. every Monday about available new product literature.

  • Hiding content that is nearing license expiry dates, and proactively informing the content owner.

  • Publishing content to select stakeholders based on predefined schedules and other criteria.

  • Archiving content by a predefined end-of-life date of e.g. your products.

  • Tagging content “New” when it isn’t older than a few days, or as “For review” when it’s years old.
    Reminding content suppliers to complete their tagging, if not properly done after import.
    Sorting out content that needs a check e.g. when faces are detected without consent data.

  • Tag images with product identifiers, copyrights, and other information: If you have content that carries unique identifiers in the filename or XMP/EXIF metadata then this can be used for automatically tagging such files with e.g. related products, persons, or other identifiable list items in the Content Platform - without any manual work being done. For instance, if a file with the name F-10005900-002_MT-HERS_Apple Gala.psd becomes uploaded then the Business Rule Engine (BRE) will find the corresponding F-10005900-002 information in the file name and tag the file with a related product, like a “Gala” apple in our sample below. The Business rule engine also finds the string MT-HERS in the filename which then assigns the related content classification such as “Hero Shot” in our sample below, and can add default Copyright or License information related to this type of content.

  • Find tags in Title, Description, or full text of a document: Content typed by an editor such as title or other descriptive metadata, or even extracted full-text information form a document or from XMP/EXIF can be analyzed for matching list items with the content becoming tagged correspondingly. The Editor types a text into the title and/or description. On save those strings are parsed against the different caches of the lists “Controlled Vocabulary”, “People” and “Organisation”. The Business Rule Engine is capable of parsing a combination of words against such a cache like “Harry Miller” or “Picturepark AG” and not just “Harry” or “Miller”, and bring back matching tags, as illustrated below. If the Controlled Vocabulary is also translated into German as in our example, a German-speaking user will find content when using German search terms, even with no translated title or description. 

  • Content used in campaigns may become inappropriate and access to the specific content must be removed to ensure that no further marketing material is created using the specific content. Therefore the Layer "ContentStop" can be assigned and triggering a business rule that removes all permission sets, which makes the content only available to content owners. 

  • For videos, the YouTube team must always get access. A business rule can be used to always assign "YouTube"-All-Access for videos only. 

  • Ensure correct permissions for specific teams based on the specific content e.g. access for the multimedia team for multimedia files. 

  • Updates to product images trigger a business process that assigns a "PIM review"-the layer which will trigger a service provider that can connect to the PIM system to get updated product information and another service provider can then send the updated image to the PIM. 

  • The legal department must recall content after a complaint and assigns a "Stop Now"-Layer. The business rule engine can directly restrict access to content and trigger a potential service provider that removes the content from all online sources. 

  • Content suppliers assign a layer to content where copyright information is missing. This layer holds a trigger called "Get Copyright Details" which can be used to trigger a service provider that would then go and fetch copyright details like source and original title and usage restrictions from the corresponding websites. The business rule can be triggered automatically or the content creator can trigger the copyright update when the content is used to avoid copyright infringements. 

  • The service provider for image tagging (AI-powered Clarifai) will assign a layer on import that will hold all automatic tags. Those tags require human review and cleanup. After manual cleanup and removal of wrong tag assignments, a trigger field will start a business rule that copies the reviewed and correct tags into the real metadata layers that are used in the search. 

  • Production process where a storyboard layer contains all information about the next Instagram stories where a trigger button can then start a business process that informs the story creator inside the story creation tool using a service provider from where it is then uploaded back to Picturepark linked to the storyboard information. 

  • Content uploaded to Picturepark is automatically tagged with the correct location tag (if available) based on GPS metadata available on the content. This ensures that 47.3939904,8.0411453,17 is shown as Aarau. 

  • Code Example with Service Provider: 

Best Practice

Best Practice

Every business process inside an organization should be sketched out - for internal documentation and training of new employees.

  • How is new content for the website created?

  • How is the product information data updated?

  • Where does the shop data coming from?

  • How to deal with end-of-life products?

All of those processes involving content like imagery, videos, text and pure data require a business process engine. Picturepark offers a business process engine with a set of business rules which allow automation and more sophisticated integrations. Specific business rules like approval workflows or life cycles can be developed to run in Picturepark only or communicate with external systems via API using service providers. Business rules in Picturepark combined with service providers allow you to convert your content platform into a content hub, that connects your required business systems and send data where it is needed or required. 

Debugging Tips

Debugging Tips

  • If your business rule isn't working first check the platform kibana logs.

  • You always have to assign a layer before adding text to it, or you provide the to-be-assigned-data in the default values for the layer. 

  • Are there any default JSON reserved characters in default value fields that you need to escape? The following characters must be properly escaped to be used in strings:

    • Backspace is replaced with \b

    • Form feed is replaced with \f

    • Newline is replaced with \n

    • Carriage return is replaced with \r

    • Tab is replaced with \t Double quote is replaced with \"

    • Backslash is replaced with \\

  • Required fields need to be added to business rule - if not the business rule process will fail and Kibana logs an error

  • Check that you don't have a duplicate action twice in the same rule, i.e assigning the same tagbox to the same field.

  • Make sure you are using the correct json for translated vs not translated fields.

  • Are your refids in the business rule correct?

  • If you have entered text into a field is it the same case as in the business rule? I.e Title vs title.

Fieldtype Hints

Fieldtype Hints

Check the fields and their individual formats and return values.

A date-time field condition must have the expected value expressed in YYYY-MM-DD and date time as 2019-09-12T17:03:34.5293947Z for example

For Multi Fieldsets or Relationship fields you can add to the condition that the value you are looking for is in the first fieldset by adding the [0] to specify the first fieldset. If you want to search through the second fieldset use [1] e.g:            

          {
                "kind": "FieldValueChangedCondition",
                "fieldPath": "layerWaft.multiFieldsetField[0].street",
                "expectedValue": "StreetName"
            }

If you would like the condition to be checked against any of the fieldsets in that field you can use:

          {
                "kind": "FieldValueChangedCondition",
                "fieldPath": "layerWaft.multiFieldsetField..street",
                "expectedValue": "StreetName"
            }

Fields (tagbox, fieldsets, relationship) can be erased with “value”:null, This requires the field to be configured with the setting replace to true (“replace”:true).

Business Rule Limitations

Business Rule Limitations

  • The Business Rule will not execute after a change to the Business Rule, but only triggers when something happens to a Content Item (Create, Update, Replace). 

  • The actions applied to Content Items will stay applied and not rolled back after deleting or updating a Business Rule. 

  • You cannot format text in notifications (in produce notification action), but you can format the notification text send out via email in Settings > Templates. 

  • Please note the Business Rule settings are only displayed to users that have the system Super Admins role.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.