_save

Saves the changes that will be made for the way a Customer's fields will be imported.

Parameters

regexps

An array with a regular expression, replacement and field, and a boolean for if you want the html stripped.

spreadsheets

An array with the name of the desired field to import and its sheet number, column and row.

sample_email

A string of html which is used for testing.

Example

FM_api('ImportCustomersEmail_save',[
    'id'=>'167',
    'regexps'=>'[["/.*<p>Name: <span>([^<]*)<.*/","$1","Customer Name",false]]',
    'spreadsheets'=>'[["1","S","1","Account Number"]]',
    'sample_email'=>'<html><body><p>Name: <span>Test</span></p></body></html>'
    ]
);

Results

On Success

{"ok":1}

On Failure

If the "regexps" parameter is not set:

{"error":"missing or invalid parameter: regexps"}

If the "spreadsheets" parameter is not set:

{"error":"missing or invalid parameter: spreadsheets"}

If the "sample_email" parameter is not set:

{"error":"missing or invalid parameter: sample_email"}

Last updated