In the workflow form, a template can be stored for the first step. This is copied at creation and provided for processing in a new context.
Thus, formulated standard texts can be used for automatic individualization. Special customer letters, offers, contractual texts, etc. are designed centrally according to all the rules of the art and made available to the team.
As soon as the process starts, the template is transferred to a new text document. In the first step, even before the user processes the document, placeholders are filled with fields from the contact (from the context). Of course, this can happen later.
To replace placeholders in a Google text document requires a JSON in which the placeholders receive content. The example shows the placeholders use <SUBJECT> <SALUTATION><ADDRESS> . These must be deposited in the template. When replaced, these retain your desired formatting.
var vertrag = work$subject ;
var address = contact$contactSalutation +" "+ contact$contactName +"\n"+ contact$contactStreet +"\n"+ contact$contactZipCode + " "+ contact$contactCity ;
var salutation ="Hallo "+ contact$contactFirstName ;
var serviceid = contact$customerIdNo;
var json = "{"
json+="\"<SUBJECT>\":\""+vertrag+"\"";
json+= ", \"<SALUTATION>\":\""+salutation+"\""
json+= ", \"<ADDRESS>\":\""+address+"\""
json+= ", \"<SERVICEID>\":\""+serviceid+"\""
json+="}";
Assigning var json to var googleDocsMerge activates the Google Docs API and starts sharing.
var work$googleDocsMerge = json;
The command "ACCESS SEND TO" sends the document to the "UI Navigation" as "ToDo". This opens the document directly online in the current state.