Integracja Mirakl z BigQuery
Połącz marketplace oparty na Mirakl z BigQuery w WitCloud - zamówienia, oferty, transakcje, zwroty i dane sklepu sprzedawcy pobierane za pomocą klucza API sprzedawcy.
Aktualizacja
Wprowadzenie
Ta integracja pobiera dane Twojego sklepu sprzedawcy na marketplace'ie opartym na Mirakl (na przykład Empik, Decathlon czy Leroy Merlin) przez Mirakl Seller API i zapisuje je w Google Cloud BigQuery. Dostajesz zamówienia wraz z pozycjami, oferty, linie transakcji (prowizje, opłaty, zwroty i wypłaty), zwroty oraz dane Twojego sklepu. Dzięki temu możesz analizować sprzedaż na marketplace'ie razem z innymi danymi.
Konfiguracja
Wykonaj poniższe kroki, aby połączyć Mirakl z BigQuery. Po zakończeniu konfiguracji dane z marketplace'u będą automatycznie trafiać do Twojego projektu BigQuery.
Potrzebujesz adresu instancji Mirakl Twojego marketplace'u (podanego przez jego operatora, na przykład https://your-marketplace.mirakl.net) oraz klucza API z panelu sprzedawcy marketplace'u. Klucz generujesz tam, w interfejsie Mirakl, a nie w WitCloud.
Konfiguracja modułu
Wejdź w menu do Integracje i kliknij Dodaj integrację.

Wybierz Mirakl z listy dostępnych integracji.

Wpisz Nazwę źródła danych, na przykład „Mirakl PL". Dobra nazwa pomoże Ci później rozpoznać źródło danych.

Wpisz Adres instancji Mirakl, czyli adres instancji Mirakl Twojego marketplace'u. Musi zaczynać się od https://. Ukośnik na końcu lub /api są usuwane automatycznie.

Autoryzacja
Jeśli klucz API dla tego marketplace'u został już dodany, wybierz go z listy Autoryzacja Mirakl i pomiń resztę tego kroku.
Kliknij Autoryzuj. Przycisk jest nieaktywny, dopóki w polu Adres instancji Mirakl nie ma poprawnego adresu, ponieważ klucz jest sprawdzany w tej instancji.

W oknie Autoryzuj wklej Klucz API wygenerowany w panelu sprzedawcy marketplace'u, w ustawieniach Twojego użytkownika, i kliknij Utwórz. Klucz jest ukryty podczas wpisywania. Klucz mogą dodawać tylko osoby z rolą Edytor lub wyższą.

WitCloud od razu sprawdza klucz. Jeśli zostanie odrzucony, zobaczysz powód: klucz jest nieprawidłowy, nie ma wystarczających uprawnień, instancja jest nieosiągalna albo adres nie wskazuje na Mirakl Seller API.
Zapisany klucz pojawia się na liście Autoryzacja Mirakl. Jest opisany nazwą sklepu, adresem instancji i początkiem klucza, dzięki czemu odróżnisz od siebie kilka kluczy. Wybierz ten, którego chcesz użyć.

Dane są pobierane dla sklepu, do którego należy klucz API, więc nie wybierasz sklepu. Aby pobierać dane z kilku sklepów lub marketplace'ów, dodaj osobny klucz i osobną integrację dla każdego z nich.
Ustawienia zaawansowane
Kliknij Pokaż ustawienia zaawansowane, aby dostosować:
- Odświeżanie danych (oferty, sklep): co ile godzin odświeżana jest tabela ofert. Minimum 4, maksimum 12, domyślnie 4. Tabela sklepu jest odświeżana raz dziennie, niezależnie od tej wartości.

- Stały adres IP: po włączeniu wszystkie zapytania są wysyłane ze stałego adresu IP 34.118.32.227, który możesz przekazać operatorowi marketplace'u, aby dodał go do listy dozwolonych adresów.

- Tabele do pobrania: zawęź tabele, jeśli nie potrzebujesz wszystkich. Domyślnie zaznaczone jest wszystkie pięć (zamówienia, oferty, transakcje, zwroty i sklep), a co najmniej jedna musi pozostać zaznaczona.

Kliknij Dalej, aby przejść do ustawień pobierania danych.

Dane historyczne i harmonogram
W polu Dane historyczne wpisz liczbę dni danych historycznych do pobrania, maksymalnie 365.

Harmonogram synchronizacji danych zostanie utworzony automatycznie. Więcej informacji na ten temat znajdziesz tutaj.
Kliknij Utwórz, aby zakończyć konfigurację.

Gotowe! Dane z Mirakl będą teraz synchronizowane z BigQuery zgodnie z utworzonym harmonogramem.
Synchronizacja danych
Zamówienia, linie transakcji i zwroty są pobierane według daty ich utworzenia. Ostatnie dni są pobierane ponownie przy kolejnych uruchomieniach, więc zmiany statusów, zwroty środków i stany płatności z mniej więcej ostatnich 30 dni zostaną uwzględnione. Oferty i sklep to zdjęcia bieżącego stanu, zapisywane w dniu uruchomienia: aby odczytać aktualne wartości, użyj najnowszego dnia.
Transakcje i zwroty zależą od opcjonalnych modułów Mirakl. Jeśli operator marketplace'u nie włączył płatności sprzedawcy lub zwrotów, odpowiednia tabela pozostaje pusta.
Schemat danych
Rozwiń poniższe tabele, aby zobaczyć pełny schemat danych pobieranych z Mirakl. Klienci są ograniczeni do identyfikatora, ustawień regionalnych oraz miasta, kodu pocztowego, regionu i kraju ich adresów. Imiona i nazwiska, ulice, numery telefonów i adresy e-mail nie są pobierane.
Schemat danych tabeli mirakl_orders
| Field Name | Mode | Type |
|---|---|---|
| order_id | NULLABLE | STRING |
| commercial_id | NULLABLE | STRING |
| created_date | NULLABLE | TIMESTAMP |
| last_updated_date | NULLABLE | TIMESTAMP |
| acceptance_decision_date | NULLABLE | TIMESTAMP |
| customer_debited_date | NULLABLE | TIMESTAMP |
| shipping_deadline | NULLABLE | TIMESTAMP |
| transaction_date | NULLABLE | TIMESTAMP |
| transaction_number | NULLABLE | STRING |
| order_state | NULLABLE | STRING |
| order_state_reason_code | NULLABLE | STRING |
| order_state_reason_label | NULLABLE | STRING |
| currency_iso_code | NULLABLE | STRING |
| order_tax_mode | NULLABLE | STRING |
| price | NULLABLE | FLOAT |
| shipping_price | NULLABLE | FLOAT |
| total_price | NULLABLE | FLOAT |
| total_commission | NULLABLE | FLOAT |
| fully_refunded | NULLABLE | BOOLEAN |
| has_incident | NULLABLE | BOOLEAN |
| has_invoice | NULLABLE | BOOLEAN |
| customer_directly_pays_seller | NULLABLE | BOOLEAN |
| payment_type | NULLABLE | STRING |
| payment_workflow | NULLABLE | STRING |
| payment_duration | NULLABLE | INTEGER |
| quote_id | NULLABLE | STRING |
| channel | NULLABLE | RECORD |
| channel.code | NULLABLE | STRING |
| channel.label | NULLABLE | STRING |
| references | NULLABLE | RECORD |
| references.order_reference_for_customer | NULLABLE | STRING |
| references.order_reference_for_seller | NULLABLE | STRING |
| customer | NULLABLE | RECORD |
| customer.customer_id | NULLABLE | STRING |
| customer.locale | NULLABLE | STRING |
| customer.billing_address | NULLABLE | RECORD |
| customer.billing_address.city | NULLABLE | STRING |
| customer.billing_address.zip_code | NULLABLE | STRING |
| customer.billing_address.state | NULLABLE | STRING |
| customer.billing_address.country | NULLABLE | STRING |
| customer.billing_address.country_iso_code | NULLABLE | STRING |
| customer.shipping_address | NULLABLE | RECORD |
| customer.shipping_address.city | NULLABLE | STRING |
| customer.shipping_address.zip_code | NULLABLE | STRING |
| customer.shipping_address.state | NULLABLE | STRING |
| customer.shipping_address.country | NULLABLE | STRING |
| customer.shipping_address.country_iso_code | NULLABLE | STRING |
| shipping_type_code | NULLABLE | STRING |
| shipping_type_label | NULLABLE | STRING |
| shipping_type_standard_code | NULLABLE | STRING |
| shipping_zone_code | NULLABLE | STRING |
| shipping_zone_label | NULLABLE | STRING |
| shipping_carrier_code | NULLABLE | STRING |
| shipping_carrier_standard_code | NULLABLE | STRING |
| shipping_company | NULLABLE | STRING |
| delivery_date | NULLABLE | RECORD |
| delivery_date.earliest | NULLABLE | TIMESTAMP |
| delivery_date.latest | NULLABLE | TIMESTAMP |
| fulfillment | NULLABLE | RECORD |
| fulfillment.center | NULLABLE | RECORD |
| fulfillment.center.code | NULLABLE | STRING |
| promotions | NULLABLE | RECORD |
| promotions.total_deduced_amount | NULLABLE | FLOAT |
| order_taxes | REPEATED | RECORD |
| order_taxes.code | NULLABLE | STRING |
| order_taxes.rate | NULLABLE | FLOAT |
| order_taxes.total_amount | NULLABLE | FLOAT |
| order_lines | REPEATED | RECORD |
| order_lines.order_line_id | NULLABLE | STRING |
| order_lines.order_line_index | NULLABLE | INTEGER |
| order_lines.order_line_state | NULLABLE | STRING |
| order_lines.order_line_state_reason_code | NULLABLE | STRING |
| order_lines.order_line_state_reason_label | NULLABLE | STRING |
| order_lines.offer_id | NULLABLE | INTEGER |
| order_lines.offer_sku | NULLABLE | STRING |
| order_lines.offer_state_code | NULLABLE | STRING |
| order_lines.product_sku | NULLABLE | STRING |
| order_lines.product_shop_sku | NULLABLE | STRING |
| order_lines.product_title | NULLABLE | STRING |
| order_lines.category_code | NULLABLE | STRING |
| order_lines.category_label | NULLABLE | STRING |
| order_lines.quantity | NULLABLE | INTEGER |
| order_lines.price_unit | NULLABLE | FLOAT |
| order_lines.origin_unit_price | NULLABLE | FLOAT |
| order_lines.price | NULLABLE | FLOAT |
| order_lines.shipping_price | NULLABLE | FLOAT |
| order_lines.total_price | NULLABLE | FLOAT |
| order_lines.commission_fee | NULLABLE | FLOAT |
| order_lines.total_commission | NULLABLE | FLOAT |
| order_lines.commission_taxes | REPEATED | RECORD |
| order_lines.commission_taxes.code | NULLABLE | STRING |
| order_lines.commission_taxes.rate | NULLABLE | FLOAT |
| order_lines.commission_taxes.amount | NULLABLE | FLOAT |
| order_lines.taxes | REPEATED | RECORD |
| order_lines.taxes.code | NULLABLE | STRING |
| order_lines.taxes.rate | NULLABLE | FLOAT |
| order_lines.taxes.amount | NULLABLE | FLOAT |
| order_lines.shipping_taxes | REPEATED | RECORD |
| order_lines.shipping_taxes.code | NULLABLE | STRING |
| order_lines.shipping_taxes.rate | NULLABLE | FLOAT |
| order_lines.shipping_taxes.amount | NULLABLE | FLOAT |
| order_lines.fees | REPEATED | RECORD |
| order_lines.fees.code | NULLABLE | STRING |
| order_lines.fees.amount | NULLABLE | FLOAT |
| order_lines.promotions | REPEATED | RECORD |
| order_lines.promotions.id | NULLABLE | STRING |
| order_lines.promotions.deduced_amount | NULLABLE | FLOAT |
| order_lines.promotions.offered_quantity | NULLABLE | INTEGER |
| order_lines.promotions.promo_code | NULLABLE | STRING |
| order_lines.created_date | NULLABLE | TIMESTAMP |
| order_lines.debited_date | NULLABLE | TIMESTAMP |
| order_lines.shipped_date | NULLABLE | TIMESTAMP |
| order_lines.received_date | NULLABLE | TIMESTAMP |
| order_lines.last_updated_date | NULLABLE | TIMESTAMP |
| order_lines.refunds | REPEATED | RECORD |
| order_lines.refunds.id | NULLABLE | STRING |
| order_lines.refunds.amount | NULLABLE | FLOAT |
| order_lines.refunds.shipping_amount | NULLABLE | FLOAT |
| order_lines.refunds.quantity | NULLABLE | INTEGER |
| order_lines.refunds.commission_amount | NULLABLE | FLOAT |
| order_lines.refunds.commission_total_amount | NULLABLE | FLOAT |
| order_lines.refunds.commission_taxes | REPEATED | RECORD |
| order_lines.refunds.commission_taxes.code | NULLABLE | STRING |
| order_lines.refunds.commission_taxes.rate | NULLABLE | FLOAT |
| order_lines.refunds.commission_taxes.amount | NULLABLE | FLOAT |
| order_lines.refunds.taxes | REPEATED | RECORD |
| order_lines.refunds.taxes.code | NULLABLE | STRING |
| order_lines.refunds.taxes.rate | NULLABLE | FLOAT |
| order_lines.refunds.taxes.amount | NULLABLE | FLOAT |
| order_lines.refunds.shipping_taxes | REPEATED | RECORD |
| order_lines.refunds.shipping_taxes.code | NULLABLE | STRING |
| order_lines.refunds.shipping_taxes.rate | NULLABLE | FLOAT |
| order_lines.refunds.shipping_taxes.amount | NULLABLE | FLOAT |
| order_lines.refunds.reason_code | NULLABLE | STRING |
| order_lines.refunds.created_date | NULLABLE | TIMESTAMP |
| order_lines.refunds.order_refund_id | NULLABLE | STRING |
| order_lines.refunds.refund_state | NULLABLE | STRING |
| order_lines.refunds.transaction_date | NULLABLE | TIMESTAMP |
| order_lines.refunds.transaction_number | NULLABLE | STRING |
| order_lines.cancelations | REPEATED | RECORD |
| order_lines.cancelations.id | NULLABLE | STRING |
| order_lines.cancelations.amount | NULLABLE | FLOAT |
| order_lines.cancelations.shipping_amount | NULLABLE | FLOAT |
| order_lines.cancelations.quantity | NULLABLE | INTEGER |
| order_lines.cancelations.commission_amount | NULLABLE | FLOAT |
| order_lines.cancelations.commission_total_amount | NULLABLE | FLOAT |
| order_lines.cancelations.commission_taxes | REPEATED | RECORD |
| order_lines.cancelations.commission_taxes.code | NULLABLE | STRING |
| order_lines.cancelations.commission_taxes.rate | NULLABLE | FLOAT |
| order_lines.cancelations.commission_taxes.amount | NULLABLE | FLOAT |
| order_lines.cancelations.taxes | REPEATED | RECORD |
| order_lines.cancelations.taxes.code | NULLABLE | STRING |
| order_lines.cancelations.taxes.rate | NULLABLE | FLOAT |
| order_lines.cancelations.taxes.amount | NULLABLE | FLOAT |
| order_lines.cancelations.shipping_taxes | REPEATED | RECORD |
| order_lines.cancelations.shipping_taxes.code | NULLABLE | STRING |
| order_lines.cancelations.shipping_taxes.rate | NULLABLE | FLOAT |
| order_lines.cancelations.shipping_taxes.amount | NULLABLE | FLOAT |
| order_lines.cancelations.reason_code | NULLABLE | STRING |
| order_lines.cancelations.created_date | NULLABLE | TIMESTAMP |
Schemat danych tabeli mirakl_offers
| Field Name | Mode | Type |
|---|---|---|
| offer_id | NULLABLE | INTEGER |
| shop_sku | NULLABLE | STRING |
| product_sku | NULLABLE | STRING |
| product_title | NULLABLE | STRING |
| product_brand | NULLABLE | STRING |
| product_tax_code | NULLABLE | STRING |
| product_references | REPEATED | RECORD |
| product_references.reference | NULLABLE | STRING |
| product_references.reference_type | NULLABLE | STRING |
| category_code | NULLABLE | STRING |
| category_label | NULLABLE | STRING |
| currency_iso_code | NULLABLE | STRING |
| price | NULLABLE | FLOAT |
| total_price | NULLABLE | FLOAT |
| msrp | NULLABLE | FLOAT |
| applicable_pricing | NULLABLE | RECORD |
| applicable_pricing.price | NULLABLE | FLOAT |
| applicable_pricing.unit_origin_price | NULLABLE | FLOAT |
| applicable_pricing.unit_discount_price | NULLABLE | FLOAT |
| applicable_pricing.discount_start_date | NULLABLE | TIMESTAMP |
| applicable_pricing.discount_end_date | NULLABLE | TIMESTAMP |
| quantity | NULLABLE | INTEGER |
| min_quantity_alert | NULLABLE | INTEGER |
| min_order_quantity | NULLABLE | INTEGER |
| max_order_quantity | NULLABLE | INTEGER |
| package_quantity | NULLABLE | INTEGER |
| state_code | NULLABLE | STRING |
| active | NULLABLE | BOOLEAN |
| inactivity_reasons | REPEATED | STRING |
| channels | REPEATED | STRING |
| favorite_rank | NULLABLE | INTEGER |
| leadtime_to_ship | NULLABLE | INTEGER |
| shipping_deadline | NULLABLE | TIMESTAMP |
| min_shipping_price | NULLABLE | FLOAT |
| min_shipping_price_additional | NULLABLE | FLOAT |
| min_shipping_type | NULLABLE | STRING |
| min_shipping_zone | NULLABLE | STRING |
| available_start_date | NULLABLE | TIMESTAMP |
| available_end_date | NULLABLE | TIMESTAMP |
Schemat danych tabeli mirakl_transactions
| Field Name | Mode | Type |
|---|---|---|
| id | NULLABLE | STRING |
| type | NULLABLE | STRING |
| amount | NULLABLE | FLOAT |
| amount_credited | NULLABLE | FLOAT |
| amount_debited | NULLABLE | FLOAT |
| balance | NULLABLE | FLOAT |
| psp_balance | NULLABLE | FLOAT |
| currency_iso_code | NULLABLE | STRING |
| date_created | NULLABLE | TIMESTAMP |
| last_updated | NULLABLE | TIMESTAMP |
| payment_state | NULLABLE | STRING |
| pay_out_psp_code | NULLABLE | STRING |
| seller_billing_cycle_id | NULLABLE | STRING |
| accounting_document_id | NULLABLE | STRING |
| accounting_document_number | NULLABLE | STRING |
| accounting_document_creation_date | NULLABLE | TIMESTAMP |
| entities | NULLABLE | RECORD |
| entities.domain | NULLABLE | STRING |
| entities.order | NULLABLE | RECORD |
| entities.order.id | NULLABLE | STRING |
| entities.order.commercial_id | NULLABLE | STRING |
| entities.order.creation_date | NULLABLE | TIMESTAMP |
| entities.order.references | NULLABLE | RECORD |
| entities.order.references.order_reference_for_customer | NULLABLE | STRING |
| entities.order.references.order_reference_for_seller | NULLABLE | STRING |
| entities.order_line | NULLABLE | RECORD |
| entities.order_line.id | NULLABLE | STRING |
| entities.refund | NULLABLE | RECORD |
| entities.refund.id | NULLABLE | STRING |
| entities.shipment | NULLABLE | RECORD |
| entities.shipment.id | NULLABLE | STRING |
| entities.debit | NULLABLE | RECORD |
| entities.debit.id | NULLABLE | STRING |
| entities.channel | NULLABLE | RECORD |
| entities.channel.code | NULLABLE | STRING |
| entities.fee | NULLABLE | RECORD |
| entities.fee.code | NULLABLE | STRING |
| entities.order_fee | NULLABLE | RECORD |
| entities.order_fee.code | NULLABLE | STRING |
| entities.order_tax | NULLABLE | RECORD |
| entities.order_tax.code | NULLABLE | STRING |
| entities.order_tax.rate | NULLABLE | FLOAT |
| entities.shop_tax | NULLABLE | RECORD |
| entities.shop_tax.code | NULLABLE | STRING |
| entities.shop_tax.rate | NULLABLE | FLOAT |
| entities.transaction_info | NULLABLE | RECORD |
| entities.transaction_info.date | NULLABLE | TIMESTAMP |
| entities.transaction_info.number | NULLABLE | STRING |
Schemat danych tabeli mirakl_returns
| Field Name | Mode | Type |
|---|---|---|
| id | NULLABLE | STRING |
| rma | NULLABLE | STRING |
| state | NULLABLE | STRING |
| order_id | NULLABLE | STRING |
| order_commercial_id | NULLABLE | STRING |
| reason_code | NULLABLE | STRING |
| rejection_reason_code | NULLABLE | STRING |
| method_code | NULLABLE | STRING |
| date_created | NULLABLE | TIMESTAMP |
| last_updated | NULLABLE | TIMESTAMP |
| return_address | NULLABLE | RECORD |
| return_address.city | NULLABLE | STRING |
| return_address.zip_code | NULLABLE | STRING |
| return_address.state | NULLABLE | STRING |
| return_address.country_iso_code | NULLABLE | STRING |
| return_lines | REPEATED | RECORD |
| return_lines.order_line_id | NULLABLE | STRING |
| return_lines.quantity | NULLABLE | INTEGER |
| return_lines.reason_code | NULLABLE | STRING |
| tracking | NULLABLE | RECORD |
| tracking.carrier_code | NULLABLE | STRING |
| tracking.carrier_name | NULLABLE | STRING |
| tracking.carrier_standard_code | NULLABLE | STRING |
Schemat danych tabeli mirakl_shop
| Field Name | Mode | Type |
|---|---|---|
| shop_id | NULLABLE | INTEGER |
| shop_name | NULLABLE | STRING |
| shop_state | NULLABLE | STRING |
| suspension_type | NULLABLE | STRING |
| currency_iso_code | NULLABLE | STRING |
| model | NULLABLE | STRING |
| shipping_country | NULLABLE | STRING |
| channels | REPEATED | STRING |
| is_professional | NULLABLE | BOOLEAN |
| premium | NULLABLE | BOOLEAN |
| free_shipping | NULLABLE | BOOLEAN |
| grade | NULLABLE | FLOAT |
| approval_rate | NULLABLE | FLOAT |
| approval_delay | NULLABLE | INTEGER |
| evaluations_count | NULLABLE | INTEGER |
| offers_count | NULLABLE | INTEGER |
| orders_count | NULLABLE | INTEGER |
| order_messages_response_delay | NULLABLE | INTEGER |
| date_created | NULLABLE | TIMESTAMP |
| last_updated_date | NULLABLE | TIMESTAMP |
| closed_from | NULLABLE | TIMESTAMP |
| closed_to | NULLABLE | TIMESTAMP |
| payment_details | NULLABLE | RECORD |
| payment_details.paid_balance | NULLABLE | FLOAT |
| payment_details.payable_balance | NULLABLE | FLOAT |
| payment_details.pending_balance | NULLABLE | FLOAT |
| payment_details.reserve_balance | NULLABLE | FLOAT |
| payment_details.reserve_target | NULLABLE | FLOAT |
