Hi, there!

The topic I am going to mention this time is related with how to utilize Questetra, as well as system collaboration.

 

Management of master data associating with Questetra is one of the common agenda.

There are cases where to correspond approval flow when registering/modifying/deleting master data with Questetra and to modify master data, and other cases where Questetra only uses master data, sometimes.

There are several patterns as the way to maintain the master data. I am going to organize what kinds of methods there are and the advantages and disadvantages of each method so that to be as materials for your future consideration, I hope.

 

Patterns of Master Data Management

The pattern varies depending on whether you keep the original data of the master data in the outside (Salesforce/kintone/Google Spreadsheet, etc.) and whether you keep the copy of it internally in case you keep it outside.
 

  • Pattern 1: Original data of master data is retained outside Questetra, and reference is made each time
  • Pattern 2: Original data of master data is retained outside Questetra, periodically synchronizing it with the copy within Questetra and to be referred
  • Pattern 3: Original data of master data is retained inside Questetra
Pattern Advantages Disadvantages
1 ・Changes in choices are reflected in real time
・Easy to hold multiple Data Items related to master
・Easy to list master data (depending on where you keep it)
・Creation to return choices in xml format is necessary (Need to be created outside Questetra. Slightly larger volume)
2 ・Easy to hold multiple Data Items related to master
・Easy to list master data (depending on where you keep it)
・Changes in choices are not reflected in real time
・Creation for periodical synchronization is necessary. (Volume is small, since scripts in Questetra application can cope as long as the external system has APIs.)
3 Changes in choices are reflected in real time
・Can be realized with Questetra alone
・When to hold multiple data items related to master, devising is necessary
・Difficult to list master data

 

* Please see the following cite for the format of Options XML
Related manual M319: Register an Options-XML file to which the Process Model Definitions Refer to

* Since an option in the master data retained in Questetra has only two items which are its ID and displaying data, you need to devise something if you want to manage multiple data items in an option in the master. (For example, if it is the company name and the URL that you want to manage, set the display data part as “Foobar Corporation; https://foobar.com”, and on the reference side, configure a processing that dividing with semicolons and setting it in a Data Item.)

*There are cases where you want to change the contents of options according to Process (issues), but it is a slightly different agenda from this time. Please refer to the following site for that.
 Related manual M208: Options at Downstream Step, Set by Upstream Step

There are cases of parent-child interlocking by multiple Data Items of options, but it is a slightly different agenda from this time. Please refer to the following site for that.
 Related manual M410: Narrow Down “Product Name” List Display by Filtering with “Product Classification”

 

Details of Each Pattern

 

Pattern 1: Original data of master data is retained outside Questetra, and reference is made each time

Reference to the external data takes form that making http access and return the option xml.
For example, there is a method that retaining external data in Google Spreadsheet, and prepare a Web application with Google Apps Script (GAS) so that generating and returning option xml.

 

I prepared a sample Google Spreadsheet using this method and released it as the following.
 Sample Google Spreadsheet: Management of master data of countries in the world
In addition, to make HTTP access from Select type data item data to this sample Google Spreadsheet, please specify the following URL as shown below.

https://script.google.com/macros/s/AKfycbwyCl0DTV_d348j7mKXZKYFAPqUUjq4QcL0V5G77Naw12rcEte2/exec

 

In addition, the sample code of GAS for creating such Google Spreadsheet is as follows.

var SHEET_ID = "xxxxx"; //input Google Sheet id
var SHEET_NAME = "Sheet1"; //input Sheet name

function doGet(e) {
  return  receive_(e);
}

function doPost(e) {
  return  receive_(e);
}

function receive_(e) {

  var search_key = e.parameter['query'];
  if (search_key == undefined) {
    search_key = "";
  }

  var out = ContentService.createTextOutput(buildXml(search_key));
  Logger.log(out.getContent());

  return out;
}

function buildXml(search_key) {
  var sheet = SpreadsheetApp.openById(SHEET_ID).getSheetByName(SHEET_NAME)

  var startRow = 2;
  var numRows = sheet.getLastRow() - 1;
    
  var dataRange = sheet.getRange(startRow, 1, numRows, 2);
  var data = dataRange.getValues();
  var out_string = '';

  out_string += '\n';
  for ( var i = 0; i < data.length; ++i) {
    var row = data[i];
    
    var select_value = row[0];
    var select_display = row[1];

    if ((search_key == "") || (select_display.indexOf(search_key) >= 0)) {
      out_string += '\n';
    }
  }
  out_string += '';
  Logger.log(out_string);

  return out_string;
}

For details on how to prepare a web application on GAS, searching with “Google Apps Script web application” will hit many articles, so please refer to them.

 

Pattern 2: Original data of master data is retained outside Questetra, periodically synchronizing it with the copy within Questetra and to be referred

 

It takes form that calling the API of the external service from Questetra and process the acquired data (usually JSON format) with “Script Task” and take in it. And I prepared an Add-on in which such processing has been packaged.

In a case where to keep external data in Salesforce, please refer to the article on the following implementation method.
Blog: How to Use Customer Data in Salesforce as Options
In a case of Google Spreadsheet, please refer to the following sample.
Workflow Sample Episode 502: “Master Reference” is for Eliminating the Fluctuation!
For kintone, please refer to the following sample.
Workflow Sample Episode 503: “Master Reference” is for Eliminating the Fluctuation! (kintone version)

 

Pattern 3: Original data of master data is retained inside Questetra

Even though it is possible to create your own choice xml file and upload it, but it is time-consuming to create a file and the maintenance record does not remain. It will be very easier when you make that process into an App.

* Options XML, there are two ways which to store it as system common, and to retain at specific App. In the former case, “Service Task (Choices update)” can be used, but in the latter case it can not be used, so it can not be applied as an App. Please be noted.

 

Closing

There are various methods, some aresuitable and other is unsuitable, so please use properly according to the scene.
Please feel free to ask any questions via “Contact us“, if you have one.