Release Status Released Supported By Singer community
Availability Free Status Page Yotpo Status Page
Default Historical Sync 1 year Default Replication Frequency 1 hour
Whitelisting Tables only Destination Incompatibilities None

Connecting Yotpo

Yotpo Setup requirements

To set up Yotpo in Stitch, you need:

  • To be the Account Administrator in Yotpo. This is required to access your Yotpo API credentials.

Step 1: Retrieve your Yotpo API credentials

  1. Sign into your Yotpo account.
  2. Click the user menu (person icon) in the top right corner.
  3. Click Account Settings.
  4. On the Account Settings page, click the Store tab.
  5. Locate the API Credentials section:

    The API Credentials section in Yotpo, highlighted

  6. The App Key field contains your API Key, and the Secret Key is your API Secret.

Leave this page open for now - you’ll need it to complete the next step.

Step 2: Add Yotpo as a Stitch data source

  1. Sign into your Stitch account.
  2. On the Stitch Dashboard page, click the Add Integration button.

  3. Click the Yotpo icon.

  4. Enter a name for the integration. This is the name that will display on the Stitch Dashboard for the integration; it’ll also be used to create the schema in your destination.

    For example, the name “Stitch Yotpo” would create a schema called stitch_yotpo in the destination. Note: Schema names cannot be changed after you save the integration.

  5. In the Yotpo API Key field, paste the value from the App Key field in your Yotpo account.
  6. In the Yotpo API Secret field, paste the value from the Secret Key field in your Yotpo account.

Step 3: Define the Historical Sync

The Sync Historical Data setting will define the starting date for your Yotpo integration. This means that data equal to or newer than this date will be replicated to your data warehouse.

Change this setting if you want to replicate data beyond Yotpo’s default setting of 1 year. For a detailed look at historical replication jobs, check out the Syncing Historical SaaS Data guide.

Step 4: Create a replication schedule

In the Replication Frequency section, you’ll create the integration’s replication schedule. An integration’s replication schedule determines how often Stitch runs a replication job, and the time that job begins.

Stitch offers two methods of creating a replication schedule:

  • Replication Frequency: This method requires selecting the interval you want replication to run for the integration. Start times of replication jobs are based on the start time and duration of the previous job. Refer to the Replication Frequency documentation for more information and examples.
  • Anchor scheduling: Based on the Replication Frequency, or interval, you select, this method “anchors” the start times of this integration’s replication jobs to a time you select to create a predictable schedule. Anchor scheduling is a combination of the Anchor Time and Replication Frequency settings, which must both be defined to use this method. Additionally, note that:

    • A Replication Frequency of at least one hour is required to use anchor scheduling.
    • An initial replication job may not begin immediately after saving the integration, depending on the selected Replication Frequency and Anchor Time. Refer to the Anchor Scheduling documentation for more information.

To help prevent overages, consider setting the integration to replicate less frequently. See the Understanding and Reducing Your Row Usage guide for tips on reducing your usage.

Step 5: Set tables to replicate

To complete the setup, you’ll need to select tables you want to replicate to your data warehouse.

Check out the Schema section to learn more about the available tables in Yotpo and how they replicate.

  1. In the list of tables that displays - or in the Tables to Replicate tab, if you skipped this step during setup - locate a table you want to replicate.
  2. To track a table, click the checkbox next to the table’s name. A green checkmark means the table is set to replicate.

  3. Repeat this process for all the tables you want to replicate.
  4. When finished, click the Finalize Your Selections button at the bottom of the screen to save your selections.

Note: If you change these settings while a replication job is still in progress, they will not be used until the next job starts.

Initial and historical replication jobs

After you finish setting up Yotpo, its Sync Status may show as Pending on either the Stitch Dashboard or in the Integration Details page.

For a new integration, a Pending status indicates that Stitch is in the process of scheduling the initial replication job for the integration. This may take some time to complete.

Free historical data loads

The first seven days of replication, beginning when data is first replicated, are free. Rows replicated from the new integration during this time won’t count towards your quota. Stitch offers this as a way of testing new integrations, measuring usage, and ensuring historical data volumes don’t quickly consume your quota.


Yotpo Replication

Every time Stitch runs a replication job for Yotpo, the last 30 days’ worth of data will be replicated for these tables:

  • emails

  • reviews

Stitch replicates data in this way to account for updates made to existing records within the default attribution window of 30 days, thus ensuring you won’t make decisions based on stale (or false) data. As a result, you may see a higher number of replicated rows than what’s being generated in Yotpo.

Setting the Replication Frequency to a higher frequency - like 30 minutes - can result in re-replicating recent data and contribute to high row counts. Selecting a lower frequency can help prevent overages.

Refer to the documentation for each of these tables in the next section for more info.

Attribution window examples

In the tabs below are examples of attribution windows behave during historical (initial) and ongoing replication jobs.

For historical and full re-replications of Yotpo data, Stitch will query for and extract data newer than or equal to the date defined in the Start Date field in the Integration Settings page.

The Start Date, in conjunction with the Attribution Window, will define the minimum date Stitch should query for when extracting historical data. This is calculated as:

Start Date - Attribution Window = Minimum Extraction Date

Example

During the initial set up, the Start Date field is set to 06/03/2017, or ``.

To account for the Attribution Window, Stitch would calculate the Minimum Extraction Date value as: 2017-07-03 00:00:00 - 30 days = 2017-06-03 00:00:00

If you were to write a SQL query using this date for the reviews table, it might look like this:

  SELECT *
    FROM yotpo.reviews
   WHERE created_at >= '2017-06-03 00:00:00'   /* Min. Extraction Date */
ORDER BY created_at

For ongoing replication jobs, Stitch will query for and extract data using the last saved maximum value in the table’s Replication Key column and the Attribution Window setting.

Note: This applies to every replication job that takes place after the historical replication job.

Example

The last maximum saved Replication Key value for the reviews table is 2017-10-01 00:00:00.

To account for the Attribution Window of 30 days, we’d subtract this from the last maximum saved Replication Key value:

2017-10-01 00:00:00 - 30 days = 2017-09-01 00:00:00

In this case, Stitch would query for and extract data that is newer than or equal to 2017-09-01 00:00:00 and older than or equal to 2017-10-01 00:00:00.

If this were a SQL query, it might look like this:

  SELECT *
    FROM reviews
   WHERE created_at >= '2017-09-01 00:00:00'
                              /* max Replication Key value - Attribution Window */
     AND created_at <= '2017-10-01 00:00:00'
                              /* max Replication Key value from previous job */
ORDER BY created_at

Yotpo table schemas

Replication Method: Key-based Incremental Replication Key : email_sent_timestamp
Primary Key : email_address : email_sent_timestamp API Endpoint: Email analytics raw data

The emails table contains data about every email sent from Yotpo.

Attribution window

When Stitch replicates data for this table, it will use an attribution window of 30 days to fetch updated email statistics such as opens, clicks, etc. This means that every time a replication job runs, the last 30 days’ worth of data will be replicated for this table.

Refer to the Replication section for more info and examples of how the attribution window is used to query for data.

email_address
STRING

The email address of the recipient.

Reference:

email_sent_timestamp
STRING

The time the email was sent to the recipient.

order_id
STRING

If applicable, the ID of the order the email is associated with.

order_timestamp
STRING

If applicable, the time the order was placed.

product_id
STRING

If applicable, the ID of the product the email is associated with.

Reference:

sku
STRING

If applicable, the SKU of the product the email is associated with.

email_type
STRING

The email’s type. For example: reminder

reminder_num
NUMBER

The number of the MAP reminder email.

trr_bundle_id
STRING

If applicable, the bundle ID associated with the product.

trr_bundle_subject
STRING

If applicable, the bundle subject associated with the product.

review_type
STRING

If applicable, the type of review associated with the email.

coupon_code
STRING

If applicable, the coupon code associated with the email.

opened_timestamp
STRING

The time the recipient opened the email.

clicked_through_timestamp
STRING

The time th e recipient clicked through a link in the email.

content_creation_timestamp
STRING

The time the email content was created.

review_form
STRING

If applicable, the review form associated with the email.

platform
STRING

The platform the recipient viewed the email on. For example: desktop

invalid_address_timestamp
STRING

The time the recipient’s email address was marked as invalid.

failed_timestamp
STRING

The time the email failed to send.

unsubscribed_timestamp
STRING

The time the recipient unsubscribed from the email list.

marked_spam_timestamp
STRING

The time the recipient marked the email as spam.

arrived_early_timestamp
STRING

The time the email arrived early.


Replication Method: Key-based Incremental Replication Key : created_at
Primary Key : id API Endpoint: Reviews for a Product

The product_reviews table contains data about reviews for a certain product.

Note: This table is similar to the reviews table, but also contains custom fields. If you don’t have or need custom product fields, you may only want to replicate the reviews table to prevent redundant data.

id
INTEGER

The review ID.

Reference:

created_at
STRING

The time the review was created.

score
NUMBER

The review’s score.

votes_up
NUMBER

The number of upvotes in the review.

votes_down
NUMBER

The number of downvotes in the review.

content
STRING

If applicable, the comments left by the reviewer about the product.

title
STRING

The title of the review.

verified_buyer
BOOLEAN

If true, the reviewer is a verified buyer.

source_review_id
NUMBER

If applicable, the source review ID.

sentiment
NUMBER

The sentiment of the review.

product_id
NUMBER

The ID of the product that was reviewed.

Reference:

user__user_id
NUMBER

The ID of the user who wrote the review.

user__display_name
STRING

The display name of the user user who wrote the review.

user__social_image
STRING

If applicable, the image associated with the user’s social profile.

user__user_type
STRING

The user’s type.

user__is_social_connected
NUMBER
images_data__id
NUMBER

The image ID.

images_data__original_url
STRING

The URL of the original image.

images_data__thumb_url
STRING

The URL of the thumbnail version of the image.

comment__id
NUMBER

The comment ID.

comment__content
STRING

The content of the comment.

comment__created_at
STRING

The time the comment was created.

comment__display_name
STRING

The display name of the comment.

comment__comments_avatar
STRING

If applicable, the avatar associated with the comment.


Replication Method: Key-based Incremental Replication Key : updated_at
Primary Key : id API Endpoint: Retrieve All Products

The products table contains data about products in your Yotpo account.

id
INTEGER

The product ID.

Reference:

updated_at
STRING

The time the product was last updated.

created_at
STRING

The time the product was created.

average_score
NUMBER

The product’s average score, based on reviews.

total_reviews
NUMBER

The total number of reviews associated with the product.

url
STRING

The URL of the product.

external_product_id
STRING

If applicable, the external ID associated with the product.

name
STRING

The name of the product.

description
STRING

The description of the product.

product_specs__key
STRING

The product spec key.

product_specs__value
STRING
category__id
NUMBER

The ID of the category the product is in.

category__name
STRING

The name of the category the product is in.

images__original
STRING

The original image associated with the product.

images__square
STRING

The thumbnail version of the original image associated with the product.

images__facebook
STRING

The Facebook image associated with the product.

images__facebook_square
STRING

The thumbnail version of the image associated with the product.

images__kind
STRING

Replication Method: Key-based Incremental Replication Key : created_at
Primary Key : id API Endpoint: Retrieve All Reviews

The reviews table contains data about reviews.

Note: This table is similar to the product_reviews table, but doesn’t contain custom fields. If you have or need custom fields, you may want to only replicate the product_reviews table to prevent redundant data.

Attribution window

When Stitch replicates data for this table, it will use an attribution window of 30 days to fetch updated (or deleted) reviews. This means that every time a replication job runs, the last 30 days’ worth of data will be replicated for this table.

Refer to the Replication section for more info and examples of how the attribution window is used to query for data.

id
INTEGER

The ID of the review.

Reference:

created_at
STRING

The time the review was created.

updated_at
STRING

The time the review was last updated.

votes_up
NUMBER

The number of upvotes the review contains.

votes_down
NUMBER

The number of downvotes the review contains.

score
NUMBER

The overall score of the review.

content
STRING

The content of the review.

title
STRING

The title of the review.

email
STRING

The email address of the person who wrote the review.

Reference:

sentiment
NUMBER

The sentiment of the review.

sku
STRING

The SKU associated with the product being reviewed.

name
STRING

The name of the person who left the review.

reviewer_type
STRING

The reviewer type. For example: verified_buyer

deleted
BOOLEAN

If true, the review was deleted.

user_reference
STRING

Replication Method: Key-based Incremental Replication Key : since
Primary Key : id API Endpoint: Retrieve a list of unsubscribers

The unsubscribers table contains data about customers who unsubscribed from one of Yotpo’s emails.

id
INTEGER

The unsubscriber ID.

user_email
STRING

The email address of the unsubscriber.

Reference:

email_type_id
NUMBER

The type of email the user unsubscribed from. Refer to Yotpo’s documentation for a list of possible values.

unsubscirbed_by_name
STRING

Note: The misspelling in this field name originates in Yotpo’s API. Stitch doesn’t have the ability to rename it.



Questions? Feedback?

Did this article help? If you have questions or feedback, feel free to submit a pull request with your suggestions, open an issue on GitHub, or reach out to us.