This workflow automatically imports Salesforce Account objects into the Account Choice Master. It starts automatically every day at 7:00 AM. Salesforce Account objects are added, changed, and deleted through various workflows and direct input from Salesforce. As of 7:00 AM every day, the latest Account information is used as choice data in various workflows.
Worker (#of Swimlane: 1)
Customer Master Administrator
A person who manages the transaction server master used in Questetra
Business Flow (Complexity of Workflow: 11)
01. Manual Start
When the Questetra Master Administrator wants to change the Customer Master data, the automatic update process will be started.
2Customer Name Master Update
The workflow platform will update (refresh) the customer name master.
29Get Salesforce integration transaction master information
16Parsing the Response
The workflow platform analyzes the Salesforce response and formats it into data that can be used in the option master.
6Salesforce Receive all transaction master records
The workflow platform receives the Salesforce customer master (JSON format) and stores it in the data item “Salesforce response”.
5Set Title
The workflow platform sets the subject.
22Supplier Information Master Update
The workflow platform updates (refreshes) the business partner information master.
Please configure communication with Salesforce and OAuth2.0.
By making the Salesforce Cooperation Process available, you can set up the “Get Salesforce integration transaction master information” auto step.
Arrangement Tips
It corresponds to the following data items defined in the Salesforce Account object (standard: Account).
Customer name: Standard field: API name
Website: Standard item: API name Website
Phone number: Standard item: API name Phone
Number of employees: Standard item: API name NumberOfEmployees
Corporate number: Unique item: API name CorporateNumber__c
If you want to retrieve other defined data items, you will need to change the settings of the automated steps “Get Salesforce integration transaction master information” and “Parsing the Response”.
Parsing the Response Auto Step Script (click to open)
var text = engine.findDataByNumber("0");
var result = JSON.parse(text); // JSON Parsing
var ids = "";
var labelsForName = "";
var labelsForAllInfo = "";
for (var i = 0; i < result.records.length; i++) {
var account = result.records[i];
ids += account.Id + "\n"; // Get ID
labelsForName += account.Name + "\n"; // Get Name
// Get all information
labelsForAllInfo += account.Name + "|:|" + account.Website + "|:|" + account.Phone + "|:|" + account.NumberOfEmployees + "|:|" + account.CorporateNumber__c + "\n";
}
labelsForAllInfo = (new java.lang.String(labelsForAllInfo)).replaceAll("\\|null\\|","\\|\\|");
labelsForAllInfo = (new java.lang.String(labelsForAllInfo)).replaceAll("\\|undefined\\|","\\|\\|");
engine.setDataByNumber("2", ids);
engine.setDataByNumber("3", labelsForName);
engine.setDataByNumber("6", labelsForAllInfo);
Capture
Example of the automated process of”Get Salesforce integration transaction master information”
Configuration example supplement
A12: API key to Return with: Please enter the contents of “API key” in the “Salesforce Transaction Master Receive All Records” event setting of this Workflow App.
A1: Access URL: The URL for your Salesforce REST API.