on 2023 Mar 21 2:32 PM
Hi.
We are trying to create a small plugin in SAP Business One to send/create the new customer directly to the CCO Manager Loyalty system
We are using the bellow
POST: http://127.0.0.1:8090/ccos/api/internal/users
{
"publicId": "C10043",
"userName": "C10043",
"state": "ACTIVE",
"email": "email@email.com",
"firstName": "CustomerName",
"lastname": "CustomerLastName"
}
The customer is created in the CCO Manager Loyalty Accounts correctly. When we sync the CCO client and try to create a sales receipt on this customer, the CCO doesn't recognize him as Loyalty.
If we try to select him and click the Create Loyalty button, we are getting the message that customer already exists in Loyalty. What might be the issue?
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
In FP11 the payload for POST: http://[server]:[port]/ccos/api/internal/users needs to be enhanced by identities array. To use customer C10043 as an example:
{
"publicId": "C10043",
"userName": "C10043",
"state": "ACTIVE",
"email": "email@email.com",
"firstName": "CustomerName",
"lastname": "CustomerLastName",
"identities" : [{
"value" : "C10043"
}]
}
From FP12 onwards (correct at time of posting this answer, subject to change) the payload has to be enhanced with "customerId" for POST: http://[server]:[port]/ccos/api/internal/users
An example of a correct payload for customer C10043 is:
{
"customerId": "C10043",
"userName": "C10043",
"email": "email@email.com",
"firstName": "CustomerName",
"lastname": "CustomerLastName"
}
Kind regards,
Gunther
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.