Several Ways to Manage Master Data with Questetra

 

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 method there are and the advantages and disadvantages of each method so that to be as materials for your future consideration, I hope.

 

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
M319 MODELING ENVIRONMENT 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. Please refer to the following for that devising.
  Blog: Implement Customer Master using Options-XML (Part 1)
  Blog: Implement Customer Master using Options-XML (Part 2)
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.
M208 DATA ITEM 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.
M410 OPERATING SCREEN Narrow Down “Product Name” List Display by Filtering with “Product Classification”

 


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;
}

 


 
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.
* Since it is an article several years ago, there may be a part whose specifications have changed from the current one. Please be noted.
  Blog: How to Use Customer Data on Salesforce as Choices
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)

 


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.

Below are articles on how to realize an App that considered trouble avoidance at master update. Please refer.
  Blog: Trouble-free! How to Perform an Options-XML Update?
  Blog: Trouble-free! How to Perform an Options-XML Update? (Service Task Addon ed.)

* 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.

 

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.

 

About Kusaka Tsuyoshi

営業をやってますが、もともとエンジニアなので、プログラミングもやります。
View all posts by Kusaka Tsuyoshi

Recommendations
Prev article - 50. Questetra Tips How to Let a Robot Nominates Translators Randomly (2)
Next article - 50. Questetra Tips How to Let a Robot Nominates Translators Randomly (3)
Another article - Kusaka Tsuyoshi How to Cooperate between Office 365 and Cloud Based Workflow

Archive

 RSS