# RevCent WooCommerce Store Onboarding Guide for AI/MCP

## Rule

The AI/MCP must follow the steps in order.

The AI/MCP must not move to the next step until the current step is complete.

Each step defines:

- what the step is for
- what the AI/MCP should do
- what counts as complete
- when the completion note should be created

A RevCent user may have multiple WooCommerce stores, businesses, and Projects. Each WooCommerce store should be organized under the correct RevCent Project.

The WooCommerce store domain is the primary identifier for onboarding. The business name is the secondary identifier.

Entities created and associated with a Project should use the WooCommerce store domain as the primary naming convention.

Examples:

- `example.com Project`
- `example.com Campaign`
- `example.com Gateway Group`
- `example.com Gateway`
- `example.com Payment Profile`
- `example.com Tracking Domain`
- `example.com Third Party Shop`

## Project Completion Note Rule

When a step is completed, the AI/MCP should create one concise Project Note using `CreateProjectNote` before moving to the next step.

Project Notes are comments that record what has been completed. Project Notes are not sources of truth and must not be used to determine whether a step is complete. Step completion must still be determined by the step-specific checks, such as `GetProject`, `GetUserShop`, `GetTrackingDomain`, `GetPaymentProfile`, or the relevant entity retrieval operation.

Keep Project Notes to a minimum. Do not create a note for every action, API call, retry, Secure Form, edit, or association. Create a single completion note per step after that step's completion requirements are satisfied.

If onboarding is resumed and a step was already completed in a prior run, the AI/MCP should avoid duplicate notes when an existing Project Note already records that same step completion. If no completion note exists for that step, create one after the step is verified complete.

Recommended completion note format:

```text
[YYYY-MM-DD] WooCommerce onboarding Step {step_number} complete: {step_name}

Domain: {woocommerce_store_domain}
Project: {project_id}
Completion evidence: {brief statement of the step-specific completion condition}
Key IDs: {only the important entity IDs for this step}
Follow-up: {only include if something remains or requires future attention}
```

The completion note should be short and should not include sensitive credentials, Secure Form contents, API secrets, consumer secrets, payment gateway credentials, PayPal credentials, or raw private configuration values.

The `Key IDs` field must be limited to a maximum of 5 IDs total. For bulk steps, such as importing products, shipping methods, or offline payment methods, do not list every created or updated entity ID. Instead, include a concise summary and up to 5 representative or most important IDs.

Examples:

```text
Key IDs: product_group_id=XXXXXXXXXXXXXXXXXXXX; products_imported=100; sample_product_ids=AAAA..., BBBB..., CCCC...
```

```text
Key IDs: third_party_shop_id=XXXXXXXXXXXXXXXXXXXX; offline_methods_imported=4; third_party_integrations_created=2
```

---

## Step 1: Establish the Active Business Project

### What this step is for

This step identifies the WooCommerce store and confirms the correct RevCent Project for that store.

The Project is required before continuing because all setup must be organized under the correct store Project.

The WooCommerce store domain is the primary identifier. The business name is the secondary identifier.

### What the AI/MCP should do

1. Ask the user for the WooCommerce store domain.
2. Ask the user what the business is called.
3. Normalize the WooCommerce store domain before using it for matching or naming.
4. Use `GetProjects` to check for an existing Project that matches the WooCommerce store domain first.
5. If no Project matches the WooCommerce store domain, check for a Project that matches the business name.
6. If exactly one matching Project exists, use that Project.
7. If more than one possible matching Project exists, ask the user to choose the correct Project.
8. If no matching Project exists, create a new Project using `CreateProject`.
9. Name the new Project using the domain as the primary naming convention, such as `example.com Project`.
10. Retrieve the selected or newly created Project using `GetProject`.
11. Store the active `project_id`, WooCommerce store domain, and business name for the current onboarding flow.

### Step complete when

Step 1 is complete only when all of the following are true:

```text
woocommerce_store_domain is known
AND business_name is known
AND project_id is confirmed
AND GetProject has retrieved the selected or newly created Project
AND the Project represents the correct WooCommerce store domain
```

### Do not continue until

The AI/MCP must not move to Step 2 until Step 1 is complete.

---

## Step 2: Create or Confirm Campaign

### What this step is for

This step ensures the WooCommerce store has a Campaign in RevCent and that the Campaign is associated with the active Project.

The Campaign should be named using the WooCommerce store domain as the primary naming convention.

Example:

```text
example.com Campaign
```

### What the AI/MCP should do

1. Confirm Step 1 is complete.
2. Use `GetProject` to retrieve the active Project.
3. Check the Project's associated `campaign` entities.
4. If the Project already has a Campaign associated with it for the WooCommerce store domain, use that Campaign and mark Step 2 complete.
5. If the Project has more than one Campaign that could be the correct Campaign for the WooCommerce store domain, ask the user to choose the correct Campaign.
6. If the Project does not have a Campaign associated with it for the WooCommerce store domain, create a new Campaign using `CreateCampaign`.
7. Name the new Campaign using the domain as the primary naming convention, such as `example.com Campaign`.
8. Associate the new Campaign with the active Project using `ProjectAssociateEntity`.
9. Use `GetProject` again to confirm the Campaign is now associated with the active Project.

### Step complete when

Step 2 is complete only when the active Project has a Campaign associated with it for the WooCommerce store domain.

For Step 2, this is sufficient:

```text
The active Project contains the correct Campaign in its associated campaign entities.
```

### Do not continue until

The AI/MCP must not move to Step 3 until Step 2 is complete.

A Campaign that exists in RevCent but is not associated with the active Project does not make Step 2 complete.

---

## Step 3: Create or Confirm Gateway Group

### What this step is for

This step ensures the WooCommerce store has a Gateway Group in RevCent and that the Gateway Group is associated with the active Project.

The Gateway Group should be named using the WooCommerce store domain as the primary naming convention.

Example:

```text
example.com Gateway Group
```

### What the AI/MCP should do

1. Confirm Step 2 is complete.
2. Use `GetProject` to retrieve the active Project.
3. Check the Project's associated `gateway_group` entities.
4. If the Project already has a Gateway Group associated with it for the WooCommerce store domain, use that Gateway Group and mark Step 3 complete.
5. If the Project has more than one Gateway Group that could be the correct Gateway Group for the WooCommerce store domain, ask the user to choose the correct Gateway Group.
6. If the Project does not have a Gateway Group associated with it for the WooCommerce store domain, create a new Gateway Group using `CreateGatewayGroup`.
7. Name the new Gateway Group using the domain as the primary naming convention, such as `example.com Gateway Group`.
8. Associate the new Gateway Group with the active Project using `ProjectAssociateEntity` with `entity_type` set to `gateway_group`.
9. Use `GetProject` again to confirm the Gateway Group is now associated with the active Project.
10. Store the active `gateway_group_id` for the next step.

### Step complete when

Step 3 is complete only when all of the following are true:

```text
1. The active Project contains the correct Gateway Group in its associated gateway_group entities.
2. The Gateway Group corresponds to the WooCommerce store domain.
3. gateway_group_id is confirmed and stored for Step 4.
```

### Do not continue until

The AI/MCP must not move to Step 4 until Step 3 is complete.

A Gateway Group that exists in RevCent but is not associated with the active Project does not make Step 3 complete.

---

## Step 4: Add or Confirm Payment Gateway

### What this step is for

This step ensures the WooCommerce store has the payment gateway or gateways the user wants to use in RevCent, that each Gateway is associated with the active Project, and that each enabled Gateway is added to the Gateway Group from Step 3.

A user may want to add one Gateway or multiple Gateways. Each Gateway must be handled one by one.

Each Gateway should be named using the WooCommerce store domain as the primary naming convention.

Examples:

```text
example.com Gateway
example.com Gateway 2
example.com Stripe Gateway
example.com NMI Gateway
```

### What the AI/MCP should do

1. Confirm Step 3 is complete.
2. Use `GetProject` to retrieve the active Project.
3. Use the `gateway_group_id` confirmed in Step 3 as the Gateway Group for this step.
4. Check the Project's associated `gateway` entities.
5. Ask the user whether they want to use one Gateway or multiple Gateways for this WooCommerce store.
6. For any existing Project-associated Gateway the user wants to use, retrieve it using `GetUserGateway`.
7. If the Project has more than one Gateway that could be correct for the WooCommerce store domain, ask the user which Gateway or Gateways should be used.
8. For each existing Gateway the user wants to use:
   1. Retrieve the Gateway using `GetUserGateway`.
   2. If `enabled` is not `true`, ask the user to confirm that this Gateway should be enabled.
   3. If the user confirms the Gateway should be enabled, use `EditUserGateway` to set `enabled` to `true`.
   4. Use `GetUserGateway` again to confirm `enabled` is `true`.
   5. Use `GetGatewayGroup` to check whether the Gateway is already in the Step 3 Gateway Group.
   6. If the enabled Gateway is not already in the Step 3 Gateway Group, use `AddUserGatewayToGatewayGroup` to add the Gateway to that Gateway Group.
   7. Use `GetGatewayGroup` again to confirm the Gateway is in the Step 3 Gateway Group.
9. For each new Gateway the user wants to add, complete the full Gateway creation process one Gateway at a time.
10. Do not start creating the next new Gateway until the current new Gateway has completed the full process below.
11. For each new Gateway, use `GetSiteGateways` to retrieve available Site Gateways.
12. Ask the user which Site Gateway/payment processor they want to use for that specific Gateway.
13. Use `GetSiteGateway` for the selected Site Gateway to inspect the required fields.
14. Do not ask the user to type sensitive gateway credentials into the AI/MCP chat.
15. Create a Secure Form for the selected Site Gateway using `CreateSecureForm` with `form_source` set to `gateway` and `form_source_id` set to the selected `site_gateway_id`.
16. Clearly display the Secure Form URL to the user. The URL must be shown as a standalone, easy-to-copy value and must not be hidden inside explanatory text.

    Example display format:

    ```text
    Secure Form URL: https://example-secure-form-url
    ```

17. Tell the user to open the Secure Form URL, complete the gateway credentials for that specific Gateway, and submit the form.
18. Do not continue within Step 4 for that Gateway until the user confirms the Secure Form has been completed and submitted.
19. Create the new Gateway using `CreateUserGateway` with the selected `site_gateway_id`, the completed `secure_form_id`, and a name using the domain as the primary naming convention.
20. Associate the new Gateway with the active Project using `ProjectAssociateEntity` with `entity_type` set to `gateway`.
21. Use `GetUserGateway` to confirm the Gateway exists and `enabled` is `true`.
22. After the new Gateway is confirmed enabled, use `AddUserGatewayToGatewayGroup` to add the Gateway to the Step 3 Gateway Group.
23. Use `GetGatewayGroup` to confirm the Gateway is in the Step 3 Gateway Group.
24. Use `GetProject` again to confirm the Gateway is associated with the active Project.
25. Repeat steps 11 through 24 for each additional new Gateway the user wants to add.
26. Store all confirmed `user_gateway_id` values for the current onboarding flow.

### Step complete when

Step 4 is complete only when all of the following are true:

```text
1. Every Gateway the user wants to use for the WooCommerce store has been handled one by one.
2. Each Gateway corresponds to the WooCommerce store domain.
3. The active Project contains each selected or newly created Gateway in its associated gateway entities.
4. `GetUserGateway` confirms each Gateway exists.
5. `GetUserGateway` confirms each Gateway has `enabled` set to `true`.
6. `GetGatewayGroup` confirms each Gateway is included in the Step 3 Gateway Group.
7. All confirmed user_gateway_id values are stored for the current onboarding flow.
```

### Do not continue until

The AI/MCP must not move to Step 5 until Step 4 is complete.

A Gateway that exists in RevCent but is not associated with the active Project does not make Step 4 complete.

A Gateway that is associated with the active Project but is not enabled does not make Step 4 complete.

A Gateway that is enabled but has not been added to the Step 3 Gateway Group does not make Step 4 complete.

If the user wants to add multiple Gateways, the AI/MCP must process them sequentially. Each Gateway must complete the full `Site Gateway > Secure Form > completed form confirmation > CreateUserGateway > Project association > enabled confirmation > Gateway Group association` sequence before the AI/MCP starts the next Gateway.

The AI/MCP must not collect gateway credentials directly in chat. Sensitive gateway credentials must be collected through a Secure Form.

The Secure Form URL must be clearly displayed to the user before the AI/MCP waits for Secure Form completion.

The AI/MCP must not create a Gateway until the user has selected the Site Gateway/payment processor for that specific Gateway and completed the Secure Form.

---

## Step 5: Create or Confirm Payment Profile

### What this step is for

This step ensures the WooCommerce store has a Payment Profile in RevCent and that the Payment Profile is associated with the active Project.

The Payment Profile should be named using the WooCommerce store domain as the primary naming convention.

Example:

```text
example.com Payment Profile
```

### What the AI/MCP should do

1. Confirm Step 4 is complete.
2. Use `GetProject` to retrieve the active Project.
3. Use the `gateway_group_id` confirmed in Step 3 as the Gateway Group for this step if a new Payment Profile must be created.
4. Check the Project's associated `payment_profile` entities.
5. If the Project already has a Payment Profile associated with it for the WooCommerce store domain, retrieve it using `GetPaymentProfile`.
6. If the Project has more than one Payment Profile that could be the correct Payment Profile for the WooCommerce store domain, ask the user to choose the correct Payment Profile.
7. If an existing Project-associated Payment Profile is selected or confirmed, do not modify its `payment_flow` during onboarding.
8. If the existing Project-associated Payment Profile has `enabled` not set to `true`, use `EditPaymentProfile` to set `enabled` to `true`.
9. Use `GetPaymentProfile` again to confirm the existing Project-associated Payment Profile has `enabled` set to `true`.
10. Store the existing `payment_profile_id` and mark Step 5 complete.
11. If the Project does not have a Payment Profile associated with it for the WooCommerce store domain, create a new Payment Profile using `CreatePaymentProfile`.
12. Name the new Payment Profile using the domain as the primary naming convention, such as `example.com Payment Profile`.
13. The new Payment Profile must include a simple payment flow with this structure:

    ```text
    start_payment_request
      ↓
    action_choose_gateway
      ↓
    action_process_payment
    ```

14. The `action_choose_gateway` node for the new Payment Profile must use the Step 3 Gateway Group and must use `evenly_distribute`.
15. The `action_choose_gateway` node settings for the new Payment Profile must include:

    ```json
    {
      "selection_source": "gateway_group",
      "selection_method": "evenly_distribute",
      "gateway_groups": [
        "STEP_3_GATEWAY_GROUP_ID"
      ]
    }
    ```

16. Associate the new Payment Profile with the active Project using `ProjectAssociateEntity` with `entity_type` set to `payment_profile`.
17. Use `GetPaymentProfile` to confirm the new Payment Profile exists and has `enabled` set to `true`.
18. Use `GetProject` again to confirm the new Payment Profile is associated with the active Project.
19. Store the active `payment_profile_id` for later onboarding steps.

### Step complete when

Step 5 is complete when one of the following is true:

```text
Existing Payment Profile path:
1. The active Project contains the correct Payment Profile in its associated payment_profile entities.
2. The Payment Profile corresponds to the WooCommerce store domain.
3. GetPaymentProfile confirms the Payment Profile exists.
4. GetPaymentProfile confirms the Payment Profile has enabled set to true.
5. The existing Payment Profile payment_flow was not modified.
6. payment_profile_id is confirmed and stored.
```

```text
New Payment Profile path:
1. A new Payment Profile was created for the WooCommerce store domain.
2. The new Payment Profile contains start_payment_request → action_choose_gateway → action_process_payment.
3. The new action_choose_gateway node uses selection_source = gateway_group.
4. The new action_choose_gateway node uses selection_method = evenly_distribute.
5. The new action_choose_gateway node uses the Gateway Group from Step 3.
6. The new Payment Profile is associated with the active Project.
7. GetPaymentProfile confirms the new Payment Profile has enabled set to true.
8. payment_profile_id is confirmed and stored.
```

### Do not continue until

The AI/MCP must not move to Step 6 until Step 5 is complete.

A Payment Profile that exists in RevCent but is not associated with the active Project does not make Step 5 complete.

If a Project-associated Payment Profile already exists for the WooCommerce store domain, the AI/MCP must not modify its `payment_flow` during onboarding. The only allowed onboarding edit to an existing Project-associated Payment Profile is setting `enabled` to `true` if it is not already enabled.

The simple `start_payment_request → action_choose_gateway → action_process_payment` flow must only be created when creating a new Payment Profile.

A Payment Profile does not make Step 5 complete unless `GetPaymentProfile` confirms `enabled` is `true`.

A newly created Payment Profile does not make Step 5 complete unless it uses the Step 3 Gateway Group with `selection_method` set to `evenly_distribute`, is enabled, and is associated with the active Project.

---

## Step 6: Create, Initialize, and Confirm Tracking Domain

### What this step is for

This step ensures the WooCommerce store has a RevCent Tracking Domain for the store domain.

The Tracking Domain should be named using the WooCommerce store domain as the primary naming convention.

Example:

```text
example.com Tracking Domain
```

### What the AI/MCP should do

1. Confirm Step 5 is complete.
2. Use `GetProject` to retrieve the active Project.
3. Check the Project's associated `tracking_domain` entities.
4. If the Project already has a Tracking Domain associated with it for the WooCommerce store domain, retrieve it using `GetTrackingDomain`.
5. If the Project has more than one Tracking Domain that could be the correct Tracking Domain for the WooCommerce store domain, ask the user to choose the correct Tracking Domain.
6. If the Project does not have a Tracking Domain associated with it for the WooCommerce store domain, create a new Tracking Domain using `CreateTrackingDomain`.
7. Name the new Tracking Domain using the domain as the primary naming convention, such as `example.com Tracking Domain`.
8. Use the normalized WooCommerce store domain as the Tracking Domain `domain` value.
9. Associate the Tracking Domain with the active Project using `ProjectAssociateEntity` with `entity_type` set to `tracking_domain`.
10. If A records are provided by `CreateTrackingDomain` or `GetTrackingDomain`, clearly display the exact A records to the user before continuing.
11. Display the A records in a simple table with one row per DNS record, including at minimum:
    - `Type`
    - `Name` / `Host`
    - `Value` / `Points to`
12. Do not summarize, hide, abbreviate, or alter the A record values.
13. Instruct the user to add the displayed A records to the DNS provider for the WooCommerce store domain.
14. Ask the user to confirm that every displayed A record has been added.
15. Do not continue within Step 6 until the user confirms the A records have been added.
16. Run `InitializeTrackingDomainSSL` for the Tracking Domain only after the user confirms the A records have been added.
17. If CNAME records are provided by `InitializeTrackingDomainSSL` or `GetTrackingDomain`, clearly display the exact CNAME records to the user before continuing.
18. Display the CNAME records in a simple table with one row per DNS record, including at minimum:
    - `Type`
    - `Name` / `Host`
    - `Value` / `Target` / `Points to`
19. Do not summarize, hide, abbreviate, or alter the CNAME record values.
20. Instruct the user to add the displayed CNAME records to the DNS provider for the WooCommerce store domain.
21. Ask the user to confirm that every displayed CNAME record has been added.
22. Do not continue within Step 6 until the user confirms the CNAME records have been added.
23. Use `GetTrackingDomain` to check SSL status.
24. Do not continue until SSL status is `ISSUED`.
25. Run `InitializeTrackingDomainDNS` for the Tracking Domain only after the user confirms the CNAME records have been added and SSL status is `ISSUED`.
26. Use `GetTrackingDomain` to check DNS status.
27. Do not continue until DNS status is `COMPLETE`.
28. After SSL status is `ISSUED` and DNS status is `COMPLETE`, use `GetTrackingDomain` to check whether the Tracking Domain `enabled` value is `true`.
29. If `enabled` is not `true`, use `EditTrackingDomain` to set `enabled` to `true`.
30. Use `GetTrackingDomain` again to confirm `enabled` is `true`.
31. Use `GetProject` again to confirm the Tracking Domain is associated with the active Project.

### Step complete when

Step 6 is complete only when all of the following are true:

```text
1. The Tracking Domain corresponds to the active Project's WooCommerce store domain AND is associated with the active Project as a tracking_domain entity.
2. `GetTrackingDomain` confirms `ssl.status` is `ISSUED`.
3. `GetTrackingDomain` confirms `dns.status` is `COMPLETE`.
4. `GetTrackingDomain` confirms `enabled` is `true`.
```

### Do not continue until

The AI/MCP must not move to Step 7 until Step 6 is complete.

A Tracking Domain that exists in RevCent but is not associated with the active Project does not make Step 6 complete.

A Tracking Domain that is associated with the active Project but does not have `ssl.status` of `ISSUED`, `dns.status` of `COMPLETE`, and `enabled` set to `true` does not make Step 6 complete.

The AI/MCP must not call `InitializeTrackingDomainSSL` until the A records have been clearly displayed to the user and the user has confirmed they have been added to DNS.

The AI/MCP must not call `InitializeTrackingDomainDNS` until the CNAME records have been clearly displayed to the user, the user has confirmed they have been added to DNS, and `GetTrackingDomain` confirms `ssl.status` is `ISSUED`.

After `GetTrackingDomain` confirms `ssl.status` is `ISSUED` and `dns.status` is `COMPLETE`, the AI/MCP must check the Tracking Domain `enabled` value. If `enabled` is not `true`, the AI/MCP must use `EditTrackingDomain` to set `enabled` to `true`, then retrieve the Tracking Domain again with `GetTrackingDomain` to confirm `enabled` is `true` before moving to Step 7.

---

## Step 7: Confirm RevCent Payments Plugin Installation and Enablement

### What this step is for

This step ensures the WooCommerce store has the RevCent Payments plugin installed and enabled correctly before continuing.

The plugin must be enabled in WordPress Plugins (`Plugins > Installed Plugins`) AND enabled in the WooCommerce payment settings (`WooCommerce > Settings > Payments`).

The only configuration the user needs to make inside the RevCent Payments plugin settings is to check the **Enable DNS Tracking** checkbox, then save settings. All other RevCent Payments plugin configuration fields can be left alone.

### What the AI/MCP should do

1. Confirm Step 6 is complete.
2. Tell the user that the RevCent Payments plugin must be installed on the WooCommerce site.
3. Tell the user that the plugin must be enabled in WordPress Plugins (`Plugins > Installed Plugins`).
4. Tell the user that the plugin must also be enabled in the WooCommerce payment settings (`WooCommerce > Settings > Payments`).
5. Tell the user to open the RevCent Payments plugin settings, check the **Enable DNS Tracking** checkbox, and save settings.
6. Tell the user that all other RevCent Payments plugin configuration fields can be left alone.
7. Ask the user to confirm that all four requirements are complete:
   - the RevCent Payments plugin is installed
   - the RevCent Payments plugin is enabled in WordPress Plugins (`Plugins > Installed Plugins`)
   - RevCent Payments is enabled in WooCommerce payment settings (`WooCommerce > Settings > Payments`)
   - **Enable DNS Tracking** is checked in the RevCent Payments plugin settings and settings have been saved

### Step complete when

Step 7 is complete only when the user confirms all of the following:

```text
RevCent Payments plugin is installed on the WooCommerce site
AND RevCent Payments plugin is enabled in WordPress Plugins > Installed Plugins
AND RevCent Payments is enabled in WooCommerce > Settings > Payments
AND Enable DNS Tracking is checked in the RevCent Payments plugin settings
AND the RevCent Payments plugin settings have been saved
```

### Do not continue until

The AI/MCP must not move to Step 8 until Step 7 is complete.

If the user has not installed the RevCent Payments plugin, the AI/MCP must stop and instruct the user to install it before continuing.

If the user has installed the plugin but has not enabled it in both required places, the AI/MCP must stop and instruct the user to enable it in WordPress Plugins (`Plugins > Installed Plugins`) and in WooCommerce payment settings (`WooCommerce > Settings > Payments`) before continuing.

If the user has not checked **Enable DNS Tracking** inside the RevCent Payments plugin settings and saved settings, the AI/MCP must stop and instruct the user to check **Enable DNS Tracking** and save settings before continuing.

---

## Step 8: Create or Confirm WooCommerce User Third Party Shop

### What this step is for

This step connects the WooCommerce store to RevCent by creating the User Third Party Shop, also referred to as a User Shop.

The User Third Party Shop should use the WooCommerce store domain from the active Project. The AI/MCP must confirm the shop domain with the user before creating the User Third Party Shop.

The User Third Party Shop should be named using the WooCommerce store domain as the primary naming convention.

Example:

```text
example.com Third Party Shop
```

### What the AI/MCP should do

1. Confirm Step 7 is complete.
2. Use `GetProject` to retrieve the active Project.
3. Check the Project's associated `third_party_shop` entities.
4. If the Project already has a User Third Party Shop associated with it for the WooCommerce store domain, retrieve it using `GetUserShop` and mark Step 8 complete if it corresponds to the same WooCommerce store domain.
5. If the Project has more than one User Third Party Shop that could be correct for the WooCommerce store domain, ask the user to choose the correct User Third Party Shop.
6. If no correct User Third Party Shop exists for the active Project, create a new one using this step.
7. Tell the user they must first create or locate a WooCommerce REST API Consumer Key and Consumer Secret with **Read/Write** permissions.
8. Provide the user these WooCommerce REST API key instructions:

   ```text
   1. Log in to the WordPress admin dashboard for the WooCommerce store.
   2. Confirm WordPress permalinks are not set to Plain by going to Settings > Permalinks and selecting any option other than Plain if needed.
   3. Go to WooCommerce > Settings > Advanced > REST API.
   4. Click Create an API key or Add key.
   5. Enter a clear description, such as RevCent example.com.
   6. Select the WordPress user the key should belong to.
   7. Set Permissions to Read/Write.
   8. Click Generate API Key.
   9. Copy the Consumer Key and Consumer Secret.
   10. Do not paste the Consumer Key or Consumer Secret into the AI/MCP chat.
   ```

9. Ask the user to confirm they have the WooCommerce REST API Consumer Key and Consumer Secret ready.
10. Do not continue within Step 8 until the user confirms they have the Consumer Key and Consumer Secret ready.
11. Use `GetSiteShops` to find the WooCommerce Site Shop.
12. If needed, use `GetSiteShop` to inspect the WooCommerce Site Shop and its required fields.
13. Confirm the WooCommerce store domain with the user before creating the User Third Party Shop.
14. The confirmed shop domain must match the active Project's WooCommerce store domain.
15. If the user provides a different domain, stop and resolve the domain mismatch before continuing.
16. Create a Secure Form using `CreateSecureForm` with `form_source` set to `third_party_shop` and `form_source_id` set to the WooCommerce `site_shop_id`.
17. Clearly display the Secure Form URL to the user. The URL must be shown as a standalone, easy-to-copy value and must not be hidden inside explanatory text.

    Example display format:

    ```text
    Secure Form URL: https://example-secure-form-url
    ```

18. Tell the user to open the Secure Form URL, enter the WooCommerce REST API Consumer Key and Consumer Secret, and submit the form.
19. Tell the user the Secure Form expires after 1 hour.
20. Do not continue within Step 8 until the user confirms the Secure Form has been completed and submitted.
21. Create the User Third Party Shop using `CreateUserShop` with:
    - `name` using the domain naming convention, such as `example.com Third Party Shop`
    - `url` using the confirmed WooCommerce store domain
    - `campaign_id` from Step 2
    - `payment_profile_id` from Step 5
    - `site_shop_id` for WooCommerce
    - `site_shop_version` set to `3` for WooCommerce unless the user confirms a different required value
    - `secure_form_id` from the completed Secure Form
22. Associate the User Third Party Shop with the active Project using `ProjectAssociateEntity` with `entity_type` set to `third_party_shop`.
23. Use `GetUserShop` to confirm the User Third Party Shop exists and the `url` corresponds to the active Project's WooCommerce store domain.
24. Use `GetProject` again to confirm the User Third Party Shop is associated with the active Project.
25. Store the active `user_shop_id` for the current onboarding flow.

### Step complete when

Step 8 is complete only when all of the following are true:

```text
1. The active Project contains the correct User Third Party Shop in its associated third_party_shop entities.
2. The User Third Party Shop corresponds to the active Project's WooCommerce store domain.
3. The user confirmed the WooCommerce store domain before CreateUserShop was called.
4. The user confirmed they had a WooCommerce REST API Consumer Key and Consumer Secret with Read/Write permissions before the Secure Form was created.
5. The Secure Form URL was clearly displayed to the user.
6. The user confirmed the Secure Form was completed and submitted.
7. CreateUserShop was completed using the confirmed Project domain, Step 2 campaign_id, Step 5 payment_profile_id, WooCommerce site_shop_id, WooCommerce site_shop_version, and completed secure_form_id.
8. GetUserShop confirms the User Third Party Shop exists and has the correct URL/domain.
9. GetProject confirms the User Third Party Shop is associated with the active Project.
10. user_shop_id is confirmed and stored.
```

### Do not continue until

The AI/MCP must not move to the next step until Step 8 is complete.

A User Third Party Shop that exists in RevCent but is not associated with the active Project does not make Step 8 complete.

A User Third Party Shop that is associated with the active Project but has a different domain than the active Project's WooCommerce store domain does not make Step 8 complete.

The AI/MCP must not ask the user to paste the WooCommerce REST API Consumer Key or Consumer Secret into chat.

The AI/MCP must not create the Secure Form until the user confirms they have a WooCommerce REST API Consumer Key and Consumer Secret with Read/Write permissions.

The AI/MCP must not call `CreateUserShop` until the Secure Form URL has been clearly displayed and the user confirms the Secure Form has been completed and submitted.

The AI/MCP must not call `CreateUserShop` unless the WooCommerce store domain has been confirmed with the user and matches the active Project's WooCommerce store domain.

---

## Step 9: Validate and Fix WooCommerce User Third Party Shop

### What this step is for

This step confirms the WooCommerce User Third Party Shop is properly set up in RevCent and that RevCent can validate the shop connection and required RevCent Payments plugin settings.

It is normal for the first validation attempt to be unsuccessful immediately after the User Third Party Shop is created.

### What the AI/MCP should do

1. Confirm Step 8 is complete.
2. Use the `user_shop_id` from Step 8.
3. Run `ValidateUserShop` using the `user_shop_id`.
4. If `ValidateUserShop` returns a successful response indicating the shop is properly set up, mark Step 9 complete.
5. If `ValidateUserShop` does not return a successful response indicating the shop is properly set up, run `FixUserShop` using the same `user_shop_id`.
6. Do not tell the user before running `FixUserShop` after the first validation failure. This first failure can be normal, and the AI/MCP should automatically attempt the fix.
7. After `FixUserShop` completes, run `ValidateUserShop` again using the same `user_shop_id`.
8. If `ValidateUserShop` returns a successful response indicating the shop is properly set up, mark Step 9 complete.
9. If validation still fails, repeat the same sequence until either validation succeeds or `FixUserShop` has been attempted 3 total times.
10. After each `FixUserShop` attempt, run `ValidateUserShop` again.
11. Step 9 is not complete unless a final `ValidateUserShop` response indicates the shop is properly set up.

### If validation still fails after 3 fix attempts

If `ValidateUserShop` still does not return a successful setup response after 3 total `FixUserShop` attempts, the likely causes are:

1. The RevCent Payments plugin or RevCent payment method is not enabled correctly from Step 7.
2. The WooCommerce REST API `consumer_key` and/or `consumer_secret` provided through the Secure Form were invalid.

The AI/MCP should then do the following:

1. Tell the user that validation still failed after 3 automatic fix attempts.
2. Ask the user to re-check Step 7:
   - RevCent Payments plugin is enabled in `Plugins > Installed Plugins`.
   - RevCent Payments is enabled in `WooCommerce > Settings > Payments`.
   - The `Enable DNS Tracking` checkbox is checked in the RevCent Payments plugin settings.
   - Settings were saved.
3. Ask the user whether they want to update the WooCommerce REST API credentials for the existing User Shop.
4. If the user wants to update credentials, create a new Secure Form using:

```json
{
  "form_source": "third_party_shop",
  "form_source_id": "SITE_SHOP_ID"
}
```

5. Clearly display the new Secure Form URL to the user as a standalone value.
6. Tell the user not to paste the `consumer_key` or `consumer_secret` into chat.
7. Wait for the user to confirm the Secure Form is complete.
8. After the user confirms the Secure Form is complete, run `EditUserShop` using the existing `user_shop_id` and the new `secure_form_id`.
9. After editing the User Shop credentials, run `ValidateUserShop` again.
10. If validation still fails after the credentials update, stop and provide the remaining validation result so the user can resolve it manually or contact support.

### Step complete when

Step 9 is complete only when `ValidateUserShop` returns a successful response indicating the WooCommerce User Third Party Shop is properly set up.

Valid completion paths:

```text
Path 1:
ValidateUserShop returns successful setup result

Path 2:
ValidateUserShop does not return successful setup result
> FixUserShop runs automatically
> ValidateUserShop returns successful setup result

Path 3:
ValidateUserShop does not return successful setup result
> FixUserShop runs automatically up to 3 total times
> ValidateUserShop returns successful setup result after one of the fix attempts

Path 4:
ValidateUserShop still fails after 3 FixUserShop attempts
> User re-checks Step 7 and/or updates WooCommerce REST API credentials with a new Secure Form
> EditUserShop updates the existing User Shop credentials using the new secure_form_id
> ValidateUserShop returns successful setup result
```

### Do not continue until

The AI/MCP must not move to the next step until Step 9 is complete.

The AI/MCP must not consider Step 9 complete merely because `FixUserShop` ran successfully.

The AI/MCP must not consider Step 9 complete merely because `EditUserShop` updated the credentials.

The AI/MCP must not consider Step 9 complete unless a final `ValidateUserShop` response indicates the shop is properly set up.

The AI/MCP must not run more than 3 total `FixUserShop` attempts during Step 9 before stopping to address Step 7 enablement or WooCommerce REST API credential issues.

---

## Step 10: Create or Confirm PayPal Account for the WooCommerce Shop

### What this step is for

This step determines whether the WooCommerce store accepts PayPal and, if it does, ensures the correct PayPal Account is set up in RevCent, associated with the current User Third Party Shop, and associated with the active Project.

If the user does not accept PayPal on the current Project domain WooCommerce store, this step is complete without creating a PayPal Account.

The PayPal Account should be named using the WooCommerce store domain as the primary naming convention.

Example:

```text
example.com PayPal Account
```

### What the AI/MCP should do

1. Confirm Step 9 is complete.
2. Ask the user whether they accept PayPal on the current Project domain WooCommerce store.
3. Clearly state the current Project domain before asking, so the user is answering for the correct WooCommerce store.
4. If the user says they do not accept PayPal on this WooCommerce store, mark Step 10 complete.
5. If the user says they do accept PayPal on this WooCommerce store, use `GetProject` to retrieve the active Project.
6. Check the Project's associated `paypal_account` entities.
7. If the Project already has a PayPal Account that clearly belongs to the current WooCommerce store and is associated with the current User Third Party Shop, use that PayPal Account and mark Step 10 complete.
8. If the Project has more than one PayPal Account that could be correct for the WooCommerce store domain, ask the user to choose the correct PayPal Account.
9. If there is no correct Project-associated PayPal Account for the current WooCommerce store, ask the user for the PayPal account email address used for this WooCommerce store.
10. Do not ask the user to paste PayPal API credentials, secrets, tokens, passwords, or any other sensitive PayPal credentials into chat.
11. Create a Secure Form using `CreateSecureForm` with `form_source` set to `paypal_account`.
12. Clearly display the Secure Form URL to the user. The URL must be shown as a standalone, easy-to-copy value and must not be hidden inside explanatory text.

    Example display format:

    ```text
    Secure Form URL: https://example-secure-form-url
    ```

13. Tell the user to open the Secure Form URL, enter the required PayPal credentials, and submit the form.
14. Tell the user the Secure Form expires after 1 hour.
15. Do not continue within Step 10 until the user confirms the Secure Form has been completed and submitted.
16. Create the PayPal Account using `CreatePayPalAccount` with:
    - `name` using the domain naming convention, such as `example.com PayPal Account`
    - `description` indicating it is the PayPal Account for the current Project domain WooCommerce store
    - `paypal_account_email` confirmed by the user
    - `campaign` using the Step 2 `campaign_id`
    - `third_party_shop` containing the Step 8 `user_shop_id`
    - `enabled` set to `true`
    - `transaction_confirmation` set to `false` unless the user explicitly requests delayed PayPal transaction confirmation
    - `add_tracking` set to `true` unless the user explicitly does not want RevCent to add shipment tracking to PayPal transactions
    - `secure_form_id` from the completed Secure Form
17. Associate the PayPal Account with the active Project using `ProjectAssociateEntity` with `entity_type` set to `paypal_account`.
18. Use `GetPayPalAccount` to confirm the PayPal Account exists, is enabled, uses the confirmed PayPal account email, and is associated with the current User Third Party Shop.
19. Use `GetProject` again to confirm the PayPal Account is associated with the active Project.
20. Store the active `paypal_account_id` for the current onboarding flow.

### Step complete when

Step 10 is complete when either of the following paths is true:

```text
Path 1:
The user confirms they do not accept PayPal on the current Project domain WooCommerce store.
```

```text
Path 2:
The user confirms they accept PayPal on the current Project domain WooCommerce store
AND a PayPal Account exists in RevCent for that store
AND the PayPal Account is associated with the current User Third Party Shop
AND the PayPal Account is associated with the active Project
AND GetPayPalAccount confirms the PayPal Account is enabled
AND paypal_account_id is confirmed and stored.
```

### Do not continue until

The AI/MCP must not move to the next step until Step 10 is complete.

The AI/MCP must not create a PayPal Account unless the user confirms they accept PayPal on the current Project domain WooCommerce store.

The AI/MCP must not ask the user to paste PayPal credentials, secrets, tokens, passwords, or other sensitive PayPal credentials into chat.

The AI/MCP must not call `CreatePayPalAccount` until the Secure Form URL has been clearly displayed and the user confirms the Secure Form has been completed and submitted.

The AI/MCP must not consider Step 10 complete for a PayPal-accepting store unless the PayPal Account is associated with both the current User Third Party Shop and the active Project.

---

## Step 11: Create or Confirm Fulfillment Account for Shippable Products

### What this step is for

This step ensures the WooCommerce store has the correct Fulfillment Account in RevCent for products from the current Project domain WooCommerce shop that are shippable.

If an existing Fulfillment Account is already associated with the active Project, the AI/MCP must confirm with the user that the found Fulfillment Account should be used for the Project's shippable shop products before treating the step as complete.

If no Fulfillment Account is associated with the active Project, the AI/MCP must ask the user which fulfillment center, fulfillment service, or fulfillment SaaS they use, then create a Fulfillment Account for the Project.

The Fulfillment Account should be named using the WooCommerce store domain as the primary naming convention.

Example:

```text
example.com Fulfillment Account
```

### What the AI/MCP should do

1. Confirm Step 10 is complete.
2. Use `GetProject` to retrieve the active Project.
3. Check the Project's associated `fulfillment_account` entities.
4. If exactly one Fulfillment Account is already associated with the active Project, show the Fulfillment Account name and ID to the user and ask the user to confirm that this Fulfillment Account should be used for the Project's WooCommerce shop products that are shippable.
5. If more than one Fulfillment Account is associated with the active Project, show the Fulfillment Accounts to the user and ask which one should be used for the Project's WooCommerce shop products that are shippable.
6. If the user confirms or selects an existing Project-associated Fulfillment Account, use `GetFulfillmentAccount` to retrieve it and store the confirmed `fulfillment_account_id`.
7. If no Fulfillment Account is associated with the active Project, ask the user which fulfillment center, fulfillment service, or fulfillment SaaS they use for the current Project domain WooCommerce store.
8. Use `GetSiteFulfillmentCenters` to retrieve available Site Fulfillment Centers.
9. Match the user's fulfillment center, fulfillment service, or fulfillment SaaS to the correct Site Fulfillment Center.
10. If there is ambiguity, ask the user to choose the correct Site Fulfillment Center before continuing.
11. Use `GetSiteFulfillmentCenter` to inspect the required fields for the selected Site Fulfillment Center.
12. Do not ask the user to type sensitive fulfillment credentials into the AI/MCP chat.
13. If the selected Site Fulfillment Center requires credentials or other sensitive fields, create a Secure Form using `CreateSecureForm` with `form_source` set to `fulfillment_center` and `form_source_id` set to the selected `site_fulfillment_center_id`.
14. Clearly display the Secure Form URL to the user. The URL must be shown as a standalone, easy-to-copy value and must not be hidden inside explanatory text.

    Example display format:

    ```text
    Secure Form URL: https://example-secure-form-url
    ```

15. Tell the user to open the Secure Form URL, enter the required fulfillment credentials, and submit the form.
16. Tell the user the Secure Form expires after 1 hour.
17. Do not continue within Step 11 until the user confirms the Secure Form has been completed and submitted, if a Secure Form was required.
18. Create the Fulfillment Account using `CreateFulfillmentAccount` with:
    - `name` using the domain naming convention, such as `example.com Fulfillment Account`
    - `description` indicating it is the fulfillment account for the current Project domain WooCommerce store
    - the selected Site Fulfillment Center
    - the completed `secure_form_id`, if a Secure Form was required
    - any required non-sensitive fields for the selected fulfillment center
19. Associate the Fulfillment Account with the active Project using `ProjectAssociateEntity` with `entity_type` set to `fulfillment_account`.
20. Use `GetFulfillmentAccount` to confirm the Fulfillment Account exists.
21. Use `GetProject` again to confirm the Fulfillment Account is associated with the active Project.
22. Store the active `fulfillment_account_id` for the current onboarding flow.

### Step complete when

Step 11 is complete when either of the following paths is true:

```text
Path 1:
The active Project already has a Fulfillment Account associated with it
AND the user confirms that the Fulfillment Account should be used for the Project's WooCommerce shop products that are shippable
AND GetFulfillmentAccount confirms the Fulfillment Account exists
AND fulfillment_account_id is confirmed and stored.
```

```text
Path 2:
No suitable Fulfillment Account was already associated with the active Project
AND the user identifies the fulfillment center, fulfillment service, or fulfillment SaaS used for the current Project domain WooCommerce store
AND the correct Site Fulfillment Center is selected
AND any required Secure Form is clearly displayed and completed
AND CreateFulfillmentAccount creates the Fulfillment Account
AND the Fulfillment Account is associated with the active Project
AND GetProject confirms the Fulfillment Account appears in the Project's associated fulfillment_account entities
AND fulfillment_account_id is confirmed and stored.
```

### Do not continue until

The AI/MCP must not move to the next step until Step 11 is complete.

The AI/MCP must not treat an existing Project-associated Fulfillment Account as complete until the user confirms it should be used for the Project's WooCommerce shop products that are shippable.

The AI/MCP must not create a Fulfillment Account until the user identifies the fulfillment center, fulfillment service, or fulfillment SaaS they use for the current Project domain WooCommerce store.

The AI/MCP must not ask the user to paste fulfillment credentials, API keys, tokens, passwords, or other sensitive fulfillment credentials into chat.

If a Secure Form is required, the AI/MCP must not call `CreateFulfillmentAccount` until the Secure Form URL has been clearly displayed and the user confirms the Secure Form has been completed and submitted.

The AI/MCP must not consider Step 11 complete unless the Fulfillment Account is associated with the active Project.

---

## Step 12: Create or Confirm Product Group

### What this step is for

This step ensures the active Project has a Product Group in RevCent for products from the current Project domain WooCommerce store.

The Product Group should be named using the WooCommerce store domain as the primary naming convention.

Example:

```text
example.com Product Group
```

### What the AI/MCP should do

1. Confirm Step 11 is complete.
2. Use `GetProject` to retrieve the active Project.
3. Check the Project's associated `product_group` entities.
4. If a Product Group already exists for the current Project domain, store the confirmed `product_group_id` and treat Step 12 as complete.
5. If more than one Product Group is associated with the active Project, use the Product Group that clearly matches the current Project domain. If more than one Product Group could match the current Project domain, ask the user to choose the correct Product Group before continuing.
6. If no Product Group exists for the current Project domain, create one using `CreateProductGroup`.
7. When creating the Product Group, use:
   - `name` using the domain naming convention, such as `example.com Product Group`
   - `description` indicating it is the Product Group for products from the current Project domain WooCommerce store
8. Associate the Product Group with the active Project using `ProjectAssociateEntity` with `entity_type` set to `product_group`.
9. Use `GetProductGroup` to confirm the Product Group exists.
10. Use `GetProject` again to confirm the Product Group is associated with the active Project.
11. Store the active `product_group_id` for the current onboarding flow.

### Step complete when

Step 12 is complete when either of the following paths is true:

```text
Path 1:
The active Project already has a Product Group associated with it for the current Project domain
AND product_group_id is confirmed and stored.
```

```text
Path 2:
No suitable Product Group was already associated with the active Project
AND CreateProductGroup creates the Product Group using the current Project domain naming convention
AND the Product Group is associated with the active Project
AND GetProject confirms the Product Group appears in the Project's associated product_group entities
AND product_group_id is confirmed and stored.
```

### Do not continue until

The AI/MCP must not move to the next step until Step 12 is complete.

The AI/MCP must not create a duplicate Product Group if a suitable Product Group for the current Project domain is already associated with the active Project.

The AI/MCP must not consider Step 12 complete unless the Product Group exists and is associated with the active Project.

---

## Step 13: Create or Confirm Subscription Profile

### What this step is for

This step determines whether the current Project domain WooCommerce store needs a Subscription Profile in RevCent.

A Subscription Profile is only required if the store sells subscription-based products.

If a Subscription Profile is created, it should be named using the WooCommerce store domain as the primary naming convention.

Example:

```text
example.com Subscription Profile
```

### What the AI/MCP should do

1. Confirm Step 12 is complete.
2. Use `GetProject` to retrieve the active Project.
3. Check the Project's associated `subscription_profile` entities.
4. If a Subscription Profile already exists for the current Project domain, store the confirmed `subscription_profile_id` and treat Step 13 as complete.
5. If more than one Subscription Profile is associated with the active Project, use the Subscription Profile that clearly matches the current Project domain. If more than one Subscription Profile could match the current Project domain, ask the user to choose the correct Subscription Profile before continuing.
6. If no Subscription Profile exists for the current Project domain, ask the user whether they sell any subscription-based products on the current Project domain WooCommerce store.
7. If the user says they do not sell subscription-based products, mark Step 13 complete without creating a Subscription Profile.
8. If the user says they do sell subscription-based products, ask the user for the subscription billing requirements needed to create the Subscription Profile.
9. Create the Subscription Profile using `CreateSubscriptionProfile`.
10. When creating the Subscription Profile, use:
    - `name` using the domain naming convention, such as `example.com Subscription Profile`
    - `description` indicating it is the Subscription Profile for subscription products from the current Project domain WooCommerce store
    - the subscription billing settings confirmed by the user
11. Associate the Subscription Profile with the active Project using `ProjectAssociateEntity` with `entity_type` set to `subscription_profile`.
12. Use `GetSubscriptionProfile` to confirm the Subscription Profile exists.
13. Use `GetProject` again to confirm the Subscription Profile is associated with the active Project.
14. Store the active `subscription_profile_id` for the current onboarding flow.

### Step complete when

Step 13 is complete when one of the following paths is true:

```text
Path 1:
The active Project already has a Subscription Profile associated with it for the current Project domain
AND subscription_profile_id is confirmed and stored.
```

```text
Path 2:
No Subscription Profile was associated with the active Project
AND the user confirms they do not sell subscription-based products on the current Project domain WooCommerce store.
```

```text
Path 3:
No suitable Subscription Profile was already associated with the active Project
AND the user confirms they sell subscription-based products on the current Project domain WooCommerce store
AND the user provides the required subscription billing settings
AND CreateSubscriptionProfile creates the Subscription Profile using the current Project domain naming convention
AND the Subscription Profile is associated with the active Project
AND GetSubscriptionProfile confirms the Subscription Profile exists
AND GetProject confirms the Subscription Profile appears in the Project's associated subscription_profile entities
AND subscription_profile_id is confirmed and stored.
```

### Do not continue until

The AI/MCP must not move to the next step until Step 13 is complete.

The AI/MCP must not create a Subscription Profile if the user says the current Project domain WooCommerce store does not sell subscription-based products.

The AI/MCP must not create a duplicate Subscription Profile if a suitable Subscription Profile for the current Project domain is already associated with the active Project.

The AI/MCP must not create a Subscription Profile until the user confirms that subscription-based products are sold on the current Project domain WooCommerce store and provides the required subscription billing settings.

The AI/MCP must not consider Step 13 complete through the creation path unless the Subscription Profile exists and is associated with the active Project.

---

## Step 14: Import and Map WooCommerce Shipping Methods

### What this step is for

This step imports the shipping methods from the current Project domain WooCommerce store and maps each WooCommerce shipping method to a RevCent shipping provider and provider method.

Shipping methods are not Project entities. This step must use the User Third Party Shop associated with the active Project.

### What the AI/MCP should do

1. Confirm Step 13 is complete.
2. Use `GetProject` to retrieve the active Project.
3. Inspect the Project's associated `third_party_shop` entities.
4. Identify the User Third Party Shop for the current Project domain WooCommerce store.
5. If more than one Third Party Shop is associated with the active Project, use the one that clearly matches the current Project domain. If more than one could match, ask the user to choose the correct Third Party Shop before continuing.
6. Use `GetUserShop` with the confirmed `user_shop_id` to retrieve the current Third Party Shop details.
7. Check the Third Party Shop's `shipping_methods` array.
8. If the `shipping_methods` array is not empty, store the confirmed `user_shop_id` and treat Step 14 as complete.
9. If the `shipping_methods` array is empty, Step 14 is incomplete and the AI/MCP must import and map shipping methods before continuing.
10. Use `GetUserShop` with `remote_data` containing `shipping_methods` to retrieve shipping methods from the WooCommerce store.
11. Clearly display the remote WooCommerce shipping methods to the user, including each method's ID, name, description, and enabled status when available.
12. Use `GetSiteShippingProviders` to retrieve available RevCent shipping providers.
13. For each provider that may be used, use `GetSiteShippingProvider` to retrieve that provider's available provider methods.
14. For each remote WooCommerce shipping method, ask the user to choose the correct RevCent shipping provider and provider method.
15. Do not guess the provider or provider method mapping. The user must confirm the mapping for each shipping method.
16. Build the mapped `shipping_methods` array for the Third Party Shop using the WooCommerce shipping method ID/name and the selected RevCent provider/provider method.
17. Use `EditUserShop` to add the mapped shipping methods to the existing User Third Party Shop.
18. Use `GetUserShop` again to confirm the Third Party Shop's `shipping_methods` array is no longer empty.
19. Store the confirmed `user_shop_id` and mapped shipping method details for the current onboarding flow.

### Step complete when

Step 14 is complete when one of the following paths is true:

```text
Path 1:
GetUserShop confirms the Project's User Third Party Shop already has a non-empty shipping_methods array.
```

```text
Path 2:
The Project's User Third Party Shop had an empty shipping_methods array
AND GetUserShop with remote_data containing shipping_methods retrieved the remote WooCommerce shipping methods
AND the remote WooCommerce shipping methods were clearly displayed to the user
AND each remote WooCommerce shipping method was mapped to a RevCent shipping provider and provider method confirmed by the user
AND EditUserShop added the mapped shipping methods to the User Third Party Shop
AND GetUserShop confirms the Third Party Shop's shipping_methods array is no longer empty.
```

### Do not continue until

The AI/MCP must not move to the next step until Step 14 is complete.

The AI/MCP must not consider Step 14 complete if the Project's User Third Party Shop has an empty `shipping_methods` array.

The AI/MCP must not map a WooCommerce shipping method to a RevCent provider or provider method without user confirmation.

The AI/MCP must not use Project entities to determine whether shipping methods were imported because shipping methods are stored on the User Third Party Shop, not directly as Project entities.

---

## Step 15: Start WooCommerce Product Sync

### What this step is for

This step starts a RevCent product sync job for products from the current Project domain WooCommerce store.

This step must use the `SyncProducts` operation.

`SyncProducts` retrieves products from the specified WooCommerce User Third Party Shop and creates or updates products in RevCent through an internal sync job.

This is a fire-and-move-on step. The AI/MCP must not wait for the product sync job to finish before moving to Step 16.

### What the AI/MCP should do

1. Confirm Step 14 is complete.
2. Use `GetProject` to retrieve the active Project.
3. Identify the Project's User Third Party Shop for the current Project domain WooCommerce store.
4. Store the confirmed `user_shop_id` for the current onboarding flow.
5. Store the confirmed `project_id` from Step 1 for the current onboarding flow.
6. Store the confirmed `product_group_id` from Step 12 for the current onboarding flow.
7. Store the confirmed `fulfillment_account_id` from Step 11 for the current onboarding flow.
8. If Step 13 created or confirmed a Subscription Profile, store the confirmed `subscription_profile_id` for the current onboarding flow.
9. Call `SyncProducts` using the confirmed `user_shop_id` as `third_party_shop`.
10. Include `project` using the active `project_id` so synced products can be associated with the active Project.
11. Include `product_group` using the Step 12 `product_group_id` so products created during the sync are added to the Product Group.
12. Include `fulfillment_account` using the Step 11 `fulfillment_account_id` so shippable products created during the sync receive the Fulfillment Account.
13. Include `subscription_profile` only if Step 13 created or confirmed a Subscription Profile for the current Project domain WooCommerce store.
14. Read the `SyncProducts` response.
15. If the response contains a `product_sync_id`, store the `product_sync_id` for the current onboarding flow and mark Step 15 complete.
16. Create the Step 15 Project completion note after `product_sync_id` is returned.
17. Move to Step 16 after Step 15 is complete. Do not wait for the product sync job to finish.

Example `SyncProducts` request shape:

```json
{
  "third_party_shop": "USER_SHOP_ID_FROM_STEP_8",
  "project": "PROJECT_ID_FROM_STEP_1",
  "fulfillment_account": "FULFILLMENT_ACCOUNT_ID_FROM_STEP_11",
  "subscription_profile": "SUBSCRIPTION_PROFILE_ID_FROM_STEP_13_IF_APPLICABLE",
  "product_group": "PRODUCT_GROUP_ID_FROM_STEP_12"
}
```

If there is no Subscription Profile because the user does not sell subscription products, omit `subscription_profile`.

### Step complete when

Step 15 is complete when all of the following are true:

```text
1. SyncProducts was called for the Project's User Third Party Shop.
2. The SyncProducts request used the active user_shop_id as third_party_shop.
3. The SyncProducts request included the active project_id.
4. The SyncProducts request included the Step 12 product_group_id.
5. The SyncProducts request included the Step 11 fulfillment_account_id.
6. The SyncProducts request included the Step 13 subscription_profile_id if a Subscription Profile exists for the Project.
7. SyncProducts returned a product_sync_id.
8. product_sync_id is stored for the current onboarding flow.
```

### Do not continue until

The AI/MCP must not move to Step 16 until `SyncProducts` returns a `product_sync_id`.


The AI/MCP must not use `GetUserShop` with `remote_data` containing `products` as the product import method for Step 15.

The AI/MCP must not call `CreateProduct` or `EditProduct` one product at a time as part of Step 15 onboarding.

The AI/MCP must not wait for the product sync job to complete before moving to Step 16.

The AI/MCP must not use `GetProductSync` or any other product sync status operation as a requirement for Step 15 completion.

Step 15 is complete once `SyncProducts` has returned `product_sync_id`. Product sync completion may happen later outside of this onboarding step.

---

## Step 16: Import WooCommerce Offline/Alternate Payment Methods

### What this step is for

This step imports and maps WooCommerce offline or alternate payment methods into the current Project's User Third Party Shop in RevCent.

Offline or alternate payment methods are payment methods from WooCommerce that are not processed as standard credit card payments through RevCent Payments or PayPal. Examples may include Sezzle, Afterpay, Klarna, Amazon Pay, manual/offline methods, or other alternate payment options.

Offline payment methods are not Project entities. They are stored on the User Third Party Shop.

### What the AI/MCP should do

1. Confirm Step 15 is complete.
2. Use `GetProject` to retrieve the active Project.
3. Identify the Project's User Third Party Shop for the current Project domain WooCommerce store.
4. Store the confirmed `user_shop_id` for the current onboarding flow.
5. Use `GetUserShop` to retrieve the current User Third Party Shop.
6. Inspect the User Shop's existing `offline_payment_methods` array.
7. Use `GetUserShop` with `remote_data` containing `offline_payment_methods` to retrieve the current offline/alternate payment methods from the WooCommerce store.
8. Compare the saved User Shop `offline_payment_methods` array to the remote WooCommerce `remote_data.offline_payment_methods` array.
9. Compare offline payment methods by the remote payment method ID and available method fields such as `id`, `name`, `method_title`, and `method_description`.
10. If the remote WooCommerce store returns no offline/alternate payment methods, Step 16 is complete.
11. If the User Shop already has saved offline payment methods that match the remote WooCommerce offline payment methods, Step 16 is complete.
12. If the User Shop's `offline_payment_methods` array is empty or does not match the remote WooCommerce offline payment methods, process each remote offline payment method one at a time.
13. For each remote offline payment method, clearly display the method to the user using available fields such as ID, name, method title, and description.
14. Ask the user whether they want to import that offline/alternate payment method into RevCent.
15. If the user does not want to import a specific method, record that decision and continue to the next remote method.
16. If the user wants to import a specific method, ask whether the method is associated with a third-party provider or SaaS, such as Sezzle, Afterpay, Klarna, Amazon Pay, or another provider.
17. If the method is not associated with a third-party provider, prepare the offline payment method mapping for the User Third Party Shop without a third-party integration.
18. If the method is associated with a third-party provider, create or confirm a User Third Party Integration for that specific provider before adding the offline payment method mapping to the User Third Party Shop.
19. To create a third-party integration for an offline payment method provider, identify the correct Site Third Party Integration using `GetSiteThirdPartyIntegrations` and `GetSiteThirdPartyIntegration`.
20. If the provider requires sensitive credentials, create a Secure Form using `CreateSecureForm` with `form_source` set to `third_party_integration` and the correct Site Third Party Integration ID as `form_source_id`.
21. Clearly display the Secure Form URL to the user as a standalone value.
22. Tell the user the Secure Form expires after 1 hour.
23. Do not continue creating the User Third Party Integration until the user confirms the Secure Form has been completed.
24. After the user confirms the Secure Form is complete, create the User Third Party Integration using `CreateUserThirdPartyIntegration`.
25. Associate the created or confirmed User Third Party Integration with the active Project using `ProjectAssociateEntity` with `entity_type` set to `third_party_integration`.
26. Add the offline payment method mapping to the User Third Party Shop using `EditUserShop`.
27. When adding an offline payment method that has a related User Third Party Integration, include the third-party integration mapping on that offline payment method.
28. When adding an offline payment method that does not have a related User Third Party Integration, add the offline payment method without a third-party integration mapping.
29. Preserve any existing valid offline payment methods already saved on the User Third Party Shop when calling `EditUserShop`.
30. After each offline payment method is added or updated, use `GetUserShop` to confirm the method appears in the User Shop's `offline_payment_methods` array.
31. Continue until every remote WooCommerce offline/alternate payment method has either been imported and mapped or intentionally skipped by user decision.

### Step complete when

Step 16 is complete when one of the following paths is true:

```text
Path 1:
GetUserShop with remote_data containing offline_payment_methods returns no remote WooCommerce offline/alternate payment methods.
```

```text
Path 2:
GetUserShop confirms the User Third Party Shop's existing offline_payment_methods array already matches the remote WooCommerce offline_payment_methods returned by GetUserShop with remote_data.
```

```text
Path 3:
GetUserShop with remote_data containing offline_payment_methods has retrieved the remote WooCommerce offline/alternate payment methods
AND each remote offline/alternate payment method has been processed one at a time
AND each method the user chose to import has been added to the User Third Party Shop using EditUserShop
AND each imported method that is associated with a third-party provider has a confirmed User Third Party Integration mapped to it
AND each User Third Party Integration created or confirmed for an offline payment method is associated with the active Project
AND each method the user chose not to import has been intentionally skipped by user decision
AND GetUserShop confirms the User Third Party Shop's offline_payment_methods array contains the imported and mapped methods.
```

### Do not continue until

The AI/MCP must not move to the next step until Step 16 is complete.

The AI/MCP must not use Project entities to determine whether offline payment methods were imported because offline payment methods are stored on the User Third Party Shop, not directly as Project entities.

The AI/MCP must not consider Step 16 complete when the User Shop's `offline_payment_methods` array is empty unless `remote_data.offline_payment_methods` also returns no methods or the user intentionally skips every remote method.

The AI/MCP must not add an offline payment method associated with a third-party provider without first creating or confirming the related User Third Party Integration.

The AI/MCP must not ask the user to paste third-party provider credentials into chat. Use a Secure Form whenever credentials are required.

The AI/MCP must not continue after creating a Secure Form until the user confirms the Secure Form has been completed.

The AI/MCP must not overwrite existing valid User Shop offline payment method mappings when adding new mappings.

---

## Additional Feature Continuation

After WooCommerce onboarding is complete, the AI/MCP should recommend opening the shared additional features guide:

```text
https://revcent.com/documentation/markdown/guide/BusinessOnboardingAdditionalFeatures.md
```

Use the additional features guide for optional post-onboarding work that applies to both WooCommerce and Custom Store onboarding, including Email Templates, inbound AI Voice customer service agents, outbound AI Voice recovery agents, and other shared continuation features.


---
Document Parent Directory
* [Guides](https://revcent.com/documentation/markdown/mcp/guide/index.md) - Guides for AI/MCP features and capabilities, offering step-by-step instructions and best practices for utilizing the RevCent ecosystem effectively.