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

# Send SMS

> Send text messages to enhance customer interaction and streamline communication

The Send Text Message Block very simply allows Phonely to send a text message from its designated number (or your verified custom number) directly to your customer's phone number. This functionality is a powerful way to enhance customer interaction, streamline communication, and extend the automated conversation beyond the voice call.

<iframe src="https://www.youtube.com/embed/U4WWVGZOBTk" title="YouTube video player" frameborder="0" className="w-full aspect-video rounded-xl" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen />

## Key Features of the Send Text Message Block

<Steps>
  <Step title="Automated SMS Delivery:">
    Sends text messages from Phonely's system to a customer's phone number automatically based on workflow logic.
  </Step>

  <Step title="Variable Integration">
    Compose dynamic message content by including answers from previous questions or other stored variables (e.g., caller name, phone number, address, live transcript data).
  </Step>

  <Step title="Flexible Recipient Selection">
    Choose to send the SMS to the customer's phone number from which they initiated the call, or to a specific phone number collected as a variable within the workflow.
  </Step>

  <Step title="Custom Number Support">
    Optionally use your own dedicated SMS number for texting (requires A2P 10DLC compliance and additional verification).
  </Step>

  <Step title="Interim Message">
    Define a message that the AI agent says aloud while the text message is being sent (e.g., "One moment please," or "Sending you that text right now").
  </Step>

  <Step title="Call Outcome Tagging:">
    Allows you to tag the call at this stage for further analytics, helping you understand workflow progression.
  </Step>
</Steps>

## How to Use the Send Text Message Block

<Steps>
  <Step title="Access the Workflows Page">
    1. Log in to the Phonely Dashboard. If you're logging in for the first time, you'll see a navigation bar on the left side.
    2. Navigate to the "Agent" page and then select "Workflows".
  </Step>

  <Step title="Create or Edit a Workflow">
    1. Click on "Create New Flow" or edit an existing flow.
    2. Set a Trigger Condition for your workflow (e.g., "when someone asks about call flows"). This allows you to create different questions and branching answers based on the trigger.
  </Step>

  <Step title="Add a Phone Number Request (Crucial for Reliability)">
    1. To reliably send an SMS, start by either confirm the customer's phone number as the number that triggered the call, or asking for the customer's phone number in a preceding block.
    2. Use an Ask Exactly Block for this purpose.
    3. Select "Advanced Options" within that block's settings and choose "Phone" for the answer type to ensure the input is formatted correctly.
  </Step>

  <Step title="Add the Send Text Message Block">
    1. Link the action by clicking the plus + button in your workflow where you want the SMS to be sent.
    2. Select "Send SMS Message" from the available blocks.
  </Step>

  <Step title="Configure the SMS">
    Click on the Send Text Message Block to open its settings.
  </Step>
</Steps>

## **Choose the Phone Number**

<Steps>
  <Step title="You have two primary options for the recipient:">
    * **Use the customer's phone number from which the call was sent to or received from**
    * **Use a phone number provided in a previous question** (Recommended for reliability)
    * **Advanced**: You can also access Twilio metadata variables (like caller\_phone\_number) for advanced use cases, but explicitly asking the customer is often simpler and more reliable.
  </Step>

  <Step title="Compose the Message Content: Enter the message you want to send.">
    * You can dynamically include answers to previous questions or other stored variables by selecting them from the available options.
    * For post-call SMS, you can use variables like caller\_name, phone\_number, or URL.
    * For live call SMS, you can use any variable stored from previous blocks (e.g., address, confirmation, or a live transcript).
  </Step>

  <Step title="Add Interim Message (Optional)">
    Define a brief message for the AI to say while the text is being sent.
  </Step>

  <Step title="Add Call Outcome Tagging (Optional)">
    Tag this stage for analytics, allowing you to understand if Phonely reached this point in the conversation.
  </Step>
</Steps>

## Important Note on Phone Number Forwarding & SMS

If you are forwarding your main business phone number to Phonely's phone number, and you attempt to use the "customer's phone number they texted from" option directly with that forwarded number, the SMS might incorrectly be sent back to your forwarded number rather than the actual customer's original calling number.

**Workaround/Best Practice**: To ensure the SMS is always sent to the correct customer, it is highly recommended to add a step in your workflow to explicitly ask the customer for their phone number (using an Ask Exactly Block, for example) and then use that collected variable as the recipient for the Send Text Message Block. This also provides an opportunity for a verification step.

## Example Send SMS Use Case

Here's an example workflow to illustrate the process of using the Send Text Message Block:

<Steps>
  <Step title="Trigger">
    Customer would like to book an appointment
  </Step>

  <Step title="Action 1 (Talk Block)">
    Qualify the customer with a series of questions to determine if they can schedule an appointment or not
  </Step>

  <Step title="Action 2 (Ask Exactly Block)">
    Ask for the customer's phone number (e.g., "What's the best number to send that link to?"). Store as customer\_number
  </Step>

  <Step title="Action 3 (Send Text Message Block)">
    Send an SMS to the customer\_number variable.

    * **Message Content**: "Here's the link to our scheduling calendar: \[cal\_link\_variable]"
    * **Interim Message**: "Sending you that link right now."
  </Step>
</Steps>

## Conclusion

By following these steps, you can effectively send text messages to your customers within Phonely's call flows. This functionality is a powerful way to enhance customer interaction, provide supplementary information, and streamline communication, adding a robust channel to your AI receptionist's capabilities.
