createLoyaltyAccount confusion

I’m a little confused by the createLoyaltyAccount endpoint and the adjustLoyaltyPoints endpoint.

createLoyaltyAccount
This endpoint allows me to put in programId & customerId, which I would assume is all that is necessary. However, it also asks for mapping.phoneNumber. It seems to disregard the customerId in the call and searches for any customer accounts that match the mapping.phoneNumber. If none exist it creates a new customer and applies the points to this newly created customer.

I can’t make the call without mapping.phoneNumber which seems to be the culprit. Any ideas?

With the Loyalty API the mapping.phoneNumber is required for creating a loyalty account. This is because a customer can use a different phone number for the loyalty account then the one in the customer profile. :slightly_smiling_face:

@Bryan-Square thanks for the response. According to the docs it seems that it only works with phone numbers, not email addresses at the moment. Is there any plan to change that in the future?

Yes, that’s correct. At this time only a phone number is supported. We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the API product team. :slightly_smiling_face:

1 Like