Skip to content

Refactor Twilio docs - #348

Merged
daneshk merged 2 commits into
wso2:mainfrom
PasinduGunarathne:twilio-docs
May 11, 2026
Merged

Refactor Twilio docs#348
daneshk merged 2 commits into
wso2:mainfrom
PasinduGunarathne:twilio-docs

Conversation

@PasinduGunarathne

@PasinduGunarathne PasinduGunarathne commented May 11, 2026

Copy link
Copy Markdown
Contributor

Purpose

  • Improve the Twilio connector document content with correct syntax and guidelines. Enhance the instruction to use the Twilio Connector's publisher and consumer flows to improve maintainability and error tracking.

Related PR : wso2/integration-samples#137

Goals

Describe the solutions that this feature/fix will introduce to resolve the problems described above

Approach

Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email documentation@wso2.com to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here.

User stories

Summary of user stories addressed by this change>

Release note

Brief description of the new feature or bug fix as it will appear in the release notes

Documentation

Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter �N/A� plus brief explanation of why there�s no doc impact

Training

Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable

Certification

Type �Sent� when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to certification@wso2.com and NOT pasted in this PR. If there is no impact on certification exams, type �N/A� and explain why.

Marketing

Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable

Automation tests

  • Unit tests

    Code coverage information

  • Integration tests

    Details about the test cases and coverage

Security checks

Samples

Provide high-level details about the samples related to this feature

Related PRs

List any other related PRs

Migrations (if applicable)

Describe migration steps and platforms on which migration has been tested

Test environment

List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested

Learning

Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem.

Summary by CodeRabbit

  • Documentation
    • Expanded Twilio connector documentation with comprehensive client configuration and authentication examples (Auth Token and API Key flows)
    • Enhanced code examples with improved formatting and visual guides for integration workflows
    • Clarified trigger functionality, error handling, and event payload types with detailed callback descriptions

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@PasinduGunarathne has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 55 minutes and 34 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 56b72e38-7be9-4952-b5c8-b794d005ed95

📥 Commits

Reviewing files that changed from the base of the PR and between d640420 and 195dae5.

📒 Files selected for processing (4)
  • en/docs/connectors/catalog/communication/twilio/actions.md
  • en/docs/connectors/catalog/communication/twilio/example.md
  • en/docs/connectors/catalog/communication/twilio/overview.md
  • en/docs/connectors/catalog/communication/twilio/setup-guide.md

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'path_instructions'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
📝 Walkthrough

Walkthrough

This PR updates the Twilio connector documentation across six files to clarify the separate trigger package (ballerinax/trigger.twilio), expand REST API client configuration, introduce new event wrapper types for callback handlers, and enhance visual examples with themed screenshots and updated code samples.

Changes

Twilio Connector Documentation

Layer / File(s) Summary
Architectural Clarification & Package Separation
en/docs/connectors/catalog/communication/twilio/overview.md, en/docs/connectors/catalog/communication/twilio/triggers.md
Clarifies that Twilio triggers use ballerinax/trigger.twilio (separate from REST ballerinax/twilio). Documents supported SMS and call status callbacks with detailed lifecycle states (queued/sending/sent/received/failed/delivered/undelivered/inbound/received for SMS; queued/ringing/in-progress/completed/busy/failed/no-answer/canceled for calls).
REST API Client Configuration & Initialization
en/docs/connectors/catalog/communication/twilio/actions.md
Expands client configuration table with http1Settings, http2Settings, and responseLimits. Documents separate Auth Token and API Key authentication flows with distinct code examples.
Operations Reference & API Methods
en/docs/connectors/catalog/communication/twilio/actions.md
Documents all Twilio operations (messaging, calls, account, phone numbers, recordings, conferences, queues, usage) with JSON response formatting. Expands createCall to require exactly one of Url, Twiml, or ApplicationSid. Adds new updateAccount operation.
Event Handling, Error Management & Payload Types
en/docs/connectors/catalog/communication/twilio/triggers.md
Adds error handling section explaining webhook callback semantics: error? returns trigger HTTP 500 and Twilio retries (up to 3 times); expected failures return () to prevent retries. Renames section to "Event payload types".
Automation Integration Example with Themed UI
en/docs/connectors/catalog/communication/twilio/example.md
Replaces static Markdown images with ThemedImage components for light/dark rendering. Adds visual steps for connection setup, operations panel, createMessage operation, and trigger configuration.
Event-Driven Integration Code Examples
en/docs/develop/integration-artifacts/event/twilio.md
Updates Ballerina code examples: imports ballerinax/twilio, adds configurable port for listener, updates call/SMS handler signatures to use CallStatusEventWrapper and SmsStatusChangeEventWrapper. Expands SMS handlers (accepted/queued/sending/sent/failed/delivered/undelivered/receiving/received) with null-safe field access for From, Body, CallSid, CallDuration. Replaces static screenshots with themed components. Adds deployment reachability callout with ngrok guidance.
Setup Guide Metadata
en/docs/connectors/catalog/communication/twilio/setup-guide.md
Adds description and keywords front-matter fields for improved indexing.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Twilio paths now shine so bright,
Trigger package separated just right,
Events wrapped in types so neat,
With themed screenshots—quite the treat!
Documentation hops along with glee,
Integration examples for all to see!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description provides a purpose statement but is largely incomplete, with most required template sections containing only placeholder text and no substantive information. Complete the description by filling in the Goals, Approach, User stories, Release note, and other required sections with specific details about the documentation changes and their rationale.
Title check ❓ Inconclusive The title 'Refactor Twilio docs' is overly vague and generic, using non-descriptive language that doesn't clearly convey the specific nature of the documentation updates. Consider using a more descriptive title that specifies the main changes, such as 'Update Twilio connector documentation with improved client configuration, authentication flows, and trigger details' or similar.
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@en/docs/develop/integration-artifacts/event/twilio.md`:
- Line 70: The import is using the wrong package for webhook listener
functionality; replace the import of ballerinax/twilio with
ballerinax/trigger.twilio so the twilio:Listener service and trigger types
(e.g., twilio:CallStatusEventWrapper, twilio:SmsStatusChangeEventWrapper)
resolve correctly; locate the import line near the example that instantiates
twilio:Listener and update it to import ballerinax/trigger.twilio.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 4c8eb84c-398f-4850-82ee-b359bc13ad44

📥 Commits

Reviewing files that changed from the base of the PR and between 196c771 and d640420.

📒 Files selected for processing (6)
  • en/docs/connectors/catalog/communication/twilio/actions.md
  • en/docs/connectors/catalog/communication/twilio/example.md
  • en/docs/connectors/catalog/communication/twilio/overview.md
  • en/docs/connectors/catalog/communication/twilio/setup-guide.md
  • en/docs/connectors/catalog/communication/twilio/triggers.md
  • en/docs/develop/integration-artifacts/event/twilio.md

Comment thread en/docs/develop/integration-artifacts/event/twilio.md
@daneshk
daneshk merged commit 94dc2f5 into wso2:main May 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants