Twilio Modify
In this article
Overview
Use this Snap to modify existing Twilio data objects.
Prerequisites
- Valid Twilio Account SID
- Auth Token corresponding to the Account SID
Support for Ultra Pipelines
Works in Ultra Pipelines.
Limitations and Known Issues
None.
Snap Input and Output
Input/Output | Type of View | Number of Views | Examples of Upstream and Downstream Snaps | Description |
---|---|---|---|---|
Input | Document |
|
| A document containing details of the entity or data object to modify a Twilio entity. |
Output | Document |
|
| A document containing details of the modified Twilio entity or data object. |
Snap Settings
Parameter Name | Data Type | Description | Default Value | Example |
---|---|---|---|---|
Label | String | Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your Pipeline. | Twilio Modify | Twilio Modify Assistant |
API object | String/Expression | Required. Select the API that you want to access in Twilio instance. This property provides a set of business objects defined by Twilio. | Programmable SMS | Autopilot |
Entity | String/Expression/Suggestion | Required. Select an entity that belongs to the corresponding API object chosen above. | Messages | Assistant |
Entity SID | String/Expression | Required. Specify a unique ID for the entity that determines one specific resource under the given entity type. Entity SID is required to perform the modification operation in most cases. However, an exception to this arises for entity types that can only be operated as a group rather than an instance, such as Actions of a Task under the Autopilot object. To re-program the actions that correspond to a task invoked during the dialogue, you must not provide Entity SID in this field. | None | SM191d756dfd987khlo345s |
Required SID | Use this field set to specify the parent entity String Identifiers (SIDs) necessary for accessing the requested resources, if any. Click
| |||
SID name | String/Suggestion | Specify the name(s) of the parent SID(s) of the input Entity. The available entities are dynamically populated in the suggestion list according to the specified Entity. | None | AssistantSid |
SID value | String | Specify the SID value for the corresponding SID name chosen above. | None | UA12ab3478amkiu765dfnlp2309kloi657q |
Connection details | Use this field set to configure the network connection parameters. This field set contains the following fields:
| |||
Connection timeout | Integer | Required. Specify the connection timeout duration in seconds. | 30 | 60 |
Maximum request attempts | Integer | Required. Specify the maximum number of connection attempts if the connection fails or is timed-out. | 0 | 6 |
Retry request interval | Integer | Required. Specify the time in seconds to wait before retrying the connection request. | 0 | 3 |
Snap Execution | Drop-down list | Select one of the three following modes in which the Snap executes:
| Execute Only | Validate & Execute |
Troubleshooting
Error | Reason | Resolution |
---|---|---|
You have an empty value in the Key/Value field. | Key/value parameters must not be empty. | Enter a valid value for key/value parameters. |
One or more Required SIDs are missing | The Required SIDs are mandatory for this Endpoint. | Check your settings under the Required SIDs table. Ensure that you have entered SID names and values for all the entries. |
You have an empty value in the SID name/value field for the Required SID. | The SID name/value field must not be empty for Required SIDs. | Enter a valid SID name/value for the Required SID. |
Input schema
The Payload schema helps you define the input payload for the API call through Modify Snap. It dynamically loads and represents all the parameters that you need for the data object modification. For Mapper Snap or a Snap which can display the entire input schema, always use the Payload schema to define your input payload. Else, in your input JSON object, always include Payload text as a key in the parent of your input.
Examples
Modifying a Message sent through Programmable SMS
This example illustrates modifying a message sent through Programmable SMS which involves modifying the message-body from a message record while retaining the rest of the properties. We use Twilio Modify to achieve this result.
To use this example you must have a valid Twilio Account (see Twilo Account) and a Twilio phone number (including a trial phone number). You should also have sent at least one message with that Twilio phone number.
First, we configure the Twilio Modify Snap as shown below. Note that in the Entity Sid field you need to provide the message SID retrieved from your Twilio account (the one created from the Twilio Create Pipeline).
On validation, we can view both the required and optional parameters in the upstream Mapper Snap for updating the object of Messages entity in the Target Schema. We select the parameters that are dynamically populated from the JSON Generator and map them to the Target Path.
Subsequently, we edit the JSON text in the JSON Generator Snap according to Target path and provide them as expressions in the Mapper Snap. To modify the message body, we set the Body parameter as an empty string in the JSON object as shown below:
A successful execution of this Pipeline results in the following API response in the output view of the Twilio Modify Snap, which we later convert into XML format and stream to an XML Writer Snap. We can see the generated XML file in the project workspace.
Downloads
Important Steps to Successfully Reuse Pipelines
- Download and import the Pipeline into SnapLogic.
- Configure Snap accounts as applicable.
- Provide Pipeline parameters as applicable.
Snap Pack History
See Also
Have feedback? Email documentation@snaplogic.com | Ask a question in the SnapLogic Community
© 2017-2024 SnapLogic, Inc.