> ## Documentation Index
> Fetch the complete documentation index at: https://docs.go.gbgplc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# User Invite

Invites a user to complete a journey by sending an invite URL via SMS or email.

This page documents the **User Invite** module, including its variants, capabilities, and the result values it returns.

## User Invite: Single User Invite

### Capabilities

The module returns the following capabilities.

#### Recipient supplied

True when the subject provided a mobile phone number or personal email address to send the invite to.

| Detail  | Description |
| ------- | ----------- |
| Type    | Boolean     |
| Default | `isFalse`   |

#### Invite sent

True when at least one channel's invite message was accepted for delivery by its messaging provider.

| Detail  | Description |
| ------- | ----------- |
| Type    | Boolean     |
| Default | `isFalse`   |

#### SMS status

The status of the SMS invite. Delivery status is refreshed by polling the provider for the configured poll duration; NONE when no mobile number was supplied, ERRORED when the send request got no provider response.

| Code          | Label       | Description                                                                                     |
| ------------- | ----------- | ----------------------------------------------------------------------------------------------- |
| `NONE`        | None        | No SMS was sent because no mobile number was supplied.                                          |
| `ACCEPTED`    | Accepted    | The message was accepted by the messaging provider.                                             |
| `QUEUED`      | Queued      | The message is queued for delivery by the messaging provider.                                   |
| `SENT`        | Sent        | The message was sent to the carrier.                                                            |
| `DELIVERED`   | Delivered   | The carrier confirmed delivery of the message to the recipient's handset.                       |
| `UNDELIVERED` | Undelivered | The message could not be delivered to the recipient.                                            |
| `FAILED`      | Failed      | The messaging provider rejected or failed to send the message.                                  |
| `ERRORED`     | Errored     | The send request could not be completed - no response was received from the messaging provider. |

#### Email status

The status of the email invite as reported by the email provider at the time of sending; NONE when no personal email address was supplied, ERRORED when the send request got no provider response.

| Code       | Label    | Description                                                                                 |
| ---------- | -------- | ------------------------------------------------------------------------------------------- |
| `NONE`     | None     | No email was sent because no personal email address was supplied.                           |
| `ACCEPTED` | Accepted | The email was accepted for delivery by the email provider.                                  |
| `FAILED`   | Failed   | The email provider rejected or failed to send the email.                                    |
| `ERRORED`  | Errored  | The send request could not be completed - no response was received from the email provider. |

### Default outcomes

The module is pre-configured with the following default outcomes, which can be used in evaluation and routing logic within the journey designer.

| Outcome   | Condition                                                                         | Description                                                                                                 |
| --------- | --------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `Skipped` | Recipient Supplied isFalse                                                        | No invite was sent because the subject supplied neither a mobile phone number nor a personal email address. |
| `Sent`    | Invite Sent isTrue                                                                | At least one invite message was accepted for delivery by its messaging provider.                            |
| `Failed`  | SMS Status is `FAILED` or SMS Status is `UNDELIVERED` or Email Status is `FAILED` | An invite was sent but the messaging provider rejected it or couldn't deliver it.                           |
| `Error`   | default, when no conditions matched                                               | The module couldn't return a result.                                                                        |

### Input payload

The following is a sample payload used to submit data to the **Single User Invite** module for processing.

```json JSON theme={null}
{
  "context": {
    "subject": {
      "identity": {
        "phones": [
          {
            "type": "mobile",
            "number": "+1234567"
          }
        ]
      }
    }
  }
}
```

| Field           | Required | Description                                                                                    |
| --------------- | -------- | ---------------------------------------------------------------------------------------------- |
| `PersonalEmail` | No       | The personal email address to send the invite to. Supply this, a mobile phone number, or both. |
| `MobilePhone`   | No       | The mobile phone number to send the invite to. Supply this, a personal email address, or both. |

### Sample response

The following is a sample response returned by the module.

```json JSON theme={null}
{
  "response": {
    "advice": {
      "recipientSupplied": true,
      "inviteSent": false,
      "smsStatus": "FAILED",
      "emailStatus": "NONE"
    },
    "outcome": "Failed"
  }
}
```
