# Smartrr

\##Snapshot

| Features                        | Details               |
| ------------------------------- | --------------------- |
| Release Status                  | Released              |
| Source API Version              | 2.0                   |
| Table Selection                 | Yes                   |
| Column Selection                | Yes                   |
| Edit Integration                | Yes                   |
| Replication Type Selection      | No                    |
| Authentication Parameters       | Smartrr api key       |
| Replication Type                | Key based replication |
| Replication Key                 | lastRunDate           |
| Suggested Replication Frequency | 24 hrs                |

Tables/APIs Supported | --- | --- Orders | Customers Subscriptions |

\##Integrate Smartrr with Daton

1. Sign in to Daton
2. Select Smartrr from Integrations page
3. Provide Integration Name, Replication Frequency, and History. Integration name would be used in creating tables for the integration and cannot be changed later
4. Provide your Smartrr apikey
5. Post successful authentication, you will be prompted to choose from the list of available tables
6. Then select all required fields for each table
7. Submit the integration

\##Workflow

1. Integrations would be in Pending state initially and will be moved to Active state as soon as the first job loads data successfully on to the configured warehouse
2. Users would be able to edit/pause/re-activate/delete integration anytime
3. Users can view job status and process logs from the integration details page by clicking on the integration name from the active list

\##Smartrr Data ####Orders Purpose: To get all the Orders.

Source API Documentation

Replication: Key-Based Replication

Replication Key: lastRunDate

\#####Fields

| Name                           | Target Datatype |
| ------------------------------ | --------------- |
| createdDate                    | TIMESTAMP       |
| updatedDate                    | TIMESTAMP       |
| deletedAt                      | STRING          |
| id                             | STRING          |
| shopifyId                      | STRING          |
| receivedFromShopifyDate        | TIMESTAMP       |
| shopifyUpdateDate              | TIMESTAMP       |
| shopifyOrderLabel              | STRING          |
| orderProcessedDate             | TIMESTAMP       |
| shippingLineItems              | RECORD          |
| taxLineItems                   | RECORD          |
| discountApplications           | RECORD          |
| refundLineItems                | RECORD          |
| refundOrderAdjustments         | RECORD          |
| totalFromLineItems             | STRING          |
| totalLineItemsDiscount         | STRING          |
| totalLineItemsAfterDiscount    | STRING          |
| totalShipping                  | STRING          |
| totalTax                       | STRING          |
| totalDiscount                  | STRING          |
| totalTip                       | STRING          |
| totalRefund                    | STRING          |
| totalBeforeDiscountsAndRefunds | STRING          |
| totalNetBeforeRefunds          | STRING          |
| shopIncome                     | STRING          |
| totalNet                       | STRING          |
| totalOneTimeShopIncome         | STRING          |
| totalSubscriptionShopIncome    | STRING          |
| totalAddonShopIncome           | STRING          |
| orderCurrency                  | STRING          |
| orderSource                    | STRING          |
| orderStatus                    | STRING          |
| financialStatus                | STRING          |
| fulfillmentStatus              | STRING          |
| trackingInfo                   | STRING          |
| deliveryLatitude               | NUMERIC         |
| deliveryLongitude              | NUMERIC         |
| deliveryProvinceCode           | STRING          |
| deliveryCountryCode            | STRING          |
| deliveryAddress                | RECORD          |
| pmtMthJson                     | RECORD          |
| cancelReason                   | STRING          |
| cancelledAt                    | STRING          |
| items                          | RECORD          |
| custRel                        | RECORD          |
| sts                            | STRING          |

\####Customers Purpose: To get all the customers

Source API Documentation

Replication: Key-Based Replication

Replication Key: lastRunDate

\#####Fields

| Name                    | Target Datatype |
| ----------------------- | --------------- |
| createdDate             | TIMESTAMP       |
| updatedDate             | TIMESTAMP       |
| deletedAt               | STRING          |
| id                      | STRING          |
| shopifyId               | STRING          |
| receivedFromShopifyDate | TIMESTAMP       |
| shopifyUpdateDate       | TIMESTAMP       |
| email                   | STRING          |
| phone                   | STRING          |
| inferredPhone           | STRING          |
| firstName               | STRING          |
| lastName                | STRING          |
| role                    | STRING          |
| customerCurrency        | STRING          |
| hasLoggedIn             | BOOLEAN         |
| orderCount              | INTEGER         |
| totalSpent              | STRING          |

\####Subscriptions Purpose: To get all the subscriptions.

Source API Documentation

Replication: Key-Based Replication

Replication Key: lastRunDate

\#####Fields

| Name                               | Target Datatype |
| ---------------------------------- | --------------- |
| createdDate                        | TIMESTAMP       |
| updatedDate                        | TIMESTAMP       |
| deletedAt                          | STRING          |
| id                                 | STRING          |
| shopifyId                          | STRING          |
| receivedFromShopifyDate            | TIMESTAMP       |
| shopifyUpdateDate                  | TIMESTAMP       |
| nextBillingDate                    | TIMESTAMP       |
| cancelledAt                        | STRING          |
| purchaseStateStatus                | STRING          |
| initialSubmissionDate              | TIMESTAMP       |
| createdViaCustomerPortal           | BOOLEAN         |
| isRepeatCustomer                   | BOOLEAN         |
| sellingPlanId                      | STRING          |
| discounts                          | STRING          |
| totalEstimatedTax                  | STRING          |
| totalFromLineItems                 | STRING          |
| totalLineItemsDiscount             | STRING          |
| totalLineItemsAfterDiscount        | STRING          |
| totalShipping                      | STRING          |
| totalShippingDiscount              | STRING          |
| totalDiscount                      | STRING          |
| totalEstimatedNet                  | STRING          |
| currency                           | STRING          |
| shippingAddress                    | RECORD          |
| externalSubscriptionId             | STRING          |
| externalSubscriptionType           | STRING          |
| externalSubscriptionStatus         | STRING          |
| originalExternalSubscriptionStatus | STRING          |
| custRel                            | RECORD          |
| schedule                           | RECORD          |
| stLineItems                        | RECORD          |
