Automatic Update Salesforce Customer Master

Automatic Update Salesforce Customer Master 20211031
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.
  • 29 Get 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.
Workflow Diagram (click to open)
Business Process Variables (#of Data Item: 6)
  • Salesforce Responseq_sf_response0
    • Salesforce customer master (JSON format) is stored.
  • Customer ID Listq_customer_ids2
    • This stores a list of IDs for salesforce customer master data.
  • List of Business Partnersq_customer_names3
    • This stores a list of transaction names from the salesforce customer master.
  • Client Information Listq_customer_values6
    • A list of information such as customer name, website, corporate number, etc. from the Salesforce customer master is stored.
  • Customer Name Data (to be updated)q_customer_names_master4
    • Questetra Choice Master “Customer Name Master-on-salesforce” is stored.
  • Customer Information Data (scheduled to be updated)q_customer_values_master7
    • Questetra Choice Master “Customer Information Master-on-salesforce” is stored.

Field Name, num, Initial Value

Download

This archive contains the BPMN icon, which is only available in the Professional edition.

Notes

  • You need to associate the Swimlane settings according to your organizational structure upon import
  • The following preparations are required before configuring this workflow.
  • 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.
    • A7: Query: The Salesforce SOQL search query.

See also

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top

Discover more from Questetra Support

Subscribe now to keep reading and get access to the full archive.

Continue reading