Customer Creation and Update

To add or update customer fields, please do the following, call the method passing a JSONArray containing a JSONObject:

window.plugins.indigitall.customer.assignOrUpdateValueToCustomerFields([{
                "field1": "field1_value",
                "field2": "field2_value",
                "field3": "field3_value"
            }], success => {
                    // do something
                }, (error) => {
                    // do something else
                }
            )

For example:

window.plugins.indigitall.customer.assignOrUpdateValueToCustomerFields({
    "email": "[email protected]",
    "phone": "123456",
    "name": "Peter",
    "last_name": "Brice"
    },(success) => {
      // do something
    }, (error) => {
      // do something else
    });

Otherwise, if you want to eliminate a field, you have to do this with a JSONArray containing the name of the fields:

window.plugins.indigitall.customer.deleteValuesFromCustomerFields([{
                "field1",
                "field2",
                "field3"
            }], success => {
                    // do something
                }, (error) => {
                    // do something else
                }
            )