A hands-on guide · Pega 24.2 · 25.1 · 26.1
Document
Content Engine.
Write a letter once, then show it on screen, as a PDF or in an email. This guide sets up the engine in Pega Constellation v25, step by step, and shows how to go beyond two conditional variants.
How it fits together
Three layers, one document.
The engine separates what a document says (the paragraphs) from where it goes (the browser, a PDF, an email). You describe the document once, in three small tables, and the engine assembles the final HTML each time.
- ResultFinal HTML
Document Type
Defines a document and links it to its sections.
- Where you set it up
- Data → Document Content Type table
- In this guide
- DOC0003 · Payment Reminder
Play first
Build a letter yourself.
Before any set-up, see the idea work. This is a simulation of how the engine resolves the example from this guide: a Payment Reminder letter with one paragraph that depends on the member’s level. Change the member, then break things on purpose to see the exact symptoms you will meet later.
MembershipLevel on the case
Make a mistake on purpose
The letter on screen
Dear Sam Rivera,
Your bill of $120.00 is now overdue. Please pay now.
Yours sincerely, The ACME Team
What the engine did
- GenerateDocumentContent(DocumentID = DOC0003)
- Section LETTER_START: 1 paragraph row
- PR_Salutation: not conditional, include
- Section LETTER_BODY: 2 paragraph rows
- PR_BodyStandard: IsParagraphApplicable, row MembershipLevel = STANDARD is true, include
- PR_BodyGold: IsParagraphApplicable, no row matched, otherwise returns false, skip
- Section LETTER_END: 1 paragraph row
- PR_Closing: not conditional, include
The Paragraph table, and which rows made it in
- PAR0101LETTER_START · seq 1PR_SalutationincludedDear << pyWorkPage.CustomerName >>,
- PAR0102LETTER_BODY · seq 1PR_BodyStandardincludedYour bill of << pyWorkPage.AmountDue >> is now overdue. Please pay now.
- PAR0103LETTER_BODY · seq 2PR_BodyGoldskippedWe note your balance of << pyWorkPage.AmountDue >>. As a Gold member, please pay at your convenience.
- PAR0104LETTER_END · seq 1PR_ClosingincludedYours sincerely, The ACME Team
Illustrative: this runs in your browser using the example from this guide. It is not connected to any Pega system.
Before you start
What you need.
- A Pega Constellation v25 application, with Dev Studio and App Studio access.
- The DCE ADK zip file (
DCE_010101.zipin this guide), from the Pega Marketplace . The guide links to it and does not host the file. - A case type to work with. This guide uses a Payment Reminder throughout.
- Basic familiarity with Dev Studio: creating rules, activities and data types.
The road
Six phases, fifteen steps.
- Phase 1 · Steps 1 to 3Import and set upOpen
- Phase 2 · Steps 4 to 6Create the case typeOpen
- Phase 3 · Steps 7 to 9Configure the data tablesOpen
- Phase 4 · Steps 10 and 11Paragraph rules and the decision tableOpen
- Phase 5 · Steps 12 and 13Wire up the activityOpen
- Phase 6 · Steps 14 and 15Extend to many variantsOpen
Then two short chapters: PDF and email output, and fixing what breaks, with a symptom finder and a checklist to finish with.
Your turn
Questions and comments
Stuck on something, or have a thought? Write it here. To talk about one part, use the Comment button under that section's heading.