---
title: "Send SignNow Invite via SMS"
url: "https://docs.signnow.com/docs/apex-send-sms-invite"
type: "page"
section: "Integrations"
slug: "apex-send-sms-invite"
---

# Send SignNow Invite via SMS

# Apex action: Send SignNow Invite via SMS

> Before configuring this Apex action, review the [prerequisites](/docs/salesforce-apex-actions#prerequisites) for SignNow Apex actions and complete the required setup steps.

The **Send SignNow Invite via SMS** action allows users to send a document group for signature via SMS. Recipients will receive a text message containing a link to the document group.

In this example, we will configure a flow that sends an SMS invite when an Opportunity name changes.

## Prerequisites

- Go to **Setup** > **Flows** > **New Flow**.
- Select **Record-Triggered Flow**.

![send_sms_invite_flow_type.png](/reference-assets/images/SignNow_Salesforce/apex_actions_2/send_sms_invite_flow_type.png)

## Step 1. Configure the flow trigger

> Configure the flow starting conditions as required. These are example settings.

- Enter the Salesforce object name: `Opportunity`.
- Select when the flow should be triggered: `A record is updated`.
- Set entry conditions:
    - condition requirements: `All Conditions are Met (And)`
    - record field: `Name`
    - condition operator is `Is Changed`
    - value is `True`
- Select how often the flow should run: `Every time a record is updated and meets the condition requirements` .

![send_sms_invite_start.png](/reference-assets/images/SignNow_Salesforce/apex_actions_2/send_sms_invite_start.png)

## **Step 2: Create Apex-defined collections**

Before configuring the assignments, you must create the necessary collection resources in the Toolbox.

### Create the Steps collection

- Click the **Toolbox** icon (top-left).
- Click **New Resource** and create a Variable.
- **API Name:** `Steps_collection`
- **Data Type:** Apex-defined
- **Apex Class:** `cuda_SNAPI_SMSInviteStep`
- **Check:** Allow multiple values (collection).

![send_sms_invite_steps_collection.png](/reference-assets/images/SignNow_Salesforce/apex_actions_2/send_sms_invite_steps_collection.png)

### Create the Invite Action collection

- Click **New Resource** and create a Variable.
- **API Name:** `Invite_action_collection`
- **Data Type:** Apex-defined
- **Apex Class:** `cuda_SNAPI_SMSInviteAction`
- **Check:** Allow multiple values (collection).

![send_sms_invite_action_collection.png](/reference-assets/images/SignNow_Salesforce/apex_actions_2/send_sms_invite_action_collection.png)

## **Step 3: Assignments for Invite_action_collection**

You need to create a temporary variable and then assign it to the collection.

### Create the temporary variable

- Click **New Resource** in the Toolbox.
- **API Name:** `Invite_action_temp`
- **Data Type:** Apex-defined
- **Apex Class:** `cuda_SNAPI_SMSInviteAction` (Do not check **Allow multiple values**).

![send_sms_invite_action_assignment_var.png](/reference-assets/images/SignNow_Salesforce/apex_actions_2/send_sms_invite_action_assignment_var.png)


### Fill the SMS Action variable

- Add an **Assignment** element to the flow.
- Add a label: Fill temp SMS action.
- **Set variable values:**
    - `Invite_action_temp.action` **Equals** `[Value]`
    - `Invite_action_temp.document_id` **Equals** `[Value]`
    - `Invite_action_temp.phone_invite` **Equals** `[Value]`
    - `Invite_action_temp.role_name` **Equals** `[Value]`

> Retrieve the document ID in your SignNow account.

![send_sms_invite_assignment_fill_action.png](/reference-assets/images/SignNow_Salesforce/apex_actions_2/send_sms_invite_assignment_fill_action.png)

### Add the SMS Action into SMS Action Collection

- Add a second **Assignment** element.
- Add a label: `Put temp SMS action into SMS action collection`.
- **Set Variable Values:**
    - **Variable:** `Invite_action_collection`
    - **Operator:** Add
    - **Value:** `Invite_action_temp`

![send_sms_invite_action_assignment_put.png](/reference-assets/images/SignNow_Salesforce/apex_actions_2/send_sms_invite_action_assignment_put.png)

## **Step 4: Assignments for Steps_collection**

Now, populate the steps collection using the action collection you just created.

### Create the temporary variable

- Click **New Resource** in the Toolbox.
- **API Name:** `Step_temp`
- **Data Type:** Apex-defined
- **Apex Class:** `cuda_SNAPI_SMSInviteStep`

![send_sms_invite_steps_assignment_var.png](/reference-assets/images/SignNow_Salesforce/apex_actions_2/send_sms_invite_steps_assignment_var.png)

### Fill the Steps variable

- Add an **Assignment** element.
- Add a label: Fill temporary step.
- **Set Variable Values:**
    - `Step_temp.order` **Equals** `[Value]`
    - `Step_temp.invite_actions` **Equals** `Invite_action_collection` (Select the collection created in Step 3).

![send_sms_invite_steps_assignment_fill.png](/reference-assets/images/SignNow_Salesforce/apex_actions_2/send_sms_invite_steps_assignment_fill.png)

### Add Step data into Steps Collection

- Add a final **Assignment** element.
- Add a label: ****Put temporary step into steps collection.
- **Set Variable Values:**
    - **Variable:** `Steps_collection`
    - **Operator:** Add
    - **Value:** `Step_temp`

![send_sms_invite_steps_assignment_put.png](/reference-assets/images/SignNow_Salesforce/apex_actions_2/send_sms_invite_steps_assignment_put.png)

## **Step 5: Configure the Send SignNow Invite via SMS action**

Now that the collections are ready, add the final action to the flow.

1. Click the **(+)** icon at the end of the flow.
2. Select **Send SignNow Invite via SMS**.
3. Add a label: `Send SignNow Invite via SMS`.
4. **SignNow Document Group ID:** Add the ID or select a resource.
5. **Steps of the SignNow Document Group SMS Invite:** Select the `Steps_collection` resource.

![send_sms_invite_action.png](/reference-assets/images/SignNow_Salesforce/apex_actions_2/send_sms_invite_action.png)

## **Finalize**

- Click **Save**.
- **Activate** the flow.

## Result

Each time the Opportunity name changes, the document group with the specified ID will be sent for signature to the defined phone numbers.

---

View the full list of [SignNow Apex actions](/docs/salesforce-apex-actions).


---
*Full page: https://docs.signnow.com/docs/apex-send-sms-invite*
