Die Basis URL ergibt sich aus Ihrem Mandanten und der ID des Formulars: "https://www.brandsmill.de/#webform?m=...&id=... Weitere Parameter folgen mit &....
https://www.brandsmill.de/#webform?m=<mandantNr>&id=<formularId>&bg=fffff&bgr=ffffff&bgh=66001f&bgt=ffffff&w=900&fh=600
&ct= save to contact by contact id
&ctm= save to contact by contact E-Mail
&bg=background color form
&bgr=background color form row
&bgh=background color title
&bgt=background color info
&l=label width
&w=total form width
&fh=total form hight
&f=F123:abc,F124:efg,..
&md=a
Mode 'a' Automatisch speichern (Speichert die Werte direkt mit dem Aufruf)
Die Folgende URL (fett geschriebener Text ist anzupassen) könnte man in der E-Mail Signatur hinterlegen:
https://www.brandsmill.de/#webform?m=<mandantNr>&id=<formularId>&bg=fffff&bgr=ffffff&bgh=66001f&bgt=ffffff&w=900&fh=600&md=a&f=F354:<$cid>
Der Link könnte z.B. den Namen "unsubscribe" tragen. Klickt der Empfänger darauf startet das Formular mit der Zuordnung zum Kontakt und die Workflowregeln steuern dann dazu was passieren soll.
<$cid> ist ein Platzhalter für den Kontakt in dessen Kontext ein Vorgang gestartet wurden. So wird das Feld F354 mit der Kontaktzuordnung gespeichert.
<!doctype html>
<html>
<head>
<!-- (A) handle Data via API as UTF-8 encoded -->
<meta charset='utf-8' />
<title>brand's mill Form API</title>
</head>
<body>
<h2>Send fields to brand's mill webform</h2>
Keep your design and start any Workflow on brand's mill using our API.
<br>
<br>
<div>
<input
id="insertForm"
type="submit"
value="send data via JSON">
<br>
<br>
Data will be persisted within brand's mill and forwarded via a workflow within brand's mill.
<br>
You need to define a 'Webform' and its 'Workflow' within brand's mill to handle the data you send from your site.
<br>
The 'Webform' fields are those you have to target as 'F...' fields.
<br>
<br>
Inspect source of this HTML to find out details. You may use this API in conjunction with a brand's mill subscribtion.
<br>
<br>
(c) brand's mill 2015
</div>
<script type="text/javascript">
function init() {
var callback = function() {
console.log("loaded");
}
gapi.client.load('bmform', 'v1', callback, 'https://brandsmill-service.appspot.com/_ah/api');
document.getElementById('insertForm').onclick = function() {
saveForm();
}
}
function saveForm() {
/* (C) send the fields to brand's mill via JSON API */
/* (1) Client ID - Tenant of the brand's mill company */
var clientID ="Mandant Nr.";
/* (2) Form ID - ID of the Webform as shown in the webform URL */
var formID = "Webformular id"
/* (3) JSON of all Fields find the target "F..." in the webform you target within brand's mill */
var formFields = "{\"F88\":\"Jäger, Malte\"},{\"F89\":\"Brand's mill GmbH\"},{\"F95\":\"bitte um Rückruf\"}";
var requestData = {};
requestData.json = "{\"client\":\""+clientID+"\",\"form\":\""+formID+"\",\"fields\":["+formFields+"]}";;
gapi.client.bmform.post(requestData).execute(function(resp) {
if (!resp.code) {
console.log(resp);
} else {
console.log(resp.code + " : " + resp.message);
alert("Error : " + resp.code + ":" + resp.message);
}
});
}
</script>
<!-- (B) load and init API -->
<script src="https://apis.google.com/js/client.js?onload=init"></script>
</body>
</html>
siehe auch Webhook