Pipeline_ID and stage_ID fields won't update

Hi !

I'm having some difficulties to post my Pipeline_ID and Stage_ID with the API

When I post an Opportunity, every fields are created well but those two take a "null" as value...

I did a get on https://api.insight.ly/v2.2/Opportunities and retrieve the good ID but it won't work

Any idea of what I'm missing ?

Thank you,

Regards,

Angelo

1

Comments

18 comments
  • Official comment

    Hi Angelo,

    These fields are recognized by the API so this should work. Be sure you are using the PIPELINE_ID and STAGE_ID as numeric values (not the text description). If you are still having trouble, please submit a support ticket, and I'll be glad to work with you to resolve this.

    Brian McConnell

    Insightly Engineering Team

    Comment actions Permalink
  • Hi Erich,

    It seems this endpoint is not working correctly, my apologies. I will make sure this gets fixed and update here once the issue has been resolved.

    Thank you

    Bart

    1
    Comment actions Permalink
  • As a temporary workaround, you can also use this endpoint in v3.0, since that one does seem to be working.

    The correct syntax is simply

    {
      "STAGE_ID": <New Stage ID>
    }

    I will also make sure the documentation gets updated to reflect this.

    Thanks,

    Bart

    1
    Comment actions Permalink
  • Hi Angelo, did you ever resolve this issue. I'm also having the same problem. PIPELINE_ID and STAGE_ID are being sent with the POST request as integers, but the resulting object has nil for both values. 

    0
    Comment actions Permalink
  • Hi Andrew,

    As you can see, I've been waiting for an answer for more than 30 days (and I had exchanges by mail too !), so I decided to move on Podio, the support is more reactive and it's far more easier with their API.

    Hope you will find an answer.

    Angelo

    0
    Comment actions Permalink
  • Hi Angelo,

    I'm sorry you're still having trouble. I show one of our engineers (Brian) responded above and suggested you open a ticket with our support team if you continued to have trouble. I wasn't able to find a support ticket created under the email address you're using for the Community.

    We would love to help. 

    0
    Comment actions Permalink
  • Hi Andrew,

    Just to confirm are you using the PIPELINE_ID and STAGE_ID as numeric values?

    0
    Comment actions Permalink
  • Hi Angelo & Andrew,

    Since Pipeline and Stage changes may require include Activity Set configurations we added two new endpoints that you should use to set the Pipeline and/or Stage for an Opportunity or Project. These fields are read-only when you PUT/POST to /Opportunities or /Projects. It's currently documented in the Body Schema of Opportunity and Project but we'll add some clarification to the description of the endpoints to avoid confusion.

    https://api.insight.ly/v2.2/Help#!/Opportunities/UpdatePipeline

    https://api.insight.ly/v2.2/Help#!/Opportunities/UpdatePipelineStage

    Best Regards,

    Patrick

     

    0
    Comment actions Permalink
  • Thanks for the updates. 

    Patrick, this looks promising. Do you know when API v2.2 will move out of beta? 

    Many thanks 

    0
    Comment actions Permalink
  • Hi Andrew,

    We're working on some core system changes that we want to incorporate before moving it out of beta. Contract wise the API changes will be minimal at this point. We cannot promise any timelines but we should have the majority of the work done within Q2.

    Best Regards,

    Patrick

    0
    Comment actions Permalink
  • Can you please clarify how to use the API correctly or work around this issue? I have the same problem: PIPELINE_ID and STAGE_ID appear null. I'm using Zapier "run Python" action. Below is my code (authorization removed):

    payload = "{\"PROJECT_NAME\": \"TEST-0003 Fulfillment\",\"STATUS\": \"IN PROGRESS\",\"PROJECT_DETAILS\": \"Customer specific info goes here\",\"OPPORTUNITY_ID\": null,\"STARTED_DATE\": null,\"COMPLETED_DATE\": null,\"IMAGE_URL\": null,\"RESPONSIBLE_USER_ID\": 978980,\"OWNER_USER_ID\": 978980,\"CATEGORY_ID\": 4029913,\"PIPELINE_ID\": 285261,\"STAGE_ID\": 914651,\"VISIBLE_TO\": \"EVERYONE\",\"VISIBLE_TEAM_ID\": null,\"VISIBLE_USER_IDS\": null,\"CUSTOMFIELDS\": [],\"TAGS\": [],\"LINKS\": []}"

    headers = {
    'authorization': "Basic <removed>",
    'cache-control': "no-cache",
    'postman-token': "b95fb477-3cd1-e85f-c3dd-be91f588733f"}

    url = 'https://api.insight.ly/v2.2/Projects/'

    # let's make the actual API call...
    response = requests.post(url, payload, headers=headers)
    response.raise_for_status() # optional but good practice in case the call fails!

    # ..and let's return the JSON for use in the next step
    return response.json()
    0
    Comment actions Permalink
  • Re: my comment on Aug 6, I figured it out. My code is below for others who may run into this.

    # References
    # https://api.insight.ly/v2.2/Help#!/Projects/UpdatePipeline
    # https://api.insight.ly/v2.2/Help#!/Projects/UpdatePipelineStage
    payload = "{\"PIPELINE_ID\": " + input.get('pipelineId') + ",\"PIPELINE_STAGE_CHANGE\": {\"STAGE_ID\": " + input.get('pipelineStageId') + ",\"ACTIVITYSET_ASSIGNMENT\": {\"ACTIVITYSET_ID\": " + input.get('activitySetId') + ",\"START_DATE\": \"" + input.get('startDate') + "\",\"ACTIVITY_ASSIGNMENTS\": []}}}"

    # authorization API key from https://dittoform.insight.ly/users/usersettings
    # Base64 encoded
    # Using Postman for testing - token probably isn't necessary but I kept it
    headers = {
    'authorization': "Basic <removed>",
    'cache-control': "no-cache",
    'postman-token': "b95fb477-3cd1-e85f-c3dd-be91f588733f"}

    # pass the projectID to the URL
    url = 'https://api.insight.ly/v2.2/Projects/' + input.get('projectId') + '/Pipeline'

    # let's make the actual API call...
    response = requests.put(url, payload, headers=headers)
    response.raise_for_status()
    # optional but good practice in case the call fails!

    # ..and let's return the JSON for use in the next step
    return response.json()
    0
    Comment actions Permalink
  • @Mary Flynn you lead in the right direction to test this out using postman instead of within my application (built off the example on github). 

    But frankly, Insightly's main problem is that their api documentation is totally inaccurate & misleading.  All values in the body schema for the UpdatePipeline PUT call (Opportunities/{id}/Pipeline) are labeled as "optional", which is kind of misleading.  In reality, the only optional fields are End Date for ActivitySet_Assignment and either Responsible_User_Id/Assigned_Team_Id for Activity_Assignments.  Although, some of the field requirements may be due to the required activities I linked to specific stages of the pipeline.

    I promise to add better logging in my application for your api responses, if you promise to correct your api documentation.  :D

    @Patrick Stjernvall, deal?

    0
    Comment actions Permalink
  • Hi,

    I am having another issue regarding Pipeline ID, Category ID and Opportunity reasons. I need al ID numbers for each of the aforementioned data sets, so I can configure a Zap.

    Zapier only shows the ID number but I have no clue which pipeline stage that is.

    Can I check the ID in settings or somewhere else?

     

    Thank you.

    0
    Comment actions Permalink
  • Insightly Team, please give me an answer, because we want to move forward with our workflow and we need this information.

     

    Thank you for your help.

    0
    Comment actions Permalink
  • Hi Beno,

    You can use the "PipelineStages" endpoint of the API to get a list of pipeline stages which includes IDs and Titles. For more information, see here:

    https://api.insight.ly/v2.3/Help#!/PipelineStages/GetPipelineStages

    Let us know if you have further questions.

    0
    Comment actions Permalink
  • I am having a similar issue with v3.1. I try to update the Pipeline Stage with the following request:

    PUT https://api.insightly.com/v3.1/Projects/<Project ID>/PipelineStage

    I have tried several combinations for the payload including (but not limited to):

    {
        "PIPELINE_ID": <Project Pipeline ID>,
        "PIPELINE_STAGE_CHANGE": {
            "STAGE_ID": <New Stage ID>
        }
    }

    {
        "PIPELINE_ID": <Project Pipeline ID>,
        "STAGE_ID": <New Stage ID>
    }

    {
        "PIPELINE_ID": <Project Pipeline ID>,
        "PIPELINE_STAGE_CHANGE": {
            "STAGE_ID": <New Stage ID>,
            "ACTIVITY_SET_ASSIGNMENT": null
        }
    }

    I have also added incorrect parameters, but, no matter what I do, the response is always a 200 with the project details as the body (and no change to the Stage ID).

    Thanks,

    Erich

     

    0
    Comment actions Permalink
  • Hi,

    I am also having the same issue.  I've read through the thread and I've tried several of the API versions.

    {
    "OPPORTUNITY_ID":99999999,
    "OPPORTUNITY_NAME":"myUpdatedOpportunity 0851",
    "STAGE_ID":999999,
    "OPPORTUNITY_STATE":"Open",
    "PROBABILITY":31
    }

    I made a PUT request to https://api.insightly.com/vX.x/Opportunities/

    I confirmed that the Id values are correct.  I also manually changed them in the account and retrieved values known to work for a given opportunity.    I've tried API v3.1, 3.0, 2.2, 2.1

    0
    Comment actions Permalink

Please sign in to leave a comment.