Creating a client/lead from a website form

Creating a client from a website form


Some clients have a website with a contact form. Sometimes it may be convenient to have this integrated with the Robaws API.


As you may know, Robaws has the possiblity to add custom fields to most of its entities. This feature is called 'extra fields' and is also called like this in the API.


Let's consider you defined two extra fields on the client module in Robaws:


Extra field


Now, if you want to create a client and also populate the extra field, you should perform the following API request:




POST https://app.robaws.be/api/v2/clients
{
"name": "John Doe",
"extraFields": {
"Contact via": {
"stringValue": "Social media"
}
}
}


Whether you should use 'stringValue' or a different property, depends on the type of extra fields. Here are the most common types listed with their corresponding API property:


Tekst/Text: stringValue

Tekstvak/Textarea: stringValue

Datum/Date: dateValue (ex 2020-12-17)

Decimaal getal/Decimal number: decimalValue

Geheel getal/Integer: integerValue

Keuzelijst/Combobox: stringValue

Selectievakje/Checkbox: booleanValue

Link: stringValue

Bijgewerkt op: 17/12/2020

Was dit artikel nuttig?

Deel uw feedback

Annuleer

Dankuwel!