Scenario: Identify a customer
MethodName: FindCustomer()
Inputs:
WebsiteIDRequired, used to identify configuration
MagentoCustomerIDOptional, used for linking in CPMagento
EmailOptional, used for linking in Counterpoint
PhoneOptional, used for linking in Counterpoint
Logic:
Attempt 1: Look for linked customer in CPMagento using WebsiteID and Magento CustomerID
Attempt 2: Look for customer in Counterpoint with matching EMAIL_ADRS_1
Attempt 3: Look for customer in Counterpoint with matching PHONE_1. Phone numbers are stripped of these characters ().- before comparison.
Use:
https://192.168.0.167:50937/c5coreapi/?APIToken=123456&action=FindCustomer&WebsiteID=www.mywebsite.com&MagentoCustomerID=113353&Email=findme@lost.com
Returns:
{
"CustomerInfo": [{
"Exists": true,
"CPCustomerID": "0033478197264"
}]
}
Returns:
{
"CustomerInfo": [{
"Exists": false,
"CPCustomerID": null
}]
}
Returns:
{
"Error": "Error Message."
}