# Impact Ads

## Pipeline Concepts

Before setting up the datasource, learn about datasource concepts [here](https://docs.sprinkledata.com/product/ingesting-your-data/pipelines)

## Step by Step Guide

### STEP-1: Configure Connection

To learn about Connection, refer [here](https://docs.sprinkledata.com/product/ingesting-your-data/pipelines)

* Log into Sprinkle application
* Navigate to Ingest -> Connections Tab -> New Connection ->&#x20;
* Select Impact Ads&#x20;
* Provide all the mandatory details
  * *Name*: Name to identify this connection
  * *Account SID*: Login to the Impact console. Go to settings and then search for Technical Settings then click on API Access. If not enable, Click Enable API Access Now. Copy the Account SID.
  * *Auth Token*: Login to the Impact console. Go to settings and then search for Technical Settings then click on API Access. Of not enable, Click Enable API Access Now. Copy the Auth Token.
  * *Advance Settings* : Refer [here](#advanced-connection-settings)&#x20;
* Test Connection&#x20;
* Create

### STEP-2: Configure Pipeline

To learn about datasource, refer [here](https://docs.sprinkledata.com/product/ingesting-your-data/pipelines)

* Navigate to Ingest -> Pipeline Tab -> Add ->&#x20;
* Select Impact Ads
* Provide the name -> Create
* **Connection Tab**:&#x20;
  * From the drop-down, select the name of connection created in STEP-2
  * Update

### STEP-3: Create Dataset

**Datasets Tab**: To learn about Dataset, refer [here](https://docs.sprinkledata.com/product/ingesting-your-data/pipelines). Add Dataset for each report/dataset that you want to integrate, providing following details

* *Table Types* (Required): Select from the drop-down:
  * *Accounts*
  * *Actions*
  * *ActionInquiries*
  * *ActionUpdates*
  * *Ads*
  * *Campaigns*
  * *Deals*
  * *Catalogs*
  * *Catalogs\_Items*
  * *Catalogs\_ItemSearch*
  * *Clicks*
  * *Contracts*
  * *Active\_Contracts*
  * *PublicTerm\_Contracts*
  * *Invoices*
  * *MediaProperties*
  * *Reports*
  * *Users*
  * *WithdrawalSettings*
* Flatten Level(Required) : Select One Level or Multi Level. In one level, flattening will not be applied on complex type. They will be stored as string. In multi level, flattening will be applied in complex level till they become simple type.
* *Destination Schema* (Required) : Data warehouse schema where the table will be ingested into
* *Destination Table name* (Required) : It is the table name to be created on the warehouse. If not given, sprinkle will create like ds\_\<pipelinename>\_\<tablename>
* *Destination Create Table Clause*: Provide additional clauses to warehouse-create table queries such as clustering, partitioning, and more, useful for optimizing DML statements.[ Learn more](https://docs.sprinkledata.com/product/ingesting-your-data/pipelines/databases/features/destination-create-table-clause) on how to use this field.
* Create

### STEP-4: Run and schedule Ingestion

In the **Ingestion Jobs** ta&#x62;**:**

* Trigger the Job, using Run button
* To schedule, enable Auto-Run. Change the frequency if needed

### Advanced Connection Settings

* **API Read Timeout (In seconds) :** Maximum time of inactivity between two data packets when waiting for the server's response. The default value is 30 seconds
* **API Connection Timeout (In seconds) :** Time period within which a connection between a client and a server must be established.&#x20;
* **Retry Limit :** Number of retries allowed when an API call fails. For example if an API call fails and retry limit is 5 then it will check 5 times for that API call and if it succeeded then it will stop checkin&#x67;**.**
* **Retry Sleep Time (In milliseconds) :** Given time, after which retry should happen in case an API call fails.

## Dataset Fields

<details>

<summary>Accounts</summary>

* companyname&#x20;
* primarypromotionalmethod&#x20;
* promotionalmethods&#x20;
* website&#x20;
* primaryphonenumber&#x20;
* primaryphonenumbercountry&#x20;
* secondaryphonenumber&#x20;
* secondaryphonenumbercountry&#x20;
* minimumcontactrating&#x20;
* timezone&#x20;
* currency&#x20;
* registeredforindirecttax&#x20;
* indirecttaxnumber&#x20;
* organizationtype&#x20;
* einssnforeigntaxid&#x20;
* corporateaddress\_addressline1&#x20;
* corporateaddress\_addressline2&#x20;
* corporateaddress\_city&#x20;
* corporateaddress\_state&#x20;
* corporateaddress\_postalcode&#x20;
* corporateaddress\_country&#x20;
* billingaddress\_addressline1&#x20;
* billingaddress\_addressline2&#x20;
* billingaddress\_city&#x20;
* billingaddress\_state&#x20;
* billingaddress\_postalcode&#x20;
* billingaddress\_country&#x20;
* financialcontact\_userid&#x20;
* financialcontact\_name&#x20;
* financialcontact\_email&#x20;
* financialcontact\_workphonenumber&#x20;
* financialcontact\_workphonenumbercountry&#x20;
* financialcontact\_cellphonenumber&#x20;
* financialcontact\_cellphonenumbercountry&#x20;
* technicalcontact\_userid technicalcontact\_name&#x20;
* technicalcontact\_email&#x20;
* technicalcontact\_workphonenumber&#x20;
* technicalcontact\_workphonenumbercountry&#x20;
* technicalcontact\_cellphonenumber&#x20;
* technicalcontact\_cellphonenumbercountry&#x20;
* commercialcontact\_userid&#x20;
* commercialcontact\_name&#x20;
* commercialcontact\_email&#x20;
* commercialcontact\_workphonenumber&#x20;
* commercialcontact\_workphonenumbercountry&#x20;
* commercialcontact\_cellphonenumber&#x20;
* commercialcontact\_cellphonenumbercountry&#x20;
* uri

</details>

<details>

<summary>Actions</summary>

* Id&#x20;
* CampaignId&#x20;
* CampaignName&#x20;
* ActionTrackerId&#x20;
* ActionTrackerName&#x20;
* State&#x20;
* AdId&#x20;
* Payout&#x20;
* Amount&#x20;
* Currency&#x20;
* ReferringDate&#x20;
* EventDate&#x20;
* LockingDate&#x20;
* ClearedDate&#x20;
* ReferringDomain&#x20;
* PromoCode&#x20;
* Oid&#x20;
* SubId1&#x20;
* SharedId&#x20;
* Uri

</details>

<details>

<summary>ActionInquiries</summary>

* Id&#x20;
* MediaPartnerInquiryId&#x20;
* CampaignId&#x20;
* CampaignName&#x20;
* OrderId&#x20;
* TransactionDate&#x20;
* TransactionAmount&#x20;
* CustomerId&#x20;
* InquiryDate&#x20;
* InquiryType&#x20;
* ExpectedPayout&#x20;
* ResolutionDeadlineDate&#x20;
* Comments&#x20;
* InquiryNotes&#x20;
* TrackingLink&#x20;
* ActionId&#x20;
* ActionUri&#x20;
* AutoApprovalDate&#x20;
* ResolutionStatus&#x20;
* RejectReason&#x20;
* FinalPayout&#x20;
* ResolutionDate&#x20;
* CreationDate

</details>

<details>

<summary>Ads</summary>

* Id&#x20;
* Name&#x20;
* Description&#x20;
* CampaignId&#x20;
* CampaignName&#x20;
* Type &#x20;
* TrackingLink&#x20;
* LandingPageUrl&#x20;
* AdvertiserId&#x20;
* AdvertiserName&#x20;
* Code&#x20;
* IFrameCode&#x20;
* Width&#x20;
* Height&#x20;
* CreativeUrl&#x20;
* Labels&#x20;
* AllowDeepLinking&#x20;
* MobileReady&#x20;
* Language&#x20;
* StartDate&#x20;
* EndDate&#x20;
* Season&#x20;
* Uri

</details>

<details>

<summary>Campaigns</summary>

* AdvertiserId&#x20;
* AdvertiserName&#x20;
* AdvertiserUrl&#x20;
* CampaignId&#x20;
* CampaignName&#x20;
* CampaignUrl&#x20;
* CampaignDescription&#x20;
* ShippingRegions&#x20;
* CampaignLogoUri&#x20;
* PublicTermsUri&#x20;
* ContractStatus&#x20;
* ContractUri&#x20;
* TrackingLink&#x20;
* AllowsDeeplinking&#x20;
* DeeplinkDomains

</details>

<details>

<summary>Catalogs</summary>

* Id&#x20;
* Name&#x20;
* Language&#x20;
* AdvertiserId&#x20;
* AdvertiserName&#x20;
* AdvertiserLocation&#x20;
* CampaignId&#x20;
* CampaignName&#x20;
* NumberOfItems&#x20;
* DateLastUpdated&#x20;
* Locations&#x20;
* FTPLocations&#x20;
* ItemsUri&#x20;
* Uri

</details>

<details>

<summary>Clicks</summary>

* Id&#x20;
* CampaignId&#x20;
* CampaignName&#x20;
* ProfileId&#x20;
* IpAddress&#x20;
* EventDate&#x20;
* MediaId&#x20;
* MediaName&#x20;
* AdId&#x20;
* AdName&#x20;
* AdType&#x20;
* DealName&#x20;
* DealType&#x20;
* DealScope&#x20;
* ProductSku&#x20;
* CustomerArea&#x20;
* CustomerCity&#x20;
* CustomerRegion&#x20;
* CustomerCountry&#x20;
* DeviceType&#x20;
* DeviceFamily&#x20;
* Browser&#x20;
* Os&#x20;
* ReferringUrl&#x20;
* ReferringDomain&#x20;
* LandingPageUrl&#x20;
* SubId1&#x20;
* SubId2&#x20;
* SubId3&#x20;
* SharedId&#x20;
* TrafficCategory&#x20;
* TrafficSource&#x20;
* BidKeyword&#x20;
* CpcBid&#x20;
* UniqueClick&#x20;
* Payout

</details>

<details>

<summary>Contracts</summary>

* Id&#x20;
* CampaignId&#x20;
* Status&#x20;
* StartDate&#x20;
* EndDate&#x20;
* BrandSignatory&#x20;
* BrandSignatoryDate&#x20;
* PartnerSignatory&#x20;
* PartnerSignatoryDate&#x20;
* DateCreated&#x20;
* DateLastUpdated&#x20;
* EventPayouts&#x20;
* SpecialTermsList&#x20;
* ChangeNotificationPeriod&#x20;
* ReturnPolicy&#x20;
* MaxReturnPercentage&#x20;
* ActionLimit&#x20;
* ActionLimitPeriod&#x20;
* SpendLimit&#x20;
* SpendLimitPeriod&#x20;
* MinEarningPerClick&#x20;
* ContractStartSlottingFee&#x20;
* FirstActionSlottingFee&#x20;
* MonthlySlottingFee&#x20;
* CustomCreativePayer&#x20;
* PdfUri&#x20;
* Uri

</details>

<details>

<summary>Deals</summary>

* Id&#x20;
* Name&#x20;
* Description&#x20;
* CampaignId&#x20;
* State&#x20;
* Type&#x20;
* Scope&#x20;
* Public&#x20;
* Product&#x20;
* PurchaseLimitQuantity&#x20;
* StartDate&#x20;
* EndDate&#x20;
* DateCreated&#x20;
* DateLastUpdated&#x20;
* Uri

</details>

<details>

<summary>Invoices</summary>

* Id&#x20;
* CreatedDate&#x20;
* RecipientId&#x20;
* RecipientName&#x20;
* Currency&#x20;
* TotalAmount&#x20;
* TotalVatAmount&#x20;
* LineItems&#x20;
* PDF&#x20;
* URI

</details>

<details>

<summary>Media</summary>

* Id&#x20;
* Name&#x20;
* Thumbnail&#x20;
* Description&#x20;
* Tags&#x20;
* RevenueModel&#x20;
* Url&#x20;
* Type&#x20;
* MonthlyUniqueVisitors&#x20;
* AlexaRating&#x20;
* QuantcastRating&#x20;
* OwnershipVerified&#x20;
* MobilePlatform&#x20;
* AppStoreRating&#x20;
* Installs&#x20;
* Price&#x20;
* SocialPlatform&#x20;
* Followers&#x20;
* Handle

</details>

<details>

<summary>Reports</summary>

* name&#x20;
* id&#x20;
* description&#x20;
* apiaccessible&#x20;
* apirunuri&#x20;
* metadatauri

</details>

<details>

<summary>Users</summary>

* Id&#x20;
* FirstName&#x20;
* LastName&#x20;
* Type&#x20;
* State&#x20;
* Language&#x20;
* AccessRights&#x20;
* JoinedDate&#x20;
* DateLastUpdated&#x20;
* CreatedBy&#x20;
* Uri

</details>

<details>

<summary>Withdrawal Settings</summary>

* PaymentMethod&#x20;
* PaypalEmailAddress&#x20;
* BeneficiaryAccountName&#x20;
* BankCountry&#x20;
* BeneficiaryClassification&#x20;
* BeneficiaryAlternativeName&#x20;
* BeneficiaryTaxPayerId&#x20;
* BankAccountType&#x20;
* BankAccountNumber&#x20;
* SwiftCode&#x20;
* RoutingCode&#x20;
* VoCode&#x20;
* AgencyCode&#x20;
* BankAddress&#x20;
* BankPostalCode&#x20;
* BankCity&#x20;
* BankState&#x20;
* BranchCode&#x20;
* PaymentSchedulingType&#x20;
* PaymentThreshold&#x20;
* PaymentDay

</details>
