SharpSync
  • Welcome
  • Fundamentals
    • Getting Started
      • Registration
      • Landing Page
      • Support
      • Subscription
    • Data Sources
    • Property Mappings
      • Adding Property Mapping
      • Property Mapping Settings
    • Rules
      • Import / Export
        • Append text
        • Calculate number
        • Export manipulation
        • Format as decimal number
        • Prepend text
        • Remove property
        • Replace all instances
        • Replace first instance
        • Round to nearest X
        • Select from JSON
        • Set cell value
        • Set empty cells
        • Text manipulation
      • Display
        • Number between
        • Text contains
        • Text ends with
        • Text evaluation
        • Text is a number
        • Text is exactly
        • Text is in list
        • Text is not a number
        • Text is not empty
        • Text is not in list
        • Text length between
        • Text length is exactly
        • Text maximum length
        • Text minimum length
        • Text not contains
        • Text not ends with
        • Text not starts with
        • Text starts with
      • Advanced Scripting
    • BOM Comparison
    • Data Safety
    • Troubleshooting
      • Duplicate component paths
      • OAuth 2.0
  • Data Sources
    • Autodesk Inventor
    • CSV
      • Getting Started
      • Importing a Bill of Materials (BOM)
    • MS Dynamics 365 Business Central
      • Getting Started
      • Item Fields Json & Internal Names
      • Resource Fields Json & Internal Names
      • List Names For nestedObject Mappings
    • NetSuite
      • OAuth Setup
        • Permissions
      • RESTlet Script Setup
        • SharpSync RESTlet Script
      • Thumbnail Folder Setup
      • Authentication + Configuration
      • Common setup
        • Configure quantity mapping
        • Configure accounts mappings
        • Configure itemType mapping
        • Configure isPhantom mapping
        • Configure subsidiary mapping
        • Configure price mapping
        • Configure Where Used Link mapping
        • Configure thumbnail mapping
        • Read-Only NetSuite Fields
        • Common Mapping Rules
        • Common List names
      • Advanced Bill of Materials
      • Configure Routings
      • Integration tips
      • Troubleshooting
    • Odoo
      • Getting Started
        • Authentication + Configuration
        • Debugging tips
      • Common Setup
        • Map BOM Codes
        • Map BOM Types
        • Map Attribute Values
          • Reading Attributes - Overview
          • Display All Attribute Names
          • Display Single Attribute Values
          • Writing attributes
      • Product Management
      • Hosting Options
      • List Names
      • Permissions
      • Troubleshooting
    • Onshape
      • Getting Started
      • Setting up Derivatives
    • Propel PLM
      • Getting Started
    • SolidWorks
    • SolidWorks PDM
      • Downloading and installing the add-in
      • Configure the add-in
      • Setting up the Solidworks PDM Web 2
      • Troubleshooting
      • Submitting a BOM for update
  • Advanced
    • Derivatives
  • User management
    • User Management
    • Application Permissions
Powered by GitBook
On this page
  • Onshape Setup
  • Onshape App Store Subscription
  • Setting up Onshape Data Source in SharpSync
  • Mapping values to ERP
  • Export Assembly or Part from Onshape
  • Troubleshooting
  1. Data Sources
  2. Onshape

Getting Started

PreviousOnshapeNextSetting up Derivatives

Last updated 2 months ago

Onshape Setup

  • Setting up Onshape

  • Configure the authentication options

  • Mapping values to ERP

  • Export Assembly or Part from Onshape

  • Troubleshooting

Note: Onshape integration for SharpSync is not currently supported for free versions. For SharpSync to work, you need to create custom properties in a company in Onshape. This is only possible with the Professional or Enterprise versions of Onshape. This is a limitation of Onshape.

Onshape App Store Subscription

  • For Onshape Enterprise users, make sure to add the related Onshape users to the list of users that have permission to access the Onhsape App Store

Setting up Onshape Data Source in SharpSync

  • In the Navigation Bar, select Data Sources

  • On the right (in Data Sources), select OnShape as the Data Source and click ADD DATASOURCE

  • Change the Server URL to:

https://cad.onshape.com
  • Scroll to the bottom of the page and click UPDATE

  • Change the Authentication Type to OAuth2

  • Click AUTHENTICATE. If the configuration is successful, the Authentication Status will update and show Connected.

  • Configure the Primary and Secondary Identifiers as follows:

    • Primary Identifier: partNumber

    • Secondary Identifier: name

After successfully authenticating with OnShape, the update should automatically trigger. If it does not, click the Update button.

The custom fields from OnShape have now successfully been pulled into SharpSync.

Please make sure to set up your Secondary Data Source. For more information, refer to the other Data Sources listed in the Navigation Bar.

Configure the authentication options

  • Click CONFIGURE

  • Choose one of the two paths below depending on your version of our product:

Base API path

The Base API we use to connect

  • Leave the default link to the OnShape instance as-is:

https://cad.onshape.com/api

Authentication Types (see below**)

The type of authentication method to use when authenticating with OnShape.

We only support:

OAuth 2.0

  • Select OAuth 2.0

Once you have selected the Authentication Type, the remainder of the form should autocomplete to the following:

  • Click SAVE to save and close the form

Base API path

The Base API we use to connect

  • Fill in the values for your enterprise name. This means that, in the url, instead of

https://cad.onshape.com/api

you will have

https://{enterpriseName}.onshape.com/api 

Authentication Types (see below**)

The type of authentication method to use when authenticating with OnShape.

We only support:

OAuth 2.0

  • Select OAuth 2.0

Once you have selected the Authentication Type, the remainder of the form should autocomplete to the following:

  • Click SAVE to save and close the form

Please make sure to set up your Secondary Source. For more information, refer to the other Data Sources listed in the Navigation Bar.

Mapping values to ERP

Mapping the URL to a field in the ERP

Onshape is an online Data Source, so you can map the URL of the document to a field in the ERP.

To map an Onshape document URL to a property in the ERP do the following:

  • Create a new property mapping

  • Onshape property: (Unmapped)

  • ERP property: {nameOfField} e.g. document_url

  • Rendering Type: URL

  • Create a new rule: Text manipulation

  • Rule value: return rowData.primaryViewHref;

  • Click Save

  • Reload the BOM to display in the BOM Comparison screen

  • Click Submit to update

Export Assembly or Part from Onshape

  • You can export a BOM from Onshape to SharpSync through the following methods:

    • The Onshape Tree Structure Assembly Context Menu

    • The Onshape Assembly Tab Context Menu

    • The Onshape Part Studio Tab Part Context Menu

Troubleshooting

Could not find data source

The following response in the network tab with a 400 status code

Request Method: GET
Status Code: 400 Bad Request

Could not add file lookup to the server
{"message":"Invalid id specified or bad request"}

OR

{"message":"Could not find datasource for organization {uuid} and module Onshape","data":[]}

You are trying to sync to an organization in SharpSync that has not yet been created.

Cannot get properties

The following response in the network tab with a 500 status code

Request Method: GET
Status Code: 502 Bad Gateway

{
    "message": "Could not find the Onshape company that the user belongs to when loading the BOM"
}

This means that you're attempting to use SharpSync with a free version. Free versions are currently not supported due to a limitation in Onshape that you cannot create custom properties (True at the time of writing this)

Cannot pull Onshape BOM

The following response in the network tab with a 502 status code

{
    "message": "Could not pull the bom from Onshape - request was Forbidden. Check that the document hostname/origin matches the datasource server hostname"
}

Let's say the enterprise name is starkindustries.onshape.com .

Check:

  • The hostname is configured correctly in the datasource (e.g. cad.onshape.com vs starkindustries.onshape.com)

  • The oauth hostnames all match

    • For free version: oauth.onshape.com and NOT cad.onshape.com

    • For enterprise version starkindustries.onshape.com and NOT oauth.onshape.com

Find and subscribe to the OnShape app in the Onshape App Store

Once completed with the setup for both Primary and Secondary Data Sources, proceed to setup .

First, create the organization by following the setup steps in .

SharpSync.net
Property Mappings
Data Sources
Configure the authentication options
Onshape App Store Subscription
Configuration Settings
Configuration Settings
Image of configuration settings
Image of configuration settings