question

anandchakru avatar image
anandchakru asked anandchakru commented

Why new Customer Id everytime in webhook (for the same phone number)

I'm testing the webhooks (customer). When a customer purchases and enters phone#/email for the receipt, everytime (even though the same phone#/email is entered by the same customer) why do I get a webhook with a different customer id each time?

eg:

2017-01-29 14:58:30,907
{
    "appId": "MD4231PXSJJZT",
    "merchants": {
        "HS5F2W7WY8CBE": [
            {
                "objectId": "C:E3G1PK9ZV6DF6",
                "type": "CREATE",
                "ts": 1485687848953
            },
            {
                "objectId": "C:E3G1PK9ZV6DF6",
                "type": "UPDATE",
                "ts": 1485687848955
            },
            {
                "objectId": "C:E3G1PK9ZV6DF6",
                "type": "UPDATE",
                "ts": 1485687848956
            }
        ]
    }
}

a little while later,

2017-01-29 03:04:10,720 {
 "appId": "MD4231PXSJJZT",
 "merchants": {
     "HS5F2W7WY8CBE": [
         {
             "objectId": "C:XY3DNR8N9P0YJ",
             "type": "CREATE",
             "ts": 1485730708547
         },
         {
             "objectId": "C:XY3DNR8N9P0YJ",
             "type": "UPDATE",
             "ts": 1485730708550
         },
         {
             "objectId": "C:XY3DNR8N9P0YJ",
             "type": "UPDATE",
             "ts": 1485730708550
         }
     ]
 } }

Note: see below, both the customer ids have the same details (phone#/email)

{
    "href": "https://www.clover.com/v3/merchants/HS5F2W7WY8CBE/customers/E3G1PK9ZV6DF6",
    "id": "E3G1PK9ZV6DF6",
    "marketingAllowed": false,
    "customerSince": 1485687849000,
    "emailAddresses": {
        "elements": [
            {
                "id": "HRS5AMCNEA328",
                "emailAddress": "anandchakru.forum@gmail.com"
            }
        ]
    },
    "phoneNumbers": {
        "elements": [
            {
                "id": "TARS9KZ75SCPJ",
                "phoneNumber": "408-212-0297"
            }
        ]
    }
}

{
  "href": "https://www.clover.com/v3/merchants/HS5F2W7WY8CBE/customers/XY3DNR8N9P0YJ",
  "id": "XY3DNR8N9P0YJ",
  "marketingAllowed": false,
  "customerSince": 1485730709000,
  "emailAddresses": {
    "elements": [
      {
        "id": "6MSG06WXFVN8E",
        "emailAddress": "anandchakru.forum@gmail.com"
      }
    ]
  },
  "phoneNumbers": {
    "elements": [
      {
        "id": "Z5Y6D4NV7Y6MP",
        "phoneNumber": "408-212-0297"
      }
    ]
  }
}
Customers
1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

anandchakru avatar image anandchakru commented ·

Partial Answer inferred from this answer. Guess this is not implemented at your end. Apps will have to take care of it.

0 Likes 0 ·

0 Answers

Welcome to the
Clover Developer Community