# Send data to Marketo using the API Form Submission Exports in PathFactory In 2021, Marketo disabled posts to save2 endpoint. As a result, PathFactory switched to utilizing the Marketo Form Submit API export as a way to faciliate engagmeent session data send from PathFactory to Marketo. ## Step 1: Create fields in Marketo First, you need to create new custom property fields in Marketo. You can find this configuration in Marketo’s **Admin** **Settings** > **Field** **Management**. You will typically be sent a standard list of fields by one of our Implementation Specialists if you are currently onboarding with us. See the following list of field names for your reference. ### Field names Field Name: PathFactory Experience Name Field Value: pathFactoryExperienceName Field Type: String Field Name: PathFactory Number of Assets Viewed Field Value: pathFactoryNumberofAssetsViewed Field Type: Integer Field Name: PathFactory Content Count – Threshold Met Field Value: pathFactoryContentCountMetThreshold Field Type: Integer Field Name: PathFactory Content Journey Field Value: pathFactoryContentJourney Field Type: Text Area Field Name: PathFactory Content List – Threshold Met Field Value: pathFactoryContentListThresholdMet Field Type: Text Area Field Name: PathFactory Topic List – Threshold Met Field Value: pathFactoryTopicListThresholdMet Field Type: String Field Name: PathFactory Funnel Stage – Threshold Met Field Value: pathFactoryFunnelStageThresholdMet Field Type: String Field Name: PathFactory Content Types List– Threshold Met Field Value: pathFactoryContentTypesListThresholdMet Field Type: Text Area Field Name: PathFactory Engagement Score Field Value: pathFactoryEngagementScore Field Type: Integer Field Name: PathFactory External ID Field Value: pathFactoryExternalID Field Type: String Field Name: PathFactory Engagement Time Field Value: pathFactoryEngagementTime Field Type: Integer Field Name: PathFactory Last Viewed Content Title Field Value: pathFactoryLastViewedContentTitle Field Type: String Field Name: PathFactory Last Viewed Content Source URL Field Value: pathFactoryLastViewedContentSourceURL Field Type: String NOTE: Please use the Field Type as we have recommended. ## Step 2: Create a Marketo form 1. Create a new Marketo form in your Marketo instance. Give the form a name that fits with your team and workflow. Common examples include `PathFactory Forms API Sessions` or `PathFactory Visitor Sessions`. This form won't be displayed to your visitors so keep the fields surfaced on the form as it could help us with testing. 2. Add all the fields you just created. 3. Add an **Email** field as well, which is the main unique identifier that converts the visitor. 4. Ensure the email field is the only required field. 5. When completed, select **Finish** and **Approve and Close** to save any changes. ## Step 3: Set up the Form API Export in PathFactory 1. Login to your PathFactory instance. 2. Navigate to **Organization Settings** > **Marketo Account** tab. 3. Select **+ Add API Form Submission Export**. A modal appears. 4. Complete the following fields in the modal. **Name**: this name only appears in PathFactory, so choose whatever works best for you. Common examples are `PathFactory Visitor Session` or `PathFactory Session`. **Marketo Form ID**: find this ID in your Marketo form embed code and paste it here. In the following example, my form ID is 1842. <img src="https://buzzdata.github.io/kb/assets/img/marketo-form-code.png" /> **Event Type**: Choose Visitor Session **Fire for Excluded Visitors**: select this option if you want data for excluded visitors (such as both your internal employees and PathFactory employees) to be included in the data. ## Step 4: Add the fields in your Forms API Since your API is connected to your PathFactory instance, you don't need to manually populate the fields. 1. Select **Configure Event Fields**. A modal opens. <img src="https://buzzdata.github.io/kb/assets/img/marketo-api-dropdown.png" /> 2. Using the **Event Field** and **Marketo Form Field** drop-downs, map the PathFactory fields to the corresponding Marketo fields. Refer to the previous list of standard field names if necessary. 3. Select **Save**. You’re all ready to go! ## Additional Form Submit API Export Settings ![](https://i.imgur.com/QDFYstF.png) Edit: use if you want to edit the name of your form in PathFactory. Refresh Marketo Form Fields: use to make updated, deleted, or new fields appear in the Marketo Form Field drop-down. Remove: use to delete the form from PathFactory. WARNING: removal is permanent. Deleted forms cannot be retrieved. You'll have to re-create any removed forms.