To add or update customer fields on JSON object, please do the following:
var fields = {"fieldName1": "value", "fieldName2": "value"};
IndigitallFlutterPlugin.assignOrUpdateValueToCustomerFields(
(fields),
(customer) => {
// Do something
},
(error) => {
// Do something else
});
For example:
IndigitallFlutterPlugin.assignOrUpdateValueToCustomerFields({
"email": "[email protected]",
"phone": "123456",
"name": "Peter",
"last_name": "Brice"
},(success) => {
// do something
}, (error) => {
// do something else
});
Otherwise, if you want to eliminate values from fields, you have to do this with an arrayList of the field names:
var fieldsArray = ["field1", "field2"];
IndigitallFlutterPlugin.deleteValuesFromCustomerFields(
fieldsArray,
(customer) => {
// Do something
},
(error) => {
// Do something else
});