# Salesforce Commerce Cloud schema ERD

Table and field reference for the Fivetran Salesforce Commerce Cloud connector.

## Table & Field Reference

### store

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| address_1 | String |  |
| address_2 | String |  |
| city | String |  |
| country_code | String |  |
| creation_date | Instant |  |
| email | String |  |
| fax | String |  |
| inventory_id | String |  |
| last_modified | Instant |  |
| latitude | String |  |
| longitude | String |  |
| name | String |  |
| phone | String |  |
| pos_enabled | Boolean |  |
| postal_code | String |  |
| state_code | String |  |
| store_locator_enabled | String |  |

### price_book

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| creation_date | Instant |  |
| currency_code | String |  |
| description | String |  |
| display_name | String |  |
| last_modified | Instant |  |
| online | Boolean |  |
| parent_id | String |  |
| valid_from | Instant |  |
| valid_to | Instant |  |

### assignment

| Column | Type | Keys |
| --- | --- | --- |
| campaign_id | String | PK, FK |
| promotion_id | String | PK, FK |
| rank | Int |  |
| schedule_end_date | Instant |  |
| schedule_start_date | Instant |  |

### shared_product_option

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| catalog_id | String | PK, FK |
| custom_name | Json |  |
| default_product_option_value | String |  |
| description | Json |  |
| link | String |  |
| name | String |  |
| selected_option_value | String |  |
| shared | Boolean |  |
| sorting_mode | String |  |
| image_** |  |  |

### catalog

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| assigned_product_count | Int |  |
| category_count | Int |  |
| creation_date | Instant |  |
| last_modified | Instant |  |
| online | Boolean |  |
| owned_product_count | Int |  |
| recommendation_count | Int |  |
| root_category | String |  |

### ab_test

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| description | String |  |
| enabled | Boolean |  |
| schedule_end_date | Instant |  |
| schedule_start_date | Instant |  |
| segment_description | String |  |
| segment_id | String |  |

### order_billing_address

| Column | Type | Keys |
| --- | --- | --- |
| order_id | String | PK, FK |
| address_1 | String |  |
| city | String |  |
| country_code | String |  |
| first_name | String |  |
| full_name | String |  |
| last_name | String |  |
| phone | String |  |
| postal_code | String |  |
| state_code | String |  |

### product

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| master_id | String | FK |
| owning_catalog_id | String | FK |
| primary_category_id | String | FK |
| brand | String |  |
| classification_category_catalog_id | String |  |
| classification_category_category_id | String |  |
| creation_date | Instant |  |
| default_variant_id | String |  |
| ean | String |  |
| image_abs_url | String |  |
| last_modified | Instant |  |
| long_description_default_markup | String |  |
| long_description_default_source | String |  |
| manufacturer_name | String |  |
| manufacturer_sku | String |  |
| price | Double |  |
| price_currency | String |  |
| price_per_unit | Double |  |
| short_description_default_markup | String |  |
| short_description_default_source | String |  |
| tax_class_id | String |  |
| unit | String |  |
| unit_measure | String |  |
| unit_quantity | Double |  |
| upc | String |  |
| type_** |  |  |

### coupon_redemption

| Column | Type | Keys |
| --- | --- | --- |
| coupon_id | String | PK, FK |
| order_id | String | PK, FK |
| code | String |  |
| creation_date | Instant |  |
| customer_email | String |  |

### customer_address

| Column | Type | Keys |
| --- | --- | --- |
| index | Long | PK |
| customer_no | String | PK, FK |
| address_1 | String |  |
| address_2 | String |  |
| city | String |  |
| company_name | String |  |
| country_code | String |  |
| creation_date | Instant |  |
| etag | String |  |
| first_name | String |  |
| full_name | String |  |
| id | String |  |
| job_title | String |  |
| last_modified | Instant |  |
| last_name | String |  |
| phone | String |  |
| post_box | String |  |
| postal_code | String |  |
| salutation | String |  |
| second_name | String |  |
| state_code | String |  |
| suffix | String |  |
| suite | String |  |
| title | String |  |

### product_image_group_image

| Column | Type | Keys |
| --- | --- | --- |
| index | Long | PK |
| product_id | String | PK, FK |
| product_image_group_index | Long | PK, FK |
| abs_url | String |  |
| dis_base_url | String |  |
| path | String |  |

### order_shipping_item

| Column | Type | Keys |
| --- | --- | --- |
| item_id | String | PK |
| shipment_id | String | PK, FK |
| adjusted_tax | Double |  |
| base_price | Double |  |
| gross_price | Double |  |
| item_text | String |  |
| net_price | Double |  |
| order_id | String |  |
| price_after_item_discount | Double |  |
| tax | Double |  |
| tax_basis | Double |  |
| tax_rate | Double |  |
| type | String |  |

### payment_instrument

| Column | Type | Keys |
| --- | --- | --- |
| payment_instrument_id | String | PK |
| bank_routing_number | String |  |
| payment_method | String |  |
| payment_card** |  |  |

### assigned_category

| Column | Type | Keys |
| --- | --- | --- |
| catalog_id | String | PK, FK |
| category_id | String | PK, FK |
| product_id | String | PK, FK |

### campaign

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| coupons | Json |  |
| creation_date | Instant |  |
| description | String |  |
| enabled | Boolean |  |
| end_date | Instant |  |
| last_modified | Instant |  |
| site_id | String |  |
| start_date | Instant |  |

### order_payment_instrument

| Column | Type | Keys |
| --- | --- | --- |
| order_id | String | PK, FK |
| payment_instrument_id | String | PK, FK |
| authorization_status | Int |  |
| authorization_status_code | String |  |
| authorization_status_message | String |  |
| masked_gift_certificate_code | String |  |
| payment_transaction_amount | Double |  |
| payment_transaction_id | String |  |

### source_code_group

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| active | Boolean |  |
| active_indirect_location_type | String |  |
| cookie_duration | Int |  |
| creation_date | Instant |  |
| description | String |  |
| enabled | Boolean |  |
| end_time | Instant |  |
| inactive_redirect_location_type | String |  |
| last_modified | Instant |  |
| start_time | Instant |  |

### custom_object_attribute_definition

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| creation_date | Instant |  |
| description | Json |  |
| display_name | Json |  |
| effective_id | String |  |
| externally_defined | Boolean |  |
| externally_managed | Boolean |  |
| field_height | Int |  |
| field_length | Int |  |
| key | Boolean |  |
| last_modified | Instant |  |
| link | String |  |
| localizable | Boolean |  |
| mandatory | Boolean |  |
| max_value | Double |  |
| min_length | Int |  |
| min_value | Double |  |
| multi_value_type | Boolean |  |
| object_type | String |  |
| order_required | Boolean |  |
| queryable | Boolean |  |
| read_only | Boolean |  |
| regular_expression | String |  |
| requires_encoding | Boolean |  |
| scale | Int |  |
| searchable | Boolean |  |
| set_value_type | Boolean |  |
| site_specific | Boolean |  |
| system | Boolean |  |
| unit | Json |  |
| value_type | String |  |
| visible | Boolean |  |
| default_value_** |  |  |

### inventory_list

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| assigned_sites | Json |  |
| creation_date | Instant |  |
| default_in_stock | Boolean |  |
| description | String |  |
| last_modified | Instant |  |
| on_order_inventory_enabled | Boolean |  |
| use_bundle_inventory_only | Boolean |  |

### campaign_source_code_group

| Column | Type | Keys |
| --- | --- | --- |
| campaign_id | String | PK, FK |
| source_code_group_id | String | PK, FK |

### inventory_list_record

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| inventory_list_id | String | PK, FK |
| product_id | String | FK |
| allocation_amount | Double |  |
| allocation_reset_date | Instant |  |
| ats | Double |  |
| creation_date | Instant |  |
| in_stock_date | Instant |  |
| inventory_turnover | Double |  |
| last_modified | Instant |  |
| perpetual_flag | Boolean |  |
| pre_order_back_order_allocation | Double |  |
| pre_order_back_order_handling | String |  |
| product_name | String |  |
| quantity_on_order | Double |  |
| stock_level | Double |  |

### product_image_group_variation_attribute

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| product_id | String | PK, FK |
| product_image_group_index | Long | PK, FK |
| attribute_definition_id | String |  |
| shared | Boolean |  |
| slicing | Boolean |  |
| variation_attribute_type | String |  |

### custom_object

| Column | Type | Keys |
| --- | --- | --- |
| key_property | String | PK |
| key_value | Unknown | PK |
| object_type | String | PK |
| creation_date | Instant |  |
| last_modified | Instant |  |

### promotion_ab_test

| Column | Type | Keys |
| --- | --- | --- |
| status | String | PK |
| ab_test_id | String | PK, FK |
| promotion_id | String | PK, FK |

### gift_certificate

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| order_id | String | FK |
| amount_currency_mnemonic | String |  |
| amount_value | Double |  |
| balance_currency_mnemonic | String |  |
| balance_value | Double |  |
| creation_date | Instant |  |
| description | String |  |
| enabled | Boolean |  |
| last_modified | Instant |  |
| masked_gift_certificate_code | String |  |
| message | String |  |
| recipient_email | String |  |
| recipient_name | String |  |
| sender_name | String |  |
| status | String |  |

### product_image_group

| Column | Type | Keys |
| --- | --- | --- |
| index | Long | PK |
| product_id | String | PK, FK |
| view_type | String |  |

### orders_history

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| last_modified | Instant | PK |
| customer_id | String | FK |
| adjusted_merchandize_total_tax | Double |  |
| adjusted_shipping_total_tax | Double |  |
| cancel_code | String |  |
| confirmation_status | String |  |
| created_by | String |  |
| creation_date | Instant |  |
| currency | String |  |
| customer_is_guest | Boolean |  |
| export_status | String |  |
| invoice_no | String |  |
| merchandize_total_tax | Double |  |
| order_total | Double |  |
| payment_status | String |  |
| place_date | Instant |  |
| product_sub_total | Double |  |
| product_total | Double |  |
| remote_host | String |  |
| shipping_status | String |  |
| shipping_total | Double |  |
| shipping_total_tax | Double |  |
| site_id | String |  |
| status | String |  |
| tax_total | Double |  |
| taxation | String |  |

### price_adjustment

| Column | Type | Keys |
| --- | --- | --- |
| item_id | String | PK |
| price_adjustment_id | String | PK |
| campaign_id | String | FK |
| order_id | String | FK |
| promotion_id | String | FK |
| ab_test_segment_segment_id | String |  |
| ab_test_segment_test_id | String |  |
| base_price | Double |  |
| coupon_code | String |  |
| created_by | String |  |
| creation_date | Instant |  |
| custom | Boolean |  |
| gross_price | Double |  |
| item_text | String |  |
| last_modified | Instant |  |
| manual | Boolean |  |
| net_price | Double |  |
| price_adjustment_type | String |  |
| reason_code | String |  |
| tax | Double |  |
| tax_basis | Double |  |
| applied_discount_** |  |  |

### promotion_tag

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| promotion_id | String | PK, FK |

### customer

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| birthday | LocalDate |  |
| company_name | String |  |
| creation_date | Instant |  |
| credentials_enabled | Boolean |  |
| credentials_locked | Boolean |  |
| credentials_login | String |  |
| credentials_password_question | String |  |
| customer_no | String |  |
| email | String |  |
| fax | String |  |
| first_name | String |  |
| gender | Int |  |
| job_title | String |  |
| last_login_time | Instant |  |
| last_modified | Instant |  |
| last_name | String |  |
| last_visit_time | Instant |  |
| phone_business | String |  |
| phone_home | String |  |
| phone_mobile | String |  |
| preferred_locale | String |  |
| previous_login_time | Instant |  |
| previous_visit_time | Instant |  |
| primary_address_address_1 | String |  |
| primary_address_address_2 | String |  |
| primary_address_city | String |  |
| primary_address_company_name | String |  |
| primary_address_country_code | String |  |
| primary_address_creation_date | Instant |  |
| primary_address_etag | String |  |
| primary_address_first_name | String |  |
| primary_address_full_name | String |  |
| primary_address_id | String |  |
| primary_address_job_title | String |  |
| primary_address_last_modified | Instant |  |
| primary_address_last_name | String |  |
| primary_address_phone | String |  |
| primary_address_post_box | String |  |
| primary_address_postal_code | String |  |
| primary_address_salutation | String |  |
| primary_address_second_name | String |  |
| primary_address_state_code | String |  |
| primary_address_suffix | String |  |
| primary_address_suite | String |  |
| primary_address_title | String |  |
| salutation | String |  |
| second_name | String |  |
| suffix | String |  |
| title | String |  |

### category

| Column | Type | Keys |
| --- | --- | --- |
| catalog_id | String | PK |
| id | String | PK, FK |
| parent_category_id | String | FK |
| creation_date | Instant |  |
| last_modified | Instant |  |
| online | Boolean |  |
| position | Int |  |

### order_shipment_address

| Column | Type | Keys |
| --- | --- | --- |
| order_id | String | PK, FK |
| shipment_id | String | PK, FK |
| address_1 | String |  |
| city | String |  |
| country_code | String |  |
| first_name | String |  |
| full_name | String |  |
| last_name | String |  |
| phone | String |  |
| postal_code | String |  |
| state_code | String |  |

### product_image_group_variation_attribute_value

| Column | Type | Keys |
| --- | --- | --- |
| index | Long | PK |
| product_id | String | PK, FK |
| product_image_group_index | Long | PK, FK |
| product_image_group_variation_attribute_id | String | PK, FK |
| orderable | Boolean |  |
| position | Int |  |
| value | String |  |

### custom_object_attribute_group

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| attribute_definitions_count | Int |  |
| creation_date | Instant |  |
| description | Json |  |
| display_name | Json |  |
| internal | Boolean |  |
| last_modified | Instant |  |
| link | String |  |
| object_type | String |  |
| position | Double |  |

### order_shipment

| Column | Type | Keys |
| --- | --- | --- |
| shipment_id | String | PK |
| shipment_no | String | PK |
| order_id | String | PK, FK |
| adjusted_merchandize_total_tax | Double |  |
| adjusted_shipping_total_tax | Double |  |
| gift | Boolean |  |
| merchandize_total_tax | Double |  |
| product_sub_total | Double |  |
| product_total | Double |  |
| shipment_total | Double |  |
| shipping_method_id | String |  |
| shipping_status | String |  |
| shipping_total | Double |  |
| shipping_total_tax | Double |  |
| tax_total | Double |  |

### campaign_customer_group

| Column | Type | Keys |
| --- | --- | --- |
| campaign_id | String | PK, FK |
| customer_group_id | String | PK, FK |

### price_book_site_assignment

| Column | Type | Keys |
| --- | --- | --- |
| site_id | String | PK |
| price_book_id | String | PK, FK |
| display_name | String |  |

### order_product_item

| Column | Type | Keys |
| --- | --- | --- |
| item_id | String | PK |
| order_id | String | PK, FK |
| product_id | String | PK, FK |
| shipment_id | String | FK |
| shipping_item_id | String | FK |
| adjusted_tax | Double |  |
| base_price | Double |  |
| bonus_product_line_item | Boolean |  |
| gift | Boolean |  |
| gross_price | Double |  |
| item_text | String |  |
| net_price | Double |  |
| position | Double |  |
| price_after_item_discount | Double |  |
| price_after_order_discount | Double |  |
| product_name | String |  |
| quantity | Double |  |
| tax | Double |  |
| tax_basis | Double |  |
| tax_rate | Double |  |

### shared_product_option_value

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| product_option_id | String | PK, FK |
| link | String |  |
| option_prices | Json |  |
| sku_extension | String |  |
| value | Json |  |

### customer_group

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| creation_date | Instant |  |
| description | String |  |
| last_modified | Instant |  |
| link | String |  |
| rule_description | String |  |
| type | String |  |

### primary_category

| Column | Type | Keys |
| --- | --- | --- |
| catalog_id | String | PK, FK |
| category_id | String | PK, FK |
| product_id | String | PK, FK |

### campaign_promotion

| Column | Type | Keys |
| --- | --- | --- |
| status | String | PK |
| campaign_id | String | PK, FK |
| promotion_id | String | PK, FK |

### gift_certificate_transaction

| Column | Type | Keys |
| --- | --- | --- |
| index | Int | PK |
| gift_certificate_id | String | PK, FK |
| order_id | String | FK |
| amount_currency_mnemonic | String |  |
| amount_value | Double |  |
| timestamp | Instant |  |
| type_code | String |  |

### promotion

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| archived | Boolean |  |
| creation_date | Instant |  |
| currency_code | String |  |
| disable_globally_excluded | Boolean |  |
| enabled | Boolean |  |
| exclusivity | String |  |
| last_modified | Instant |  |
| promotion_class | String |  |
| site_id | String |  |

### campaign_coupon

| Column | Type | Keys |
| --- | --- | --- |
| campaign_id | String | PK, FK |
| coupon_id | String | PK, FK |

### coupon

| Column | Type | Keys |
| --- | --- | --- |
| id | String | PK |
| creation_date | Instant |  |
| description | String |  |
| enabled | Boolean |  |
| exported_code_count | Int |  |
| last_modified | Instant |  |
| redemption_count | Int |  |
| redemption_limits_per_code | Int |  |
| redemption_limits_per_customer | Int |  |
| single_code | String |  |
| system_codes_config_code_prefix | String |  |
| system_codes_config_number_of_codes | Int |  |
| total_codes_count | Int |  |
| type | String |  |

## Relationships

- assignment(campaign_id) → campaign(id)
- assignment(promotion_id) → promotion(id)
- shared_product_option(catalog_id) → catalog(id)
- order_billing_address(order_id) → orders_history(last_modified)
- product(owning_catalog_id) → catalog(id)
- product(primary_category_id) → primary_category(product_id)
- product(master_id) → product(id)
- coupon_redemption(coupon_id) → coupon(id)
- coupon_redemption(order_id) → orders_history(last_modified)
- customer_address(customer_no) → customer(customer_no)
- product_image_group_image(product_image_group_index) → product_image_group(index)
- product_image_group_image(product_id) → product(id)
- order_shipping_item(shipment_id) → order_shipment(shipment_id)
- assigned_category(product_id) → product(id)
- assigned_category(catalog_id) → catalog(id)
- assigned_category(category_id) → category(catalog_id)
- order_payment_instrument(order_id) → orders_history(last_modified)
- order_payment_instrument(payment_instrument_id) → payment_instrument(payment_instrument_id)
- campaign_source_code_group(campaign_id) → campaign(id)
- campaign_source_code_group(source_code_group_id) → source_code_group(id)
- inventory_list_record(inventory_list_id) → inventory_list(id)
- inventory_list_record(product_id) → product(id)
- product_image_group_variation_attribute(product_image_group_index) → product_image_group(index)
- product_image_group_variation_attribute(product_id) → product(id)
- promotion_ab_test(promotion_id) → promotion(id)
- promotion_ab_test(ab_test_id) → ab_test(id)
- gift_certificate(order_id) → orders_history(last_modified)
- product_image_group(product_id) → product(id)
- orders_history(customer_id) → customer(id)
- price_adjustment(order_id) → orders_history(last_modified)
- price_adjustment(campaign_id) → campaign(id)
- price_adjustment(promotion_id) → promotion(id)
- promotion_tag(promotion_id) → promotion(id)
- category(id) → catalog(id)
- category(parent_category_id) → category(catalog_id)
- order_shipment_address(shipment_id) → order_shipment(shipment_id)
- order_shipment_address(order_id) → orders_history(last_modified)
- product_image_group_variation_attribute_value(product_image_group_variation_attribute_id) → product_image_group_variation_attribute(id)
- product_image_group_variation_attribute_value(product_image_group_index) → product_image_group(index)
- product_image_group_variation_attribute_value(product_id) → product(id)
- order_shipment(order_id) → orders_history(last_modified)
- campaign_customer_group(campaign_id) → campaign(id)
- campaign_customer_group(customer_group_id) → customer_group(id)
- price_book_site_assignment(price_book_id) → price_book(id)
- order_product_item(order_id) → orders_history(last_modified)
- order_product_item(product_id) → product(id)
- order_product_item(shipment_id) → order_shipment(shipment_id)
- order_product_item(shipping_item_id) → order_shipping_item(item_id)
- shared_product_option_value(product_option_id) → shared_product_option(catalog_id)
- primary_category(product_id) → product(id)
- primary_category(catalog_id) → catalog(id)
- primary_category(category_id) → category(catalog_id)
- campaign_promotion(campaign_id) → campaign(id)
- campaign_promotion(promotion_id) → promotion(id)
- gift_certificate_transaction(gift_certificate_id) → gift_certificate(id)
- gift_certificate_transaction(order_id) → orders_history(last_modified)
- campaign_coupon(campaign_id) → campaign(id)
- campaign_coupon(coupon_id) → coupon(id)
