Search.../

updateCardFields( )

Deprecated. This function is being discontinued in the upcoming months. We are working to provide alternatives, and we'll provide timely updates before implementing any changes. We understand that this transition might present challenges, and we appreciate your patience and understanding.

Description

Updates an existing workflow card.

The updateCardFields() function returns a Promise that resolves when the card has been updated with the specified values.

contactId is not a required field, but if the parameter is not passed, the field will default to empty and the card will not be associated with any contact.

This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflow API, see Retrieving IDs.

Authorization

Request

This endpoint does not take any parameters

Response Object

Fulfilled - When the card has been updated.

Returns an empty object.

Status/Error Codes

Was this helpful?

Update a card

Copy Code
1import { Permissions, webMethod } from 'wix-web-module';
2import { workflows } from 'wix-crm-backend';
3
4export const updateCardFields = webMethod(Permissions.Anyone, (cardId, cardInfo) => {
5 return workflows.updateCardFields(
6 cardId,
7 {
8 "name": "New Name",
9 "contactId": "faad351b-fe07-4541-9157-358eba98b635"
10 }
11 );
12});
13
14// Returns a promise that resolves to void