Importing and Updating Opportunities


When importing companies, you are presented with two options:  

  1. Create Opportunities
  2. Update Opportunities


When creating new opportunities, users can use any type of CSV they have and the headers can be of any kind. Once the user uploads the CSV file to the Spiro App, clicking on next gives a list of Spiro columns available for import. Spiro columns available for Opportunity import are: 

Field name Type / Special Notes
Opportunity Single line text. Required.
Company Company picker. Required.
Website  URL
Amount Currency
Sales Stage Single picklist
Close Date Date
Description Multiple line text
Priority Single picklist
Owner (User ID) User picker. Required.
External ID Single line text
Currency Single picklist

Additionally to these default Spiro fields, users will be able to load custom fields created on the Opportunity level as well as fields from Custom Section Entities on the Opportunity that was defined for their organization. Custom Fields will be identified by their field label. Fields from Custom Section Entities will have their entity name before the field label. For example, if your organization had a Custom Section Entity called “Additional Information” with a called "Number of offices", the column header should appear as "Additional Information Number of offices" on your data import file. 

When importing the opportunity, if the validations pass, the sections will be created as well.


Since Opportunity import has a lot of connections to other tables and a few other tables are referenced, there are some conventions that need to be followed in order to achieve a successful import: 

  • The "Company" field represents the company that the opportunity will be related to. In order to make this import easier, users can either type in the company name or the company ID in the CSV row. If the user types in the ID, import will add the opportunity to that Company. If the user types in the name, import will either find the company with that name and match it or create a new company with the name from the CSV row. 
  • Pipeline field represents the pipeline to which the opportunity will belong. The user is required to type in the Pipeline name or leave the field blank if he wants the opportunity to belong to the default pipeline.
  • Sales stage field represents the stage of the pipeline that the opportunity will belong to. The sales stage needs to be filled with the name of the sales stage, or leave blank in case the users want the stage to be the default stage of the default pipeline. If the user types in a pipeline name in the pipeline field, but does not type the sales stage, import will consider the input invalid and will move the opportunity to the default stage of the default pipeline. 
  • Priority field needs to be filled with numbers, not text. Available options are: 
    • High = 0
    • Medium = 1
    • Low = 2
    • Really Low = 3 
  • Close Date needs to be filled in in one of the following formats: 
    • %m/%d/%y - 12/20/20
    • %m/%d/%Y - 12/20/2020. Filling the date in any other format will be ignored, and opportunity close date will default to 1 month from the creation date
  • Currency field should be filled only in case that the user wants to change the currency of the Opportunity from the default one. The row should be filled with a 3 letter iso code for the currency (USD, EUR, GPB, JPY etc). Often this field is left empty. 


When updating opportunities, users cannot use any CSV they want, they must use CSV provided by Spiro. By provided by Spiro, this means that users can only use files that they got using the export feature. That is exactly how the update opportunities feature is set up. When users select Update Opportunities, they see a screen which contains a list of opportunities that they usually see by clicking on Opportunities Tab in Spiro. In this screen, users can filter opportunities they want to update. Once they are satisfied with the query results, they click export and Spiro Engine serves a file for them to download. The file has predefined column names and they should never be changed. All columns that are exported can be updated, except for the columns that in their name have (Read only) suffixed. 

Once the user opens the exported file, makes changes to the file and is satisfied with the changes, they upload the file to the Spiro Web Application. Notice how update opportunities does not have the mapping of fields part, because we assume that the user is using the file given by export feature and has not tempered with column names. Every change of column names will cause the field to be ignored during the update. Also, all columns added randomly will be ignored. 

When updating opportunities, there are some rules to follow regarding the pipelines and stages: 

  • In the pipeline field, users can type in the ID or the name of the pipeline, if they wish to change it. 
  • If the user changes the pipeline, but does not change the stage, the sales stage will change to the first stage in the new pipeline.
  • If the user changes the stage but leaves the pipeline blank, the import will fail.