Having issue with workflow extension definition update

DrakeZhao
Participant

The old defination is like:

 

const fieldMetadata = [
  {
    key: 'phoneNumbers',
    label: 'Phone Numbers',
    fieldType: 'TEXTAREA',
    required: true,
    values: [
      {
        allowsMergeTags: true,
        type: 'STATIC_VALUE'
      }
    ]
  },
  {
    key: 'sms',
    label: 'Message',
    fieldType: 'TEXTAREA',
    required: true,
    values: [
      {
        allowsMergeTags: true,
        type: 'STATIC_VALUE'
      }
    ]
  },
  {
    key: 'owner',
    label: 'Owner(Make sure the contact owner already authorized to RingCentral from integration install page)',
    fieldType: 'OWNER',
    required: true,
    values: [
      {
        allowsMergeTags: false,
        type: 'OBJECT_PROPERTY'
      }
    ]
  }
]

 

 

 

Try to add one more key like this:

 

const fieldMetadata = [
  {
    key: 'phoneNumbers',
    label: 'Phone Numbers',
    fieldType: 'TEXTAREA',
    required: true,
    values: [
      {
        allowsMergeTags: true,
        type: 'STATIC_VALUE'
      }
    ]
  },
  {
    key: 'sms',
    label: 'Message',
    fieldType: 'TEXTAREA',
    required: true,
    values: [
      {
        allowsMergeTags: true,
        type: 'STATIC_VALUE'
      }
    ]
  },
  {
    key: 'logSMS',
    label: 'Log SMS to contact timeline',
    fieldType: 'SELECT',
    required: true,
    values: [
      {
        type: 'STATIC_VALUE',
        allowsMergeTags: false,
        options: [
          {
            text: 'Yes',
            value: 'true'
          },
          {
            text: 'No',
            value: 'false'
          }
        ]
      }
    ]
  },
  {
    key: 'owner',
    label: 'Owner(Make sure the contact owner already authorized to RingCentral from integration install page)',
    fieldType: 'OWNER',
    required: true,
    values: [
      {
        allowsMergeTags: false,
        type: 'OBJECT_PROPERTY'
      }
    ]
  }
]

 

 

This will get an error says: 

 

status: 'error',
message: 'There was a problem with the request.',
correlationId: 'c07348ff-8230-4ef4-a059-fb9bf288583b'

 

 

However, if I only change some labels of old definition, update request would work, hope someone can help with this.

 

Thank you.

0 Upvotes
1 Accepted solution
rhenry
Solution
HubSpot Employee
HubSpot Employee

Hello @DrakeZhao , 

If you set the 'required' field to 'false' for the new field you are adding to the definition it will work . 
The system won't allow adding new 'required' fields to existing workflow definitions because this breaks backwards compatibility. We will update the API documentation to reflect this. 

Hope this helps, apologies for any inconvience. 

Rahmona Henry

View solution in original post

4 Replies 4
rhenry
Solution
HubSpot Employee
HubSpot Employee

Hello @DrakeZhao , 

If you set the 'required' field to 'false' for the new field you are adding to the definition it will work . 
The system won't allow adding new 'required' fields to existing workflow definitions because this breaks backwards compatibility. We will update the API documentation to reflect this. 

Hope this helps, apologies for any inconvience. 

Rahmona Henry
DrakeZhao
Participant

Thank you, this works!

webdew
Guide | Platinum Partner
Guide | Platinum Partner

Hi @DrakeZhao ,

Please use postman for the same and passed the parameters, because when we passed value through postman extension then its updated. Hope this will for you.

Hope this helps!


If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards.

0 Upvotes
DrakeZhao
Participant

Thank you for the quick response, I tried in postman, get same error message, another things is as I tested if use same defination to create new extension, it would work.

0 Upvotes