Work with protected customer data
Privacy and data protection are critical foundations for ecommerce and are important to merchants and their customers. The protected customer data requirements focus on data minimization, transparency, and security so that you can better support a merchant's path towards compliance with privacy and data protection rules.
When your app uses the Admin API or the Customer Account API, the review process for your public, published app might require action as described in the following table:
Level | Data use | Partner actions |
---|---|---|
0 | No customer data | No action required |
1 | Customer data excluding name, address, phone, and email fields |
|
2 | Customer data including name, address, phone, or email fields |
|
Shopify will approve your app to use protected customer data if the requested data is the minimum amount required by your app to provide the merchant with the app functionality. If you're approved to access the data that you requested, then code updates aren't required. If you aren't approved to access the data that you requested, then you might need to update your app to handle errors or redacted data. For more information, refer to the example API requests for protected customer data.
While we encourage all apps to meet protected customer data requirements, access to the different levels can vary based on app types. See below:
Level | Public app | Custom app | Admin created custom app |
---|---|---|---|
1 | Requires review | Always available | Always available |
2 | Requires review | Always available | Varies by plan |
To access customer data in development, select the data and fields you're using in the Partner Dashboard. You don't need to submit a request for review for apps that are installed only on development stores.
Request access to protected customer data
Anchor link to section titled "Request access to protected customer data"Public apps request access to protected customer data and protected customer fields through the Partner Dashboard.
Protected customer data includes any data that directly relates to a customer or prospective customer, as represented in the API types and resources. Types and resources that don't refer to a single customer, such as the product query, aren't included.
In addition to requesting access to protected customer data, you'll need to request access to the following protected customer fields individually because they directly identify customers:
- Name: first and last names
- Address: address line 1, address line 2, geolocation, and zip codes in both billing and shipping addresses
- Phone
If your access is approved, these fields will appear in the protected customer API types and resources.
To request access:
From the Partner Dashboard, go to Apps, and then select your app.
In the sidebar, click API access.
Find Protected customer data access and click Request access.
Select Protected customer data, provide your reasons for using it, and click Save.
If your app needs access to protected customer fields, then select the relevant fields, provide your reasons for using them, and click Save.
Complete your Data protection details, making sure that your app meets the protected customer data requirements.
If your app is for testing or installed only on a development store, you can access customer data in development after Step 5. You don't need to submit for review.
You'll receive updates about the status of your review by email and through your Partner Dashboard.
Protected customer data API types and resources
Anchor link to section titled "Protected customer data API types and resources"The GraphQL Admin API and Customer Account API reference documentation defines what types, objects, and fields represent protected customer data.
The following table summarizes the API types that are considered protected customer data.
API resource/type | Protected customer data |
---|---|
Customers (GraphQL Admin API, Customer Account API) | Data that defines facts about a single customer, including name, addresses, email, and phone number. |
Shipping rates (GraphQL Admin API) | Shipping rates that related to a single order, which relates to a single customer. |
Webhooks, Metafields (GraphQL Admin API, Customer Account API) | Events and metafields that relate to a single customer or order. |
Orders (GraphQL Admin API, Customer Account API) | Orders, draft orders, abandoned checkouts, refunds, transactions, and other data that relate to a single customer. |
Checkout (Storefront API) | Checkout and payments that relate to orders by a single customer. |
Shipping and fulfillment (GraphQL Admin API, Customer Account API) | Shipping and fulfillment data that relate to orders by a single customer. |
Online store (Storefront API) | Comments on a store that contain data about the commenter. |
Gift cards (GraphQL Admin API) | Gift cards that are used by a single customer. |
Using protected customer data
Anchor link to section titled "Using protected customer data"After your app is approved to access protected customer data, API requests and webhooks that contain protected resources will return the data requested. Responses will include only approved fields, and unapproved fields will be redacted.
GraphQL requests to unapproved types will return an HTTP 200 Ok
response with an error message in the errors
hash.
Example API requests for protected customer data
Anchor link to section titled "Example API requests for protected customer data"The following examples show API requests and responses for an app that is approved to access protected customer data and the email
and name
fields. In this scenario, the phone
and address
fields are redacted from the GraphQL replies. The reply also includes an errors
message with an explanation of redacted fields.
GraphQL Admin API request with approved fields
Anchor link to section titled "GraphQL Admin API request with approved fields"
GraphQL Admin API request with unapproved fields
Anchor link to section titled "GraphQL Admin API request with unapproved fields"
Customer Account API request with approved fields
Anchor link to section titled "Customer Account API request with approved fields"
Customer Account API request with unapproved fields
Anchor link to section titled "Customer Account API request with unapproved fields"
Requirements
Anchor link to section titled "Requirements"To help apps safely process protected customer data, you must implement the following requirements in your development practices and in your apps. These requirements reflect the minimum acceptable handling of protected customer data and help apps support merchants with increasingly strict privacy and security requirements. You might need to consult with a privacy or legal professional for help applying these requirements to your business.
If you're using only protected customer data, then you must meet the level 1 requirements.
If you're using protected customer data including name, address, phone, or email fields, then you must meet all of the level 1 and 2 requirements.
Level 1 requirements:
Process only the minimum personal data required to provide app functionality to merchants.
Processing personal data comes with legal and regulatory requirements to secure, monitor, manage, and communicate about the data. Using the minimum data required helps minimize the time and effort spent complying with these requirements, and limits the potential damage of a data breach or unauthorized access.
Inform merchants what personal data you process and your reason for processing it.
Transparency with merchants about what personal data is processed and why helps merchants manage what processing occurs on their behalf. This information is often included in your privacy policy or data protection agreement.
Limit your processing of personal data to the stated purposes.
Processing must be limited to the stated purposes to ensure that merchants and customers are correctly informed about how their data is used.
Where applicable, respect and apply customer consent decisions.
Customer consent is a critical mechanism for customers to participate in their data processing and might be required depending on the type of processing your app performs.
Where applicable, respect and apply customer decisions to opt out of any data sharing such as a ‘data sale’ or similar concept under applicable laws or regulations.
Merchants must comply with applicable laws and regulations around sharing of personal data and this requirement helps ensure you are prepared to support them.
If you use personal data for automated decision-making and those decisions might have legal or significant effects, then you must allow customers to opt out.
Automated decision-making can include personal data processing such as profiling, analyzing, predicting, or scoring algorithms. Automated decisions with legal or significant effects are those that have a material impact on people's lives and it's important to give customers the option to have their data manually processed.
Make privacy and data protection agreements with your merchants.
Data protection agreements or privacy policies represent an agreement about personal data processing and are an important tool for formal and safe data privacy practices. They often include details such as data transfer mechanisms, scope of data processed, legal roles and responsibilities, retention, and definition of terms.
Apply retention periods to make sure that personal data isn’t kept for longer than needed.
Personal data must not be kept longer than necessary for the stated processing purposes. Retaining personal data longer than necessary increases the security risk of unauthorized access or inappropriate processing.
Encrypt data at rest and in transit.
Encrypting data when stored and as it transits various networks helps to prevent bad actors from gaining access to it even if they have access to the application. It also reduces the consequences of unintentionally disclosing the data set to the general public.
Level 2 requirements:
Encrypt your data backups.
Data backups can contain personal data and should be treated with the same level of concern and consideration as production data in order to prevent unauthorized access.
Keep test and production data separate.
Strict separation of environments prevents personal data from production from leaking into less secure environments where it could become exposed.
Have a data loss prevention strategy.
A data loss prevention strategy is a combination of technical controls, policies, and standards that protect an organization from the possibility of a bad actor extracting data for nefarious purposes.
Limit staff access to protected customer data.
Limiting staff access to protected customer data minimizes the risk that data will be improperly accessed, exfiltrated, or processed.
Require strong passwords for staff accounts.
Strong password requirements often include minimum length and a mixture of numbers, letters, and special characters.
Keep an access log to protected customer data.
Keeping logs and reviewing them frequently allows an organization to not only keep an audit trail of activity related to data access, but also assess whether their security controls are working effectively.
Implement a security incident response policy.
A security incident response policy helps organizations respond appropriately to security incidents and/or data breaches. These policies often include incident severity scales, roles and responsibilities, escalation paths, evidence collection, and required actions.
Data protection review
Anchor link to section titled "Data protection review"To help you meet the protected customer data requirements, we might ask for a detailed review of your practices. During this review, you'll need to provide evidence that your app and your practices meet the protected customer data requirements. If we select your app for a data protection review, then we'll contact you with instructions on how to proceed. Data protection reviews can occur after you've implemented the protected customer data requirements.
While any app might be selected, data protection reviews will likely focus on apps that have:
- High number of merchant installs
- High volume of customer records
- More protected customer fields approved
- Long retention of personal data