getCard( )
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
Retrieves a workflow card by ID.
The getCard()
function returns a Promise that resolves to the card
with the specified ID.
This function requires you to specify the ID of a card. To learn about retrieving IDs in the Workflow API, see Retrieving IDs.
Syntax
function getCard(cardId: string): Promise<Card>
getCard Parameters
NAME
TYPE
DESCRIPTION
ID of the card to retrieve.
Returns
Fulfilled - Retrieved card.
Return Type:
NAME
TYPE
DESCRIPTION
Unique card identifier.
Name of the card.
Source that created the card.
Some possible values:
"Contacts"
"Velo"
"Inbox"
"Invoices"
"Marketplace"
"Price Quotes"
"Wix Forms"
ID of the contact associated with the card.
Date the card was created.
Date the card was last updated.
ID of the phase which contains the card.
Was this helpful?
Get a card
1import { Permissions, webMethod } from 'wix-web-module';2import { workflows } from 'wix-crm-backend';34export const getCard = webMethod(Permissions.Anyone, (cardId) => {5 return workflows.getCard(cardId);6});78// Returns a promise that resolves to9// {10// "name": "Card Name",11// "id": "63c83c38-f504-4eb8-a48c-1d77c436a678",12// "contactId": "95bc7a80-5500-4445-9c90-adc0ff1b25ac",13// "phaseId": "15bc7a80-5500-4445-9c90-adc0ff1b25ac",14// "createdDate": "2019-05-05T12:23:43Z",15// "updatedDate": "2019-05-05T12:23:43Z",16// "source": "Inbox"17// }