SOT
    • Introduction
    • Release notes
      • Breaking changes
    • User manual
      • Introduction
      • Navigating Industrial Application System
        • Navigation menu
        • Header
        • Managing favorite menu entries
      • Dashboards
        • Creating a dashboard space
        • Sharing a dashboard space
        • Creating a dashboard
        • Editing a dashboard
        • Applying dashboard filters and templates
        • Marking dashboards as favorites
        • Adding Web Portal widgets
      • User profile
      • Support
      • User help
      • Screen display modes
      • System information
      • System Settings
        • Footer and Privacy
        • Skinning
        • Navigation Menu
    • Operations manual
      • Overview
      • System architecture and interfaces
      • System requirements
        • portal/coreservice
      • Migration from previous versions
        • From 5.24 to 5.25
        • From 5.23 to 5.24
        • From 5.22 to 5.23
        • IAS 2025.01.00 (Portal 5.20)
        • From 5.15 to 5.16
        • Helm job for database migration (>5.15)
        • From 5.14 to 5.15
        • From 5.13 to 5.14
        • From 5.12 to 5.13
        • From 5.11 to 5.12
        • From 5.10 to 5.11
        • From 5.9 to 5.10
        • From 5.8 to 5.9
        • From 5.7 to 5.8
        • From 5.6 to 5.7
        • From 5.5 to 5.6
        • From 5.3 to 5.4
        • From 5.1 to 5.2
        • Resource mapping from MES to IAS
      • Setup and configuration
        • Permission and roles
        • Support section
        • Training & documentation section
        • Legal information and footer section
        • Cookies
        • Secure configuration
        • Configuration of sections in menu
        • API documentation - footer configuration
        • Environment variables
          • Global variables
          • portal/coreservice
          • portal/systemtests
          • Application variables exposed in Helm chart
      • Start and shutdown
        • Startup dependencies
        • Background tasks
        • Health and availability APIs
      • Regular operations
        • Removing / deregister / unregister a module
        • User data deletion
      • 09_failure_handling/index.adoc
      • Backup and Restore
      • Logging and monitoring
      • Known limitations
    • Developer documentation
      • Concepts
        • General
        • Navigation
        • Dashboard
        • Cross-module communication
        • Documents
        • Security
        • Limitations
      • How to…​
        • register your module & views
        • implement context contribution
        • develop a Web Portal-compatible frontend
        • use the iframe integration library
        • build widgets
        • check the integration status
        • improve UI performance
      • Troubleshooting
    • API documentation
    • Glossary
Web Portal
  • Smart Operations Toolkit
    • Deviation Processor
    • Multitenant Access Control
    • Notification Service
    • Ticket Management
    • Web Portal
  • Shopfloor Management
    • Andon Live
    • KPI Reporting
    • Operational Routines
    • Shift Book
    • Shopfloor Management Administration
  • Product & Quality
    • Process Quality
    • AI Services
  • Machine & Equipment
    • Condition Monitoring
    • Device Portal
  • Enterprise & Shopfloor Integration
    • Information Router
    • Master Data Management

SOT Learning Portal

  • Web Portal
  • Developer documentation
  • How to…​
  • implement context contribution

How to implement context contributions

DATA contribution type

To implement context contributions of the DATA type, the provider should handle the form URL to provide data to its own contribution page in Web Portal through iframe messaging concepts.

The context provider can utilize the context iframe page to contribute their context data by sending "ContextContributionDataResponseFromIframe" postMessages.

Here is an example URL format for the context contribution page: https://example.com/{TENANT_ID}/somedatacontribution?param_1={PARAM_1}&param_n={PARAM_N}&callbackId={CALLBACK_ID}

The above-mentioned URL should be rendered in a temporary iframe created by Web Portal frame in order to access the context data.

The context provider can define query parameters to return the response data. The response context contribution data can be changed based on the input parameter value, depending on the context provider’s decision.

For example, the test module "Portal Enigma" has defined the following query parameters for the response of the context meta-data:

Example meta URL: https://example.com/portal-enigma/somedatacontribution?tenantId=##tenant_id##&contextDataType=Meta&callbackId={CALLBACK_ID}

  • In the above URL, ##tenant_id## will be replaced by Web Portal frame before rendering this URL in the iframe.

  • The CALLBACK_ID will be attached by Web Portal, and the same ID will be used to respond back with the response data section for each request.

  • Here is an example of how to use the iframe integration library to provide meta data from the context iframe page:

    Iframe integration library usage to provide meta data from context iframe page

    import { getDataForContextContributionResponseFromIframe } from './bci-portal-iframe-integration-context-iframe';
    
    let data = {
      callbackId: '12335',
       responseData: {
         label: "string",
         description: "string"
       }
    };
    getDataForContextContributionResponseFromIframe(data);

    Module view example to provide meta data from context iframe page

    window.parent.postMessage(
     {
       name: 'ContextContributionDataResponseFromIframe'
       value: {
         callbackId: '113314564',
         responseData: {
           label: "string",
           description: "string"
         }
       },
       version: 1
      },
      '*'
    );

example value url: https://example.com/portal-enigma/somedatacontribution?contextDataType=Meta&facilityIds=##facilityIds##&timeStart=##timeStart=##&timeEnd=##timeEnd##&callbackId={CALLBACK_ID}

  • ##facilityIds##, ##timeStart## and ##timeEnd## will be replaced by Web Portal frame before render this url in iframe

  • {CALLBACK_ID} will be attached by Web Portal the same id will respond back with response data section for each request

    Below sample value data response can be provided by provider in context iframe page

    Iframe integration library usage to provide meta-data from context iframe page

    import { getDataForContextContributionResponseFromIframe } from './bci-portal-iframe-integration-context-iframe';
    
    let data = {
                callbackId: '113314564',
                responseData: {
                 metadata: {
                   label: "string",
                   format: "string",
                   formatType: "Percent"
                  },
                  items: [
                  {
                    deviceTagId: "string",
                    color: "Red",
                    actualValue: 0,
                    targetValue: 0
                  }
                  ]
                }
      };
    getDataForContextContributionResponseFromIframe(data);

    Module view example to provide meta-data from context iframe page

    parent.postMessage(
     {
          name: 'ContextContributionDataResponseFromIframe'
          value: {
            callbackId: '113314564',
            responseData: {
             metadata: {
               label: "string",
               format: "string",
               formatType: "Percent"
              },
              items: [
              {
                deviceTagId: "string",
                color: "Red",
                actualValue: 0,
                targetValue: 0
              }
              ]
            }
          },
          version: 1
        },
      '*'
    );

Contents

© Robert Bosch Manufacturing Solutions GmbH 2023-2026, all rights reserved

Changelog Corporate information Legal notice Data protection notice Third party licenses