/
Text Messages

Text Messages

This will create a table named “text_messages_[study_name]" when turned on. These are all values that are stored in Way to Health related to text messages.

Column

Description

Example Data

Column

Description

Example Data

text_message_id

The ID of the text message

123

study_id

The ID of the study

999

study_name

The Name of the study

Three Nine Study

participant_id

The ID of the participant

11

arm_id

The ID of the arm the participant has been randomized. It will be blank if the participant has not been randomized.

44

external_id

An ID that identifies the participant in some other system. If one is not on the participant record, it will be blank.

ABCD1234

access_group

If the study uses access groups, this will display the groups the participant is in.

Group 456

start_date

The date the participant has been randomized. If the participant has not been randomized, this field will be blank.

2022-05-26 16:22:00

participant_status

The current status of the participant.

Can be one of the following:

  • "New"

  • "Enrolling"

  • "Enrolled"

  • "Ready"

  • "Started"

  • "Finished"

  • "Ineligible"

  • "Declined"

  • "Unenrolled"

phone_number

The phone number the text was sent to

+10001112222

from_number

The phone number the text was sent from

+19998887777

message_text

The text message sent

This is a sample message!

send_window_start

Time

00:00:00

send_window_end

Time

23:59:59

Sent

Boolean

True if sent, false otherwise.

error_code

Twilio error code (Error Codes | Twilio )

60205

error_message

Twilio error message (Error Codes | Twilio)

SMS is not supported by landline phone number

SID

Unique identifier for text message

qwerty123456789asdfgh7890

messaging_service_id

Id for the Twilio messaging service used

ASDFG1234567890poiuytrew23

direction

The direction of the message

Can be one of the following:

  • outbound-api

  • outbound-reply

  • inbound

status

The current status of the text message

Can be one of the following:

  • queued

  • failed

  • sent

  • delivered

  • undelivered

sent_at

Datetime the message was sent

2022-10-31 10:03:30

price

Cost to send text message

$0.33

num_media

Number of attached files to text message

1

num_segments

The number of parts the text message was cut into in order to send

3

media

JSON blob of media identifiers

[{"sid": QWERTY12345678}]

medi_Url

URL where media can be found

https://www.foo-bar.com

metadata

JSON blob of relevant info about the text message

[ { "message": "Part of conversation: GO Keyword (6\/12\/20)", "study_user_conversation_id": "123456", "source_id": "987", "previousState": { "values": { "Camera Phone": "YES" }, "seenMessages": [ "Camera Phone", "Apple or Android" ], "currentQuestion": "Apple or Android", "questionText": "Do you have an APPLE or ANDROID phone? Reply: \n\n1) Apple\n2) Android\n" }, "nextState": { "values": { "Camera Phone": "YES", "Apple or Android": "1" }, "seenMessages": [ "Camera Phone", "Apple or Android", "Apple Instructions", "overview instructions Apple", "Next Step Apple " ], "currentQuestion": "Next Step Apple ", "questionText": "Did you complete downloading the app and are ready for the next step? Reply:\n\nNext\n" } } ]

created_at

TIMESTAMP when record is created

2021-03-26 18:05:13

updated_at

TIMESTAMP when record is updated

2021-03-26 18:05:15

notification_d

ID of the notification that sent the text message if exists

12345

Related content

Frequently Asked Questions (FAQs)
Frequently Asked Questions (FAQs)
Read with this
Voice Call
Voice Call
More like this
W2H Participant Profile
W2H Participant Profile
More like this
Enrollment
Enrollment
More like this
Transactions
Transactions
More like this
Participant Variable Values
Participant Variable Values
More like this