Search.../

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
cardId
string

ID of the card to retrieve.

Returns

Fulfilled - Retrieved card.

Return Type:

Promise<Card>
NAME
TYPE
DESCRIPTION
id
string

Unique card identifier.

name
string

Name of the card.

source
string

Source that created the card.

Some possible values:

  • "Contacts"
  • "Velo"
  • "Inbox"
  • "Invoices"
  • "Marketplace"
  • "Price Quotes"
  • "Wix Forms"
contactId
string

ID of the contact associated with the card.

createdDate
Date

Date the card was created.

updatedDate
Date

Date the card was last updated.

phaseId
string

ID of the phase which contains the card.

Was this helpful?

Get a card

Copy Code
1import { Permissions, webMethod } from 'wix-web-module';
2import { workflows } from 'wix-crm-backend';
3
4export const getCard = webMethod(Permissions.Anyone, (cardId) => {
5 return workflows.getCard(cardId);
6});
7
8// Returns a promise that resolves to
9// {
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// }