How to Auto-Add Appointment Date to a Sparkforge Contract
Sparkforge contracts cannot read appointment merge tags directly. Use a workflow to copy the appointment start time into a custom field on the contact or opportunity, then send a contract template that pulls from that field.
Contract templates in Sparkforge pull merge values from the contact or opportunity record — not from the appointment trigger directly. To send a contract with the booked date pre-filled, copy the appointment start time into a custom field first, then send the contract that references that field.
Prerequisites
1. Create the custom field
- Open Settings → Custom Fields.
- Click Add Field and choose Contact (simple method) or Opportunity (advanced method).
- Set the field type to Text.
- Name it clearly, e.g.
Session Date.
2. Update the contract template
- Open Payments → Contracts.
- Clone an existing template or create a new one.
- Insert the merge variable:
{{contact.session_date}}for the contact method, or{{opportunity.session_date}}for the opportunity method. - Save.
Method 1: Contact-based workflow (simple)
Use this when each contact has at most one active booking.
- Trigger: Customer Booked Appointment. Optionally filter by calendar.
- Update Contact Field: Field = your custom field. Value =
Appointment → Start Time. - Send Documents & Contracts: select your updated template.
- Save and publish.
Method 2: Opportunity-based workflow (advanced)
Use this when one contact may have multiple bookings tracked as opportunities.
- Trigger: Customer Booked Appointment, filtered by calendar.
- Find Opportunity: Most recently created opportunity. Add a field filter where your custom field Is Empty so only un-dated opportunities update.
- Update Opportunity: on the Opportunity Found branch, set the custom field value to
Appointment → Start Time. - Send Documents & Contracts: select the opportunity-based contract template.
Required workflow order
- Trigger — appointment booked.
- Update field — contact or opportunity.
- Send contract — using the updated template.
Troubleshooting
Contract sent but the date field is blank
- The Update Field action is after the Send Contract action. Move it before.
- For the opportunity method, no opportunity exists yet. Add a Create Opportunity step first.
Old contract sent without the date field
Open the Send Contract action and confirm the dropdown points to the cloned template, not the original.
Frequently Asked Questions
Why can't I use the appointment merge tag directly in a contract?
Should I use the contact method or the opportunity method?
What field type should the custom field be?
Can the same workflow send multiple contracts?
Will the date format match my locale?
Was this article helpful?
Thanks for the feedback.