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
Optional[list[str]]

Bullet points for the subsection.

Returns

PomBuilder — Self for method chaining.

Example

1from signalwire.core.pom_builder import PomBuilder
2
3pom = PomBuilder()
4
5pom.add_section("Capabilities", body="You can help with the following:")
6
7pom.add_subsection(
8 "Capabilities",
9 "Limitations",
10 body="You cannot process payments directly."
11)
12
13pom.add_subsection(
14 "Capabilities",
15 "Escalation",
16 body="Transfer to a human agent for these topics:",
17 bullets=["Refunds over $500", "Account closures", "Legal requests"]
18)
19
20print(pom.render_markdown())