I am trying to use the API to update a deal stage and move it into a new pipeline. I am getting the following error:
SAPI Sync Failure–{“responseCode”:422,“contentText”:{“errors”:[{“title”:“The provided stage is not part of the deals pipeline.”,“detail”:“”,“code”:“field_invalid”,“error”:“stage_is_not_part_of_pipeline”,“source”:{“pointer”:“/data/attributes/stage”}}]}}
Is it possible to move a deal into a stage in a different pipeline?
I was able to get it working. If anyone has the same issue, the group has to also be defined if the new stage is in a different pipeline.
And dates must be formatted in ISO. I used the following to format
payload.deal.fields.push({“customFieldId”:key,“fieldValue”:new Date(fieldData.key).toISOString
{
“deal”:
{
“stage”:13,
“group”:“2”,
“fields”:
[
{“customFieldId”:22,“fieldValue”:“Retail”},
{“customFieldId”:23,“fieldValue”:“Ground Up”},
{“customFieldId”:14,“fieldValue”:“Fixed Price”},
{“customFieldId”:31,“fieldValue”:“ROM”},
{“customFieldId”:17,“fieldValue”:“2024-02-03T14:28:20.000Z”}
]
}
}
2 Likes
Hi @ashtoncc!
Just wanted to drop you a quick note to say a big thank you for sharing the workaround that has worked for you. Great seeing your willingness to help others.