DOCS

Customer profiles

재방문 쇼퍼 정보를 Zonos Checkout에 미리 로드하세요.

Customer profiles는 계정이 있는 고객이 주소 및 결제 세부 정보를 미리 로드하여 Checkout 경험을 간소화합니다.

이 기능은 현재 커스텀 API 통합에서만 사용할 수 있습니다. Checkout 플러그인을 사용하는 판매자에게는 아직 제공되지 않습니다.

재판매업체, 정부 기관, 비영리 단체에 판매하는 경우, 고객의 면세 증명서를 customer profile에 동기화할 수도 있습니다.

쇼퍼 없이 profile 생성 또는 업데이트 

checkoutCustomerProfileAuthenticate는 해당 checkout session에 대한 일회용 비밀번호(one-time password)를 발급하므로 쇼퍼가 반드시 있어야 합니다. Checkout 외부에서 profile을 생성하거나 업데이트하려는 경우—예를 들어 고객 목록을 미리 로드하거나, 자체 시스템에서 profile 변경 사항을 동기화하거나, 고객의 첫 주문 전에 면세 정보를 연결하는 경우—대신 checkoutCustomerUpsert를 사용하세요.

1mutation checkoutCustomerUpsert($input: CheckoutCustomerProfileInput!) {
2 checkoutCustomerUpsert(input: $input) {
3 customerId
4 email
5 name
6 phone
7 locations {
8 administrativeArea
9 countryCode
10 line1
11 line2
12 locality
13 postalCode
14 }
15 }
16}

Profile은 customerId를 기준으로 일치시키므로, 반복 호출해도 중복 profile이 생성되지 않고 동일한 profile이 업데이트됩니다. 전체 고객 목록에 대해 일정에 따라 실행해도 안전합니다.

업데이트가 적용되는 방식에 대해 알아두어야 할 세 가지 사항은 다음과 같습니다.

  • 생략된 필드는 그대로 유지됩니다. name만 전송하면 이름만 업데이트되고 이메일과 전화번호는 기존 값 그대로 유지됩니다.
  • 값은 지울 수 없습니다. 빈 값을 전송하면 해당 필드를 생략한 것과 동일하게 처리되므로, 한 번 설정된 이름, 이메일, 전화번호를 제거할 방법이 없습니다.
  • 주소는 추가만 됩니다. Profile에 이미 존재하는 location은 중복 추가되지 않으며, request에서 제외된 location도 삭제되지 않습니다.

checkoutCustomerUpsert는 oneTimePassword를 반환하지 않습니다. Profile을 Checkout에 로드하려면 여전히 해당 session의 one-time password를 발급하는 checkoutCustomerProfileAuthenticate가 필요합니다.

GraphQL API ReferenceTypes, inputs, and operations used in this guide

이 페이지가 도움이 되었나요?