add_subsection

View as MarkdownOpen in Claude

Add a subsection to an existing section. If the parent section does not exist, it is created automatically.

Parameters

parent_title
strRequired

Title of the parent section.

title
strRequired

Subsection title.

body
str

Subsection body text.

bullets
list[str] | NoneDefaults to None

Bullet points for the subsection.

Returns

PomBuilder — Self for method chaining.

Example

from signalwire.core.pom_builder import PomBuilder
pom = PomBuilder()
pom.add_section("Capabilities", body="You can help with the following:")
pom.add_subsection(
"Capabilities",
"Limitations",
body="You cannot process payments directly."
)
pom.add_subsection(
"Capabilities",
"Escalation",
body="Transfer to a human agent for these topics:",
bullets=["Refunds over $500", "Account closures", "Legal requests"]
)
print(pom.render_markdown())