Sellers extraction
The sellers extraction jobs retrieve changed shops from Mirakl and create or update the corresponding user in Hyperwallet.
Based on the seller’s type, the connector provides two different jobs:
-
Individual sellers extraction job.
-
Professional sellers extraction job.
What’s described here applies to both professional and individual sellers extraction jobs. |
Characteristics
-
The connector supports individual and professional sellers, providing a different job for each type. The difference between them is the data read from the shop in Mirakl and the data required to create the user in Hyperwallet.
-
A seller can create more than one shop in Mirakl, for example, to sell in different currencies. In this case, the connector exports each shop as a separate user in Hyperwallet as if they were different sellers.
-
Sellers need to accept Hyperwallet’s terms and conditions in Mirakl. The connector filter out shops that don’t have the custom field
Hyperwallet Ts & Cs and Privacy Policy consent
set toyes
.
Batch job steps
The seller extraction process is organized in different phases or steps during the job execution (as explained in phases of a job):
- Step 1: Extraction of items
-
During this step the connector retrieves from Mirakl the shops modified since the last execution of the job, extracting the seller information from the shop.
- Step 2: Item processing
-
During this step the connector processes each retrieved seller. The connector creates or updates the corresponding user in Hyperwallet.
Step 1: Extraction of shops
The connector retrieves from Mirakl the shops modified since the last execution of the job.
Then it filters out the shops that doesn’t have the custom field Hyperwallet Ts & Cs and Privacy Policy consent
set to yes
, and extract the seller information from the shop.
And finally, extracts the seller information from the shop, making it available for the item processing step.
During this phase the connector logs the following information:
[BATCHJOB] Started [individualSellersExtractJob] at 2023-04-11T13:20:14.119666 [BATCHJOB] Starting processing of job [BATCHJOB] Starting extraction of items to be processed [BATCHJOB] Retrieving shops since Tue Apr 11 13:17:13 UTC 2023 [BATCHJOB] Shops retrieved [78759] [BATCHJOB] Retrieved the following number of items to be processed: 1
Step 2: Seller processing
The seller processing has two phases:
-
Hyperwallet token synchronization, that ensures that the shop has a Hyperwallet user token assigned if the user already exists in Hyperwallet.
-
Synchronized seller processing, that creates or updates the user in Hyperwallet.
Step 2.1: Hyperwallet token synchronization
During this process the connector first checks if the shop has a value in Hyperwallet User Token
custom field. If it has a value, the connector does nothing and continues processing.
If the shop doesn’t have an Hyperwallet user token assigned, the connector makes a search in Hyperwallet for a user with a clientUserId
that matches the shop id in Mirakl.
If the user exists, the connector updates the user token in Mirakl, and continues processing. If the user isn’t found, the connector continues processing.
Step 2.2: Synchronized seller processing
Based on whether the shop has a user token or not after the synchronization process, the connector creates or updates the user in Hyperwallet.
During this phase the connector logs the following information:
[BATCHJOBITEM] Processing item of type IndividualSeller with id: 78759 [BATCHJOBITEM] Seller created for seller with clientUserId [78759] [BATCHJOBITEM] Updating token for shop [78759] to [usr-1b35293c-8859-4899-ba53-69ee9a918382] [BATCHJOBITEM] Processed successfully item of type IndividualSeller with id: 78759 [BATCHJOBITEM] 1 items processed successfully. 0 items failed. 0 items remaining
Job execution
The connector provides two jobs for extracting sellers:
-
Professional sellers extraction batch job.
-
Individual sellers extraction batch job.
The connector executes the jobs automatically, but users can execute the jobs manually using a REST API.
Scheduled execution
The connector automatically executes the jobs in a scheduled manner. The connector reads the schedule configuration from the following variables:
-
PAYPAL_HYPERWALLET_EXTRACT_SELLERS_CRON_EXPRESSION
-
PAYPAL_HYPERWALLET_EXTRACT_PROFESSIONAL_SELLERS_CRON_EXPRESSION
You can find more information in the configuration variables section.
Manual execution
The connector provides the following REST API to execute the jobs manually:
HTTP method | Path | Job type |
---|---|---|
|
|
Individual sellers extract job |
|
|
Professional sellers extract job |
You can find more information in the generic job REST API reference.
Configuration variables
The section seller onboarding configuration variables, has information about the configuration variables used by the sellers extraction jobs.
API calls
The connector does the following API calls during the sellers extraction jobs execution:
Call | Target System | Endpoint | Parameters |
---|---|---|---|
Retrieve all modified shops since the last specified date |
Mirakl |
|
|
Update Hyperwallet user token in a Shop |
Mirakl |
|
|
Create a new user |
Hyperwallet |
The connector generates a body from the seller information contained in the Mirakl shop according to the data mapping rules. The following mappings are specially relevant:
|
|
Update an existing user |
Hyperwallet |
The connector generates a body from the seller information contained in the Mirakl shop according to the data mapping rules. The data mappings are the same as for the user creation. |
|
Retrieve an existing user by its |
Hyperwallet |
|
Data mapping
Common fields
Hyperwallet field | Mirakl field | Notes |
---|---|---|
|
|
Auto generated when creating a shop in Mirakl. |
|
|
If |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Two letter code for U.S. |
|
|
|
|
|
|
|
Custom field |
Program token configured for the program stored in the custom field |
|
|
Troubleshooting
This job doesn’t have any specific troubleshooting guides. Follow the generic recommendations detailed in troubleshooting of a job.