If you want to create advanced deals using tubular API, follow these steps:
- Copy the developer API key from Integration Tab in settings. (If you already have your key you can disregard this step)
- Make a Graphql mutation request towards https://api.tubular.io. More info on graphql you can find on http://graphql.org/learn/. On using graphql on tubular please visit https://developer.tubular.io.
- Use your API key as an 'Authorization' header in your 'POST' http request
Fields used in 'addAdvancedDeal' mutation are:
- 'name': Name of you deal (required value). Ex: 'Sample Deal'
- 'products': List of all products your deal contains. A list of Product objects. Product objects contain three values: product (representing Product SKU), quantity and price. All of these values are required and the creation will fail if not all provided
- 'clientId': Id of the client to whom the deal is assigned to (required value): Ex: (ID: 120)
- 'statusCode': Status/Stage of your deal (Required value). Number from 0 to 4 representing the stages of your deal. 0 represents initial stage, 4 means deal has been won. If no value is sent, status code will default to 0.
- 'description': Description of the deal (Optional)
- 'expectedCloseDate': Expected close date of the deal. (Optional). If no value is sent expected close date will default to a month from date of creation. The format of the expected close date is: 'YY-mm-dd'
- 'currency': Currency that is used in the deal. (Optional). Multiple currencies are available in tubular. Please check all the values in tubular and you can set a specific currency. If no value is sent default company currency will be used
Sample of the data needed in this is as follows
"description": "Finishing agreed meet up pricing"
You can try and test this integration on our interactive editor
Through the method above you can create Advanced Deals using Tubular's great API
Find out more about the API