---
# System prepended metadata

title: Architecture Overview

---

# Architecture Overview

![](https://i.imgur.com/A7uyH5n.png)

[Full Size](https://i.imgur.com/A7uyH5n.png)


# Sync Products Wordpress and Big Commerce
- Login to Wordpress
- Click Big Commerce in the side menu
- Select Products
- Click Sync Products for all or select an individual one

# How to Validate Syncing Issues
### Setup Requirements
- Have an AWS Account
- Remote Desktop and VPN Setup to access Scribe and GP (https://sites.google.com/clockwork.com/siinternalportal/big-commerce/playbooks?authuser=1&pli=1)

## Steps to Validate an Order/Member Sync Issue
1. Connect via VPN
2. Launch remote desktop and to go to SI-App (Credentials are in LastPass)
3. Go to **Start -> Scribe Console**
4. Expand **Scribe Console -> Test SI -> Administration -> Execution Log**
5. Hit Launch Button
6. Select either Prod Big Commerce Orders **or** Prod Big Commerce Customers (based on what you're validating)
7. Hit Refresh
8. Find the fails either at the top of the list or by selecting Error Filter and unchecking Successful Execution
9. Using the date stamp, find the entry that matches the email
10. Clicking on the failed row will show the failure reason (note: if this is a customer and the error states country code does not exist, verify that they are not actually from the US)
12. Make note of the last four digits in the Last Source Key columns of the failed row - that is the Big Commerce Order Number in the case of an order and is the user id in the case of customers
13. Head to aws.amazon.com
14. Go to S3 Buckets
15. Find si-bc-orders-archive **or** si-bc-customers-archive
16. Search for the order or customer number - this is case sensitive and a full match
17. Right click on the file name
18. Select copy and select either si-bc-orders **or** si-bc-customers
19. Check Scribe after about 10 minutes to validate

# What happens during registration
When a user registers on Wordpress, the customer information is then synced via an API call to Big Commerce. The registration form is build using Gravity Forms on Wordpress. That call to Big Commerce will trigger an event which calls a lambda which dumps the XML file into an S3 bucket where Scribe will pick it up and set the record in GP.

# Lambda Descriptions
## Receive Order Lambda λ
This will be called when an order is placed in Big Commerce. This event will generate an XML file, place it in the S3 bucket where Scribe will pick it up for entry into GP.

## Receive Customer Lambda λ
This will be called when a customer registers on Wordpress and Wordpress called to Big Commerce to sync the customer. This event will generate an XML file, place it in the S3 bucket where Scribe will pick it up for entry into GP.

## Products Import Lambda λ
This lambda is called various times throughout the day to get the data from GP. Big Commerce will grab the files created by this lambda automatically.

## Receive Order Tracking Info Lambda λ
This lambda is called when an order is placed and a tracking number has been added to the order in GP. This is then synced with the order in Big Commerce.

# What happens when an order is placed
Similar to registration, Big Commerce will fire an event which triggers a lambda to dump the order XML file into the orders S3 bucket to be picked up by Scribe and set the record in GP.

Something to note, is that if the order was placed before the user was synced via the process noted above, the order will fail and will need to be re-run using the steps above.

# Where do products live?
Product inventory is all in GP and products they want to sell are entered into Big Commerce manually and connected via the SKU.

# What is Big Commerce vs Wordpress
Wordpress
- Registration Form (Fields are synced with Big Commerce via Custom Wordpress Plugin)

Wordpress Integration from Big Commerce
- Checkout (iFrame)
- Product Listing (BC Plugin)
- Cart Page (BC Plugin)

Big Commerce
- Product Entry (Inventory is synced from GP)

# Member Management Matrix
| Field Name                         | Update in Big Commerce? | Update in Wordpress?               | Info sent to GP? |
|------------------------------------|-------------------------|------------------------------------|------------------|
| First Name                         | Yes                     | Yes                                | Yes              |
| Last Name                          | Yes                     | Yes                                | Yes              |
| Company Name                       | Yes                     | Yes                                | Yes              |
| Email Address                      | Do not update           | Do not update                      | Yes              |
| Customer Group                     | Yes                     | No                                 | No               |
| GPCustomerID*                      | Do not update           | Do not update                      | Yes              |
| Password                           | Yes                     | No                                 | No               |
| Address Information                | Yes                     | No                                 | Yes              |
| Account Type                       | No                      | Yes                                | No               |
| Salon Number*                      | No                      | Yes                                | No               |
| Cosmetology/Barber License Number* | No                      | Yes (Must be in MM/DD/YYYY format) | No               |
| Job Title*                         | No                      | Yes                                | No               |
| Corporate Email*                   | No                      | Yes                                | No               |

\* These fields can only be updated via the BigCommerce and WordPress Admin screens. The Customer does not have access to update via the WordPress store. 

# Additional Resources
- [SI Training Doc](https://docs.google.com/document/d/1jh3tCNwHYhLjvF43wasuiVZVmrP4HJXzQbeZVrKG2NA/edit#)