Send Twilio Text When Tracktor Package is Delivered

In this scenario, we'll be showcasing how to create a workflow to send a text with Twilio when a Tracktor package is delivered.

Follow the steps below on how to create this workflow.

1. From the Dashboard tab, click the Create New Workflow button.

2. For the Trigger, select the Tracktor app and then the Fulfillment Delivered action.

3. For the following action, select the Twilio app and then the SMS Send action.

4. Set up a Twilio Credential if you have not done so already. To create a new one, click the Add New Credential button and then follow the instructions.

5. Now we have a workflow that will send a text message when a package is delivered. 

An additional action is required to obtain the customer's phone number. This is because the Tracktor Fulfillment Delivered trigger does not possess the customer's phone number. Mesa can retrieve this information via the Shopify API.

Click the + Add Step button under the Tracktor Fulfillment is Delivered trigger.

6. Select the Shopify app and then the Retrieve Order action.

7. Under the App Configuration section in the Order ID field, choose the Tracktor Fulfillment is Delivered Order ID token. Click the Token { + } menu then select Order ID under Tracktor Fulfillment Delivered.

This will retrieve the order that trigger this workflow.

8. Now we need to retrieve the customer data associated with this order. The customer data has the phone number we are after.

To do this, click on the + Add Step icon again after the Shopify Order Retrieve action. Select the Shopify app and the Retrieve Customer action.

9. Under the App Configuration section in the Customer ID field, use the Token { + } menu to select the Shopify Retrieve Order Customer ID token.

10. Now we have all the data inside this workflow that we need. On the Twilio SMS Send action, select the Shopify Retrieve Customer Phone token for the To phone number field.

11. Fill in the From phone number (with the number provided by your Twilio account) and Message fields. You can customize the message with Tokens to make the message more personalized. 

12. Save your changes and enable the workflow using the buttons at the top.