# Marketo

## Pipeline Concepts

Before setting up the Pipeline, learn about Pipeline 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 Marketo
* Provide all the mandatory details

To get the details:

Login to your Marketo account and in the admin section, click on “Users and Roles” on the left panel. Create a new role. Reveal the list of role permissions by clicking Access API. Post this, an API-only user needs to be created and associated (On clicking the checkbox) with the API role created in the previous step.

Create a custom application, Admin -> Launch point -> Create a new service. On providing the display name, service type, description and email. On clicking “view details” [Client ID](https://developers.marketo.com/blog/quick-start-guide-for-marketo-rest-api/) and [Client Secret](https://developers.marketo.com/blog/quick-start-guide-for-marketo-rest-api/) are obtained. Marketo Admin -> Web Services Panel -> [Endpoint URL](https://developers.marketo.com/rest-api/base-url/) and below that [Identity URL](https://developers.marketo.com/rest-api/base-url/) can also be found.

* *Name*: Name to identify this connection
* *Client Id*
* *Client Secret*
* *Endpoint Url*
* *Identity Url*
* Test Connection&#x20;
* Create

### STEP-2: Configure Pipeline

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

* Navigate to Ingest -> Pipeline Tab -> Add ->&#x20;
* Select Marketo
* 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

* *Report Type* (Required): Select from drop-down:
  * *Activity\_Types*
  * *Custom\_Activity\_Types*
  * *Campaigns*
  * *Smart\_Campaigns*
  * *Channels*
  * *Custom\_Objects*
  * *Emails*
  * *Lists*
  * *Smart\_Lists*
  * *Segmentations*
  * *Programs*
  * *Tag\_Types*
* 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\_\<datasourcename>\_\<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

### Dataset Fields

All the datasets can have the following fields

<details>

<summary>emails</summary>

* id&#x20;
* name&#x20;
* description
* &#x20;createdat&#x20;
* updatedat&#x20;
* url&#x20;
* subject\_type
* subject\_value
* fromname\_type&#x20;
* fromname\_value&#x20;
* fromemail\_type&#x20;
* fromemail\_value&#x20;
* replyemail\_type&#x20;
* replyemail\_value&#x20;
* folder\_type&#x20;
* folder\_value&#x20;
* folder\_foldername&#x20;
* operational&#x20;
* textonly&#x20;
* publishtomsi&#x20;
* webview&#x20;
* status&#x20;
* template&#x20;
* workspace&#x20;
* isopentrackingdisabled&#x20;
* version&#x20;
* autocopytotext

</details>

<details>

<summary>activity_types</summary>

* id name&#x20;
* description&#x20;
* primaryattribute\_name&#x20;
* primaryattribute\_datatype&#x20;
* attributes\_0\_\_name&#x20;
* attributes\_0\_\_datatype&#x20;
* attributes\_1\_\_name&#x20;
* attributes\_1\_\_datatype&#x20;
* attributes\_2\_\_name&#x20;
* attributes\_2\_\_datatype&#x20;
* attributes\_3\_\_name&#x20;
* attributes\_3\_\_datatype&#x20;
* attributes\_4\_\_name&#x20;
* attributes\_4\_\_datatype&#x20;
* attributes\_5\_\_name&#x20;
* attributes\_5\_\_datatype&#x20;
* attributes\_6\_\_name&#x20;
* attributes\_6\_\_datatype&#x20;
* attributes\_7\_\_name&#x20;
* attributes\_7\_\_datatype&#x20;
* attributes\_8\_\_name&#x20;
* attributes\_8\_\_datatype&#x20;
* attributes\_9\_\_name&#x20;
* attributes\_9\_\_datatype&#x20;
* attributes\_10\_\_name&#x20;
* attributes\_10\_\_datatype&#x20;
* attributes\_11\_\_name&#x20;
* attributes\_11\_\_datatype&#x20;
* attributes\_12\_\_name&#x20;
* attributes\_12\_\_datatype&#x20;
* attributes\_13\_\_name&#x20;
* attributes\_13\_\_datatype

</details>

<details>

<summary>programs</summary>

* id&#x20;
* name&#x20;
* description&#x20;
* createdat&#x20;
* updatedat&#x20;
* url&#x20;
* type&#x20;
* channel&#x20;
* folder\_type&#x20;
* folder\_value&#x20;
* folder\_foldername&#x20;
* status&#x20;
* workspace&#x20;
* exheadstart

</details>

<details>

<summary>smart_campaigns</summary>

* id&#x20;
* name&#x20;
* description&#x20;
* createdat&#x20;
* updatedat&#x20;
* status&#x20;
* type&#x20;
* issystem&#x20;
* isactive&#x20;
* isrequestable&#x20;
* iscommunicationlimitenabled&#x20;
* recurrence\_weekdayonly&#x20;
* qualificationruletype&#x20;
* qualificationruleinterval&#x20;
* qualificationruleunit&#x20;
* workspace&#x20;
* smartlistid&#x20;
* flowid&#x20;
* ecomputedurl

</details>

<details>

<summary>smart_lists</summary>

* id&#x20;
* name&#x20;
* createdat&#x20;
* updatedat&#x20;
* url&#x20;
* folder\_id&#x20;
* folder\_type&#x20;
* workspace&#x20;
* description

</details>

<details>

<summary>segmentations</summary>

* id&#x20;
* name&#x20;
* description&#x20;
* createdat&#x20;
* updatedat&#x20;
* url&#x20;
* folder\_type&#x20;
* folder\_value&#x20;
* status&#x20;
* workspace

</details>

<details>

<summary>lists</summary>

* id&#x20;
* name&#x20;
* workspaceid&#x20;
* workspacename&#x20;
* createdat&#x20;
* updatedat

</details>

<details>

<summary>channels</summary>

* id&#x20;
* name&#x20;
* applicableprogramtype&#x20;
* progressionstatuses\_0\_\_name&#x20;
* progressionstatuses\_0\_\_step&#x20;
* progressionstatuses\_0\_\_type&#x20;
* progressionstatuses\_0\_\_success&#x20;
* progressionstatuses\_0\_\_hidden&#x20;
* progressionstatuses\_1\_\_name&#x20;
* progressionstatuses\_1\_\_step&#x20;
* progressionstatuses\_1\_\_type&#x20;
* progressionstatuses\_1\_\_success&#x20;
* progressionstatuses\_1\_\_hidden&#x20;
* progressionstatuses\_2\_\_name&#x20;
* progressionstatuses\_2\_\_step&#x20;
* progressionstatuses\_2\_\_type&#x20;
* progressionstatuses\_2\_\_success&#x20;
* progressionstatuses\_2\_\_hidden&#x20;
* createdat&#x20;
* updatedat&#x20;
* progressionstatuses\_3\_\_name&#x20;
* progressionstatuses\_3\_\_step&#x20;
* progressionstatuses\_3\_\_type&#x20;
* progressionstatuses\_3\_\_success&#x20;
* progressionstatuses\_3\_\_hidden&#x20;
* progressionstatuses\_4\_\_name&#x20;
* progressionstatuses\_4\_\_step&#x20;
* progressionstatuses\_4\_\_type&#x20;
* progressionstatuses\_4\_\_success&#x20;
* progressionstatuses\_4\_\_hidden&#x20;
* progressionstatuses\_5\_\_name&#x20;
* progressionstatuses\_5\_\_step&#x20;
* progressionstatuses\_5\_\_type&#x20;
* progressionstatuses\_5\_\_success&#x20;
* progressionstatuses\_5\_\_hidden&#x20;
* progressionstatuses\_6\_\_name&#x20;
* progressionstatuses\_6\_\_step&#x20;
* progressionstatuses\_6\_\_type&#x20;
* progressionstatuses\_6\_\_success&#x20;
* progressionstatuses\_6\_\_hidden&#x20;
* progressionstatuses\_7\_\_name&#x20;
* progressionstatuses\_7\_\_step&#x20;
* progressionstatuses\_7\_\_type&#x20;
* progressionstatuses\_7\_\_success&#x20;
* progressionstatuses\_7\_\_hidden&#x20;
* progressionstatuses\_8\_\_name&#x20;
* progressionstatuses\_8\_\_step&#x20;
* progressionstatuses\_8\_\_type&#x20;
* progressionstatuses\_8\_\_success&#x20;
* progressionstatuses\_8\_\_hidden

</details>

<details>

<summary>describe_leads</summary>

* id&#x20;
* displayname&#x20;
* datatype&#x20;
* length&#x20;
* rest\_name&#x20;
* rest\_readonly&#x20;
* soap\_name&#x20;
* soap\_readonly

</details>

<details>

<summary>custom_activity<em>_</em>types</summary>

* apiName
* attributes
* createdAt
* description
* filterName
* id
* name
* primaryAttribute
* status
* triggerName
* updatedAt

</details>

<details>

<summary>custom_objects</summary>

* createdAt
* dedupeFields
* description
* displayName
* pluralName
* fields
* idField
* apiName
* relationships
* searchableFields
* updatedAt
* state
* version

</details>

<details>

<summary>campaigns</summary>

* id
* name
* active
* createdAt
* description
* programId
* programName
* type
* updatedAt
* workspaceName

</details>

<details>

<summary>tag_types</summary>

* applicableProgramTypes
* required
* tagType

</details>
