# DealHub

> Read DealHub quotes, users, versions and product pricing.

App · 19 actions. Web page: https://docs.lodol.com/docs/integrations/dealhub

## Actions

### Find products by SKU

Find products by SKU.

**Inputs**

- Version (`version_id`, text): ID of the version. If omitted, the active version is used.
- Pricing option (`pricing_option`, text): Specifies which price to return for SKUs with multiple fixed prices. One of: `MIN`, `MAX`, `FIRST`.
- SKU (`sku`, list, required): List of SKUs to retrieve.

**Outputs**

- `data` (object): The response from DealHub.

**Example output**

```json
{
  "data": {
    "info": {
      "compared_with_version_id": "example",
      "error": "example",
      "limit": "example",
      "more_results_matching_the_request": true,
      "offset": "example",
      "version_id": "example",
      "version_status": "example"
    },
    "products": [
      {
        "attributes": [
          {}
        ],
        "bundle_items": [
          "example"
        ],
        "description": "example",
        "name": "example",
        "price": {},
        "sku": "example",
        "type": "example"
      }
    ]
  }
}
```

### Get CPQ version

Get CPQ version.

**Inputs**

- Version (`version_id`, text, required): The unique identifier of the version.

**Outputs**

- `data` (object): The response from DealHub.

**Example output**

```json
{
  "data": {
    "comment": "example",
    "name": "example",
    "status": "example",
    "version_id": "example"
  }
}
```

### Get CPQ version by name

Get CPQ version by name.

**Inputs**

- Version name (`version_name`, text, required): The name of the version.

**Outputs**

- `data` (object): The response from DealHub.

**Example output**

```json
{
  "data": {
    "comment": "example",
    "name": "example",
    "status": "example",
    "version_id": "example"
  }
}
```

### Get CRM import details

Get CRM import details.

**Inputs**

- Request ID (`request_id`, text): ID of the import request. If omitted, the tenant's most-recent import is returned.

**Outputs**

- `data` (object): The response from DealHub.

**Example output**

```json
{
  "data": {
    "accounts": [
      {
        "contacts": [
          {}
        ],
        "crm_id": "example",
        "reason": "example",
        "state": "example"
      }
    ],
    "failed": 1,
    "failures": [
      {
        "crm_id": "example",
        "reason": "example"
      }
    ],
    "processed": 1,
    "request_id": "example",
    "skipped": 1,
    "status": "example",
    "succeeded": 1,
    "total": 1
  }
}
```

### Get CRM import status

Get CRM import status.

**Inputs**

- Request ID (`request_id`, text): ID of the import request. If omitted, the tenant's most-recent import is returned.

**Outputs**

- `data` (object): The response from DealHub.

**Example output**

```json
{
  "data": {
    "failed": 1,
    "failures": [
      {
        "crm_id": "example",
        "reason": "example"
      }
    ],
    "processed": 1,
    "request_id": "example",
    "skipped": 1,
    "status": "example",
    "succeeded": 1,
    "total": 1
  }
}
```

### Get playbook data

Get playbook data.

**Inputs**

- Version name (`version_name`, text, required): Version name.
- Playbook ID (`playbook_id`, text, required): Playbook name (not the Playbook display name).

**Outputs**

- `data` (object): The response from DealHub.

**Example output**

```json
{
  "data": {
    "playbook_data": [
      {
        "group_external_object": "example",
        "group_id": "example",
        "group_name": "example",
        "group_type": "example",
        "question_data": [
          {}
        ]
      }
    ],
    "playbook_metadata": {
      "display": "example",
      "document_type": [
        "example"
      ],
      "enable_partner_support": true,
      "geo_factors_settings": true,
      "name": "example",
      "present_proposal_summary": true,
      "sync_docs_settings": {
        "based_on": "example",
        "enabled": "example"
      },
      "sync_products_settings": {
        "based_on": "example",
        "enabled": "example"
      }
    }
  }
}
```

### Get product catalog

Get product catalog.

**Inputs**

- Version (`version_id`, text, required): The unique identifier of the Version.
- SKU (`sku`, list): One or more product SKUs to filter the result. Can be used multiple times (e.g., ?sku=SKU001&sku=SKU002).
- Offset (`offset`, number): The number of products to skip for pagination.
- Limit (`limit`, number): The maximum number of products to return.

**Outputs**

- `data` (object): The response from DealHub.

**Example output**

```json
{
  "data": {
    "bundles": [
      {
        "bundle_items": [
          {}
        ],
        "bundle_type": "example",
        "description": "example",
        "name": "example",
        "price_in_bundle_is_zero": true,
        "primary_tag": "example",
        "product_assignments": [
          {}
        ],
        "product_attributes": {},
        "product_conditional_names": [
          {}
        ],
        "product_pricing": {
          "advanced": true,
          "pricing_rules": [
            {}
          ]
        },
        "sku": "example",
        "sync_bundle_price": true,
        "sync_to_crm": true,
        "tags": [
          "example"
        ]
      }
    ],
    "info": {
      "compared_with_version_id": "example",
      "error": "example",
      "limit": "example",
      "more_results_matching_the_request": true,
      "offset": "example",
      "version_id": "example",
      "version_status": "example"
    },
    "products": [
      {
        "description": "example",
        "merge_products": true,
        "name": "example",
        "primary_tag": "example",
        "product_assignments": [
          {}
        ],
        "product_attributes": {},
        "product_conditional_names": [
          {}
        ],
        "product_pricing": {
          "advanced": true,
          "pricing_rules": [
            {}
          ]
        },
        "sku": "example",
        "tags": [
          "example"
        ]
      }
    ]
  }
}
```

### Get product prices

Get product prices.

**Inputs**

- Currency (`currency`, text, required): The currency ISO code to base the pricing on.
- Geo (`geo`, text, required): The geographic region to be used for the pricing calculation.
- Version (`version`, text): The version name to retrieve the parameters for. If not provided, the system will use the active version.
- Playbook (`playbook`, text): The playbook name in case multiple playbooks exist.
- SKUS (`skus`, list, required): Skus.

**Outputs**

- `data` (object): The response from DealHub.

**Example output**

```json
{
  "data": {
    "currency": "example",
    "playbook": "example",
    "skus": [
      {
        "error": "example",
        "id": "example",
        "price": 1,
        "sku": "example"
      }
    ],
    "version": "example"
  }
}
```

### Get product pricing parameters

Get product pricing parameters.

**Inputs**

- Currency (`currency`, text, required): The currency ISO code to evaluate the rules upon.
- Geo (`geo`, text, required): The geography to be used for the pricing calculation.
- Version (`version`, text): The version name to retrieve the parameters for. If not provided, the system will use the active version.
- Playbook (`playbook`, text): The playbook name (not display name) in case there is more than one playbook.
- SKUS (`skus`, list, required): The list of SKUs to evaluate.

**Outputs**

- `data` (object): The response from DealHub.

**Example output**

```json
{
  "data": {
    "skus": [
      {
        "parameters_for": {
          "parameters": [
            {}
          ],
          "product_factors": [
            {}
          ]
        },
        "sku": "example"
      }
    ]
  }
}
```

### Get quote

Get quote.

**Inputs**

- Quote (`quote_id`, text, required): The unique identifier for the quote in DealHub.
- Feature (`feature`, list): Specify which parts of the quote data to retrieve. This parameter can be used multiple times. Valid options are: * info * summary * deal_room_info * line_items * answers * approvals * all. One or more of: `info`, `summary`, `deal_room_info` (Deal room info), `line_items` (Line items), `answers`, `approvals`, `all`.
- External identifier flag (`external_identifier_flag`, true/false): If true, the quote_id in the path refers to the external_quote_id from the CRM.

**Outputs**

- `data` (object): The response from DealHub.

**Example output**

```json
{
  "data": {
    "answers": [
      {
        "answer": "example",
        "group_id": "example",
        "group_name": "example",
        "question": "example",
        "question_id": "example",
        "system_id": "example",
        "system_name": "example"
      }
    ],
    "approvals": [
      {
        "impersonated_by": "example",
        "reason": "example",
        "review_date": "example",
        "reviewer": "example",
        "reviewer_comment": "example",
        "status": "example",
        "step": 1
      }
    ],
    "deal_room_info": {
      "url": "example"
    },
    "dealhub_quote_id": "example",
    "info": {
      "account_name": "example",
      "contact_email": "example",
      "contact_name": "example",
      "created_by": "example",
      "creation_date": "example",
      "currency": "example",
      "customer_id": "example",
      "dealhub_opportunity_id": "example",
      "dealhub_quote_name": "example",
      "dealhub_quote_number": "example",
      "duplicate_from_quote": "example",
      "expiration_date": "example",
      "external_customer_id": "example",
      "external_opportunity_id": "example",
      "external_quote_id": "example",
      "geo_code": "example",
      "playbook": "example",
      "primary_quote": true,
      "quote_url": "example",
      "submission_date": "example",
      "submitted_by": "example",
      "version_id": "example",
      "won_date": "example"
    },
    "line_items": [
      {
        "attributes": {},
        "bundle_ref": "example",
        "group_name": "example",
        "id": "example",
        "list_price": 1,
        "msrp": 1,
        "msrp_discount": 1,
        "name": "example",
        "net_per_unit": 1,
        "net_price": 1,
        "ordinal": 1,
        "partner_discounts": [
          {}
        ],
        "primary_tag": "example",
        "product_factors": {},
        "sales_discount": 1,
        "sku": "example",
        "system_id": "example",
        "system_name": "example",
        "system_ordinal": 1,
        "total_discount": 1,
        "user_discount": 1,
        "user_price": 1
      }
    ],
    "quote_upgrade_required": true,
    "status": "example",
    "summary": {
      "currency": "example",
      "sales_discount": 1,
      "total_discount": 1,
      "total_list_price": 1,
      "total_net_price": 1
    }
  }
}
```

### Get quote template

Get quote template.

**Inputs**

- Version (`version_id`, text, required): Version name.
- Playbook ID (`playbook_id`, text, required): Playbook name (not the Playbook display name).

**Outputs**

- `data` (object): The response from DealHub.

**Example output**

```json
{
  "data": {
    "dealroom_publish_name": "example",
    "document_type": "example",
    "expiration_date": "example",
    "external_opportunity_id": "example",
    "line_item_details": "example",
    "line_items": [
      {
        "attributes": {},
        "bundle_ref_id": 1,
        "bundle_ref_sku": "example",
        "item_name": "example",
        "list_price": 1,
        "msrp": 1,
        "msrp_discount": 1,
        "net_price": 1,
        "net_price_per_unit": 1,
        "partner_program_data": [
          {}
        ],
        "product_factors": {},
        "sales_discount": 1,
        "sku": "example",
        "total_discount": 1
      }
    ],
    "partner_program": [
      {
        "partner_level_name": "example",
        "program_name": "example"
      }
    ],
    "playbook": "example",
    "quote_data": [
      {
        "group_id": "example",
        "questions": [
          {}
        ]
      }
    ],
    "quote_name": "example",
    "request_action": "example",
    "sign_externally_comment": "example",
    "timezone_offset": 1,
    "total_sales_discount": 1
  }
}
```

### Get user

Get user.

**Inputs**

- Dealhub user (`dealhub_user_id`, text, required): The unique DealHub ID of the user.

**Outputs**

- `data` (object): The response from DealHub.

**Example output**

```json
{
  "data": {
    "business_title": "example",
    "city": "example",
    "company": "example",
    "country": "example",
    "email": "example",
    "fax": "example",
    "id": "example",
    "is_active": true,
    "login": "example",
    "mobile": "example",
    "name": "example",
    "phone": "example",
    "position": "example",
    "postal_code": "example",
    "state": "example",
    "street": "example",
    "user_manager_login": "example"
  }
}
```

### Get user by login

Get user by login.

**Inputs**

- Login (`login`, text, required): The login name of the user.

**Outputs**

- `data` (object): The response from DealHub.

**Example output**

```json
{
  "data": {
    "business_title": "example",
    "city": "example",
    "company": "example",
    "country": "example",
    "email": "example",
    "fax": "example",
    "id": "example",
    "is_active": true,
    "login": "example",
    "mobile": "example",
    "name": "example",
    "phone": "example",
    "position": "example",
    "postal_code": "example",
    "state": "example",
    "street": "example",
    "user_manager_login": "example"
  }
}
```

### List CPQ versions

List CPQ versions.

**Inputs**

- Status (`status`, text): Search for Version(s) based on status. One of: `DRAFT`, `ACTIVE`, `DEACTIVATED`.

**Outputs**

- `data` (list): The response from DealHub.

**Example output**

```json
{
  "data": [
    {
      "comment": "example",
      "name": "example",
      "status": "example",
      "version_id": "example"
    }
  ]
}
```

### List DealRoom signers

List DealRoom signers.

**Inputs**

- Opportunity ID (`opportunity_id`, text, required): The ID of the CRM opportunity.

**Outputs**

- `data` (object): The response from DealHub.

**Example output**

```json
{
  "data": {
    "buyer_signers": [
      {
        "company_name": "example",
        "ordinal": 1,
        "signature_date": "example",
        "signee_name": "example",
        "signee_title": "example"
      }
    ],
    "dealroom_state": "example",
    "seller_signers": [
      {
        "company_name": "example",
        "ordinal": 1,
        "signature_date": "example",
        "signee_name": "example",
        "signee_title": "example"
      }
    ]
  }
}
```

### List products in version

List products in version.

**Inputs**

- Version (`version_id`, text, required): The unique identifier of the Version.
- Offset (`offset`, number): The number of products to skip for pagination. From 0 to 10000.
- Limit (`limit`, number): The maximum number of products to return. If the requested limit value exceeds the maximum allowed limit, the system will automatically cap the result set at the maximum limit. From 1 to 1000.
- Product option (`product_option`, text): Specify whether to fetch all products or only new/updated products. One of: `ALL`, `MODIFIED`.
- Pricing option (`pricing_option`, text): For products with multiple fixed prices, specifies which price to return (Minimum, Maximum, or First defined). One of: `MIN`, `MAX`, `FIRST`.

**Outputs**

- `data` (object): The response from DealHub.

**Example output**

```json
{
  "data": {
    "info": {
      "compared_with_version_id": "example",
      "error": "example",
      "limit": "example",
      "more_results_matching_the_request": true,
      "offset": "example",
      "version_id": "example",
      "version_status": "example"
    },
    "products": [
      {
        "attributes": [
          {}
        ],
        "bundle_items": [
          "example"
        ],
        "description": "example",
        "name": "example",
        "price": {},
        "sku": "example",
        "type": "example"
      }
    ]
  }
}
```

### List quotes

List quotes.

**Inputs**

- External opportunity ID (`external_opportunity_id`, text): Filter quotes associated with a specific CRM opportunity ID.
- Feature (`feature`, list): Specify which parts of the quote data to retrieve for each quote in the list. This parameter can be used multiple times. Valid options are: * info * summary * deal_room_info * line_items * answers * approvals * all. One or more of: `info`, `summary`, `deal_room_info` (Deal room info), `line_items` (Line items), `answers`, `approvals`, `all`.
- Offset (`offset`, number): The number of quotes to skip for pagination. From 0 to 10000.
- Limit (`limit`, number): The maximum number of quotes to return. From 1 to 50.

**Outputs**

- `data` (object): The response from DealHub.

**Example output**

```json
{
  "data": {
    "info": {
      "limit": "example",
      "more_results_matching_the_request": true,
      "offset": "example"
    },
    "quotes": [
      {
        "answers": [
          {}
        ],
        "approvals": [
          {}
        ],
        "deal_room_info": {
          "url": "example"
        },
        "dealhub_quote_id": "example",
        "info": {
          "account_name": "example",
          "contact_email": "example",
          "contact_name": "example",
          "created_by": "example",
          "creation_date": "example",
          "currency": "example",
          "customer_id": "example",
          "dealhub_opportunity_id": "example",
          "dealhub_quote_name": "example",
          "dealhub_quote_number": "example",
          "duplicate_from_quote": "example",
          "expiration_date": "example",
          "external_customer_id": "example",
          "external_opportunity_id": "example",
          "external_quote_id": "example",
          "geo_code": "example",
          "playbook": "example",
          "primary_quote": true,
          "quote_url": "example",
          "submission_date": "example",
          "submitted_by": "example",
          "version_id": "example",
          "won_date": "example"
        },
        "line_items": [
          {}
        ],
        "quote_upgrade_required": true,
        "status": "example",
        "summary": {
          "currency": "example",
          "sales_discount": 1,
          "total_discount": 1,
          "total_list_price": 1,
          "total_net_price": 1
        }
      }
    ]
  }
}
```

### List users

List users.

**Inputs**

- Status (`status`, text): Filter users by their active or inactive status. One of: `active`, `inactive`.

**Outputs**

- `data` (list): The response from DealHub.

**Example output**

```json
{
  "data": [
    {
      "business_title": "example",
      "city": "example",
      "company": "example",
      "country": "example",
      "email": "example",
      "fax": "example",
      "id": "example",
      "is_active": true,
      "login": "example",
      "mobile": "example",
      "name": "example",
      "phone": "example",
      "position": "example",
      "postal_code": "example",
      "state": "example",
      "street": "example",
      "user_manager_login": "example"
    }
  ]
}
```

### Resolve quote ID

Resolve quote ID.

**Inputs**

- Dealhub proposal ID (`dealhub_proposal_id`, text, required): The unique identifier of the proposal in DealHub.

**Outputs**

- `data` (object): The response from DealHub.

**Example output**

```json
{
  "data": {
    "dealhub_quote_id": "example"
  }
}
```
