Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

In this article

Overview

Use this Snap to update data objects in HubSpot. For more information about HubSpot APIs, see HubSpot Documentation.

Overview.png

Prerequisites

None.

Support for Ultra Pipelines

Works in Ultra Pipelines

See Snap Support for Ultra Pipelines.

Limitations

None.

Known Issues

None.

Snap Views

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Input 

Document

  • Min:1

  • Max:1

  • HubSpot Read

  • Mapper

  • Copy

A document containing details identifying the entity to update along with the information to update.


Output

Document

  • Min:0

  • Max:1

  • JSON Formatter + File Writer

  • Mapper

  • Copy

  • HubSpot Read

A document containing details of the updated entity.

Error

Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter when running the pipeline by choosing one of the following options from the When errors occur list under the Views tab:

  • Stop Pipeline Execution: Stops the current Pipeline execution if the Snap encounters an error.

  • Discard Error Data and Continue: Ignores the error, discards that record, and continues with the remaining records.

  • Route Error Data to Error View: Routes the error data to an error view without stopping the Snap execution.

Learn more about Error handling in Pipelines.

Snap Settings

  • Asterisk ( * ): Indicates a mandatory field.

  • Suggestion icon ((blue star)): Indicates a list that is dynamically populated based on the configuration.

  • Expression icon ((blue star) ): Indicates the value is an expression (if enabled) or a static value (if disabled). Learn more about Using Expressions in SnapLogic.

  • Add icon ( (blue star) ): Indicates that you can add fields in the fieldset.

  • Remove icon ( (blue star)): Indicates that you can remove fields from the fieldset.

  • Upload icon ((blue star) ): Indicates that you can upload files.

Field Name

Field Type

Description

Label*

 

Default Value: HubSpot Update
Example: N/A

String

Specify a name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline.

Entity*

 

Default Value: Association
Example: Company

 

 

String

Select the data object to update.

Action*

 

Default Value: N/A
Example: Update a company

String

Select the update-action to perform on the entity selected above. Click the Suggestion (blue star) icon to see the list of supported actions. 

Required Parameters

 

Use this field set to enable the Snap to perform a specific action.

Parameter

Default Value: N/A
Example: company_id

String

Specify the names of the required parameters. Click the Suggestion (blue star) icon to see the list of supported parameters.

Value

 

Default Value: N/A
Example: 123561234

Multiple

Specify the values of the required parameters. The data type of this field depends on what parameter name you selected or entered which can be String, Integer, Boolean, etc.

Connection timeout*

 

Default Value: 30
Example: 30

Integer

Specify the time in seconds for the Snap to wait before terminating the request because of a failure to estabish a connection to the target service.

Number of retries*

 

Default Value: 0
Example: 0

Integer

Specify the maximum number of retry attempts to make if a connection failure or timeout occurs.

Retry interval (seconds)*

 

Default Value: 0
Example: 0

Integer

Specify the number of seconds for which the Snap must wait before attempting recovery from a network failure.

Retry policy

Default Value: Connection errors
Example: Connection and API limit exceeded errors (429)

Dropdown list

Choose to manage connection and error responses from the following options:

  • Connection errors: Occurs when a client fails to establish a secure connection to the server.

  • Connection and API limit exceeded errors (429): Occurs when either the 10-second limit or the daily limit is exceeded.

Snap Execution

 

Default Value: Execute only
Example: Validate & Execute

Dropdown list

Indicates how the Snap must be executed. Available options are:

  • Validate & Execute: Performs limited execution of the Snap (up to 50 records) during Pipeline validation; performs full execution of the Snap (unlimited records) during Pipeline execution.

  • Execute only: Performs full execution of the Snap during Pipeline execution; does not execute the Snap during Pipeline validation.

  • Disabled: Disables the Snap and, by extension, its downstream Snaps.

Troubleshooting

Error

Reason

Resolution

Missing required parameters.

There is a required parameter that was not provided.

Verify whether all required parameters are configured.

You have reached your ten secondly rolling limit.

There are too many requests to REST endpoint.

Select Connection and API limit exceeded (429) errors in the Retry Policy and adjust the values for “Number of retries” and “Retry interval”.

You have reached your daily limit.

There are too many requests to REST endpoint.

The maximum number of daily requests has been reached, and no further requests can be made until it resets. For more information refer to API Meters.

Examples

Updating a company in HubSpot

We want to update a company entity in the HubSpot instance. This Pipeline demonstrates how we can use the HubSpot Update Snap to accomplish this task:

First, we use the JSON Generator Snap to create a JSON file containing the entity's updated details such as country, founded_year, and address. It is not necessary to use a JSON input, we can also use CSV (CSV Generator) and XML (XML Generator). Alternatively, we can use a File Reader Snap if we already have a file with the company's details and configure it to read the company details file. 

The screenshot below shows the output from the JSON Generator Snap:

01_JSON output.png

We map the fields from the output shown above to the corresponding fields in HubSpot using the Mapper Snap. 

02_Mapper .png

Upon execution, the JSON input file's fields are mapped to the HubSpot entity's fields as shown in the Mapper Snap's output below:

03_Mapper output.png

The above output is passed to the HubSpot Update Snap. The HubSpot Update Snap is configured with the Company entity and Update a company action.

04_Update.png

Upon execution, the HubSpot Update Snap updates the company with the specified details as shown in the HubSpot Update Snap's output below:

05_update output.png

Since we want to write this output into a local file for record-keeping, we use a combination of the JSON Formatter and File Writer Snaps downstream of the HubSpot Update Snap.  The screenshot below shows the configuration of the File Writer Snap:

06_Writer.png

To view the newly-created file, you must SSH to the target directory and open the newly-created file.

The following picture shows the preview of the result output JSON file.

Preview.png

Downloads

  1. Download and import the Pipeline into SnapLogic.

  2. Configure Snap accounts as applicable.

  3. Furnish Pipeline parameters as applicable.

  File Modified
No files shared here yet.

Snap Pack History

Release

Snap Pack Version 

Type

Updates

1.0.0

1-001.0

Latest

Initial release (May 2020)


See Also


  • No labels