Open EPM ← Back to openepm.dev

Configure a calendar period

Replace the placeholders with values from your own authorized scope before copying this prompt into an MCP client.

Inputs

  • {{workspace_id}} Stable workspace ID.
  • {{application_id}} Stable application ID.
  • {{year_id}} Active Year member ID.
  • {{period_id}} Active Period member ID.
  • {{ordinal}} Position within the year.
  • {{starts_on}} Inclusive ISO start date.
  • {{ends_before}} Exclusive ISO end date.
  • {{request_key}} Stable idempotency key for this mapping.
  • {{change_id}} Current changeId from the period read.
  • {{metadata_revision}} Current integer metadataRevision from that read.

Prompt

Read metadata.calendar.period.read for {{year_id}} and {{period_id}} in {{workspace_id}} / {{application_id}}.
Check the current mapping and metadata revision. Use the changeId returned by the read, including the empty string for an undefined mapping.
Use execute_v2_calendar_program with metadata.calendar.period.set, yearId {{year_id}}, periodId {{period_id}}, ordinal {{ordinal}}, startsOn {{starts_on}}, endsBefore {{ends_before}}, expectedChangeId {{change_id}}, expectedMetadataRevision {{metadata_revision}}, and idempotency_key {{request_key}}.
Read back the mapped range. Report operationId, committedRevision and the new changeId from the write response. Replay a lost response with the exact original arguments and key.
Stop on overlap, invalid date ordering, stale state or permission failure.

Example inputs

In the disposable Operating Data Cube, map the active Y2027 and P01 to the half-open range [2027-01-01, 2027-02-01). Substitute the revision and change ID from the period read. Expect the returned metadata revision to advance by one and the range and new change ID to match on readback.

{
  "languageVersion": 2,
  "function": "metadata.calendar.period.set",
  "arguments": {
    "yearId": "Y2027", "periodId": "P01", "ordinal": 1,
    "startsOn": "2027-01-01", "endsBefore": "2027-02-01",
    "expectedChangeId": "{{change_id}}", "expectedMetadataRevision": {{metadata_revision}}
  }
}

Tools used include read_v2_program, execute_v2_calendar_program. See the module guidelines and tool index.

Discussion

Discussing Configure a calendar period

The discussion service requires JavaScript and a connection to Firebase.