Custom Deal pipeline and dealstages not assigning to new Deals

SOLVE
Highlighted
Regular Contributor

Created a new Deal pipeline with 5 deal stages. When creating a new Deal via eCommerce Bridge API, Deal is creating with an empty pipeline, stage & some custom attributes as well.

 

provided internal-Ids of pipeline & stage.

{
    "storeId": "ecommercebridge-deviceb2b-store",
    "objectType": "DEAL",
    "messages": [
        {
            "action": "UPSERT",
            "changedAt": "1574786280000",
            "externalObjectId": "orderID3",
            "properties": {
                "pipeline": "1234718",
                "stage": "1234720",
                "name": "Order 3",
                "company_name": "Company 3",
                "sap_order_number": "orderID3",
                "createdate": "1574786280000"
            },
            "associations": {
                "CONTACT": [
                    "ecomm@test.com"
                ]
            }
        }
    ]
}

Other than the name, field no other fields are updating.   

 

Screen Shot 2019-12-03 at 3.58.35 pm.pngecommerce.png

Any help will be greatly appreciated.

 

Thanks,

Mahesh.S

 

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
Community Manager

Hi @Mahesh1250,

 

No worries at all Smiley Happy

If you'd like to set your own deal stage internal id, I'd suggest for you to use this endpoint - Update an existing pipeline.

 

One thing to take note when using this endpoint is that, this update wouldn't append the stage to the existing deal stages. It would override existing deal stages hence I'd advise for you to indicate all the deal stages. Something like this:

 

{
  "label": "Ecommerce Pipeline",
  "active": true,
  "displayOrder": 10,
 "stages": [
    {
      "stageId": "checkout_abandoned",
      "label": "Checkout Abandoned",
      "displayOrder": 0,
      "metadata": {
        "isClosed": "false",
         "probability": 0.1
      },
      "active": true
    },
    {
      "stageId": "checkout_pending",
      "label": "Checkout Pending",
      "displayOrder": 1,
      "metadata": {
        "isClosed": "false",
         "probability": 0.5
      },
      "active": true
    },
    {
      "stageId": "checkout_completed",
      "label": "Checkout Completed",
      "displayOrder": 2,
      "metadata": {
        "isClosed": "false",
         "probability": 0.9
      },
      "active": true
    },
    {
      "stageId": "Processed",
      "label": "processed",
      "displayOrder": 3,
      "metadata": {
        "isClosed": "true",
         "probability": 1
      },
      "active": true
    },
    {
      "stageId": "shipped",
      "label": "Shipped",
      "displayOrder": 4,
      "metadata": {
        "isClosed": "true",
         "probability": 1
      },
      "active": true
    },
    {
      "stageId": "cancelled",
      "label": "Cancelled",
      "displayOrder": 5,
      "metadata": {
        "isClosed": "false",
         "probability": 0
      },
      "active": true
    },
    {
      "stageId": "my_created_stage",
      "label": "Test deal stage",
      "displayOrder": 6,
      "metadata": {
        "isClosed": "false",
         "probability": 0
      },
      "active": true
    }
  ]
}

 

The deal stage id is the stageId and label is the deal stage name you see on the interface. 

3 Replies 3
Community Manager

Hi @Mahesh1250,

 

I'm happy to help, but please do not share full authentication credentials on this public forum. If you post a HubSpot API key or OAuth access or refresh token on the Community, it should be considered compromised and should be deactivated immediately.

 

I've taken the liberty of obscuring the "hapikey" you shared. For your security, please also deactivate and generate a new HAPIkey.

 

With that said, let's now walk through the issue:

1. All deals created through the Ecommerce Bridge API would be under the Ecommerce Pipeline and hence it is not possible for you to define your own pipeline. Additionally, the deal stage set must be a deal stage that is a part of the Ecommerce pipeline.

 

If you try passing:

"stage": "processed",

which is a stage in the Ecommerce Pipeline, you should see the deal stage and the pipeline populated out just fine - Refer to the test deal (HSTEST) that I created via the Ecommerce Bridge API

 

2. Also, when using this endpoint Get ecommerce settings v2 to get your ecommerce settings, I'm not seeing property company_name and sap_order_number being defining under deal properties. If you'd like to create deal with these two properties, you would need to create/update the ecommerce settings .

Regular Contributor

Hi @WendyGoh,

 

Sorry about that for sharing the trail account hapiKey without masking(forgot it). Thanks for raising, reset now & generated new hapikey.  

 

1. Hence it is not possible for you to define your own pipeline. - Thanks for letting me know this... This changes my way of thinking...

2. Can we create a new deal stage for Ecommerce Pipeline, if yes - I tried creating from HS dashboard and it's generated a random internalId instead of creating like internalId as partially_shipped

 

Screen Shot 2019-12-04 at 3.23.33 pm.png

 

As we automate Deals based on dealstages, we need internalId's be like shipping, cancelled etc... Please suggest me if there is any way of setting stage internalId as the stage name format.

 

Thanks,

Mahesh.S

Reply
0 Upvotes
Community Manager

Hi @Mahesh1250,

 

No worries at all Smiley Happy

If you'd like to set your own deal stage internal id, I'd suggest for you to use this endpoint - Update an existing pipeline.

 

One thing to take note when using this endpoint is that, this update wouldn't append the stage to the existing deal stages. It would override existing deal stages hence I'd advise for you to indicate all the deal stages. Something like this:

 

{
  "label": "Ecommerce Pipeline",
  "active": true,
  "displayOrder": 10,
 "stages": [
    {
      "stageId": "checkout_abandoned",
      "label": "Checkout Abandoned",
      "displayOrder": 0,
      "metadata": {
        "isClosed": "false",
         "probability": 0.1
      },
      "active": true
    },
    {
      "stageId": "checkout_pending",
      "label": "Checkout Pending",
      "displayOrder": 1,
      "metadata": {
        "isClosed": "false",
         "probability": 0.5
      },
      "active": true
    },
    {
      "stageId": "checkout_completed",
      "label": "Checkout Completed",
      "displayOrder": 2,
      "metadata": {
        "isClosed": "false",
         "probability": 0.9
      },
      "active": true
    },
    {
      "stageId": "Processed",
      "label": "processed",
      "displayOrder": 3,
      "metadata": {
        "isClosed": "true",
         "probability": 1
      },
      "active": true
    },
    {
      "stageId": "shipped",
      "label": "Shipped",
      "displayOrder": 4,
      "metadata": {
        "isClosed": "true",
         "probability": 1
      },
      "active": true
    },
    {
      "stageId": "cancelled",
      "label": "Cancelled",
      "displayOrder": 5,
      "metadata": {
        "isClosed": "false",
         "probability": 0
      },
      "active": true
    },
    {
      "stageId": "my_created_stage",
      "label": "Test deal stage",
      "displayOrder": 6,
      "metadata": {
        "isClosed": "false",
         "probability": 0
      },
      "active": true
    }
  ]
}

 

The deal stage id is the stageId and label is the deal stage name you see on the interface.