Our new Tubular update enables users to create advanced deals using tubular api. More info on the api is on our developer portal: https://developer.tubular.io

If you want to create advanced deals using tubular API, follow these steps:

  1. Copy the developer API key from Integration Tab in settings. (If you already have your key you can disregard this step)
  2. 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.
  3. Use your API key as an 'Authorization' header in your 'POST' http request

Fields used in 'addAdvancedDeal' mutation are:

  1. 'name': Name of you deal (required value). Ex: 'Sample Deal'
  2. '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
  3. 'clientId': Id of the client to whom the deal is assigned to (required value): Ex: (ID: 120)
  4. '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.
  5. 'description': Description of the deal (Optional)
  6. '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'
  7. '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
{
  "input": {
    "name": "Resolvment",
    "products": [
      {
        "product": "90FJ",
        "quantity": 90,
        "price": 90.99
      },
      {
        "product": "0291238123",
        "quantity": 12,
        "price": 82.22
      },
      {
        "product": "9SIK28",
        "quantity": 20,
        "price": 98.99
      }
    ],
    "statusCode": 2,
    "clientId": 168,
    "currency": "EUR",
    "expectedCloseDate": "2017-12-31",
    "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

Did this answer your question?