Assign a journey to a partner

POST https://api.suger.cloud/ai/org/{orgId}/prm/partnership/{partnershipId}/assignJourney

Assign one of this organization's journey templates to a partnership. The assignment copies the template's steps, creates a linked task for each CUSTOM_TASK step and an agreement awaiting signature for each SIGN_AGREEMENT step, grants the partner access to the courses its steps name, and emails the assigning user and the partner's champion contact. Course access needs the partner to be a Fours organization; otherwise `grantSummary.warnings` says so. Returns the new assignment with its steps, and `grantSummary`: the courses access was granted to, and any warnings. `partnershipId` is the partnership id from ListPrmPartnerships (the `id` of its row), and must be a partnership where this organization is the seller. `templateId` is the `id` of a template in `info.journeyTemplates` from GetPrmConfig; only an ACTIVE template can be assigned. A partnership that already has this journey in any status, COMPLETED and ARCHIVED included, is refused with 400. A missing or inactive template and a partnership where this organization is not the seller also answer 400; an unknown template or partnership answers 404.

Parameters

NameInTypeRequiredDescription
orgId path string yes Organization ID
partnershipId path string yes Partnership ID

Request Body

Required. Content-Type: application/json · Schema: AssignJourneyRequest

AssignJourneyRequest fields:

FieldTypeRequiredDescription
templateId string no

Responses

201 — Created assignment + course-access grant summary

Content-Type: application/json · Schema: AssignJourneyResponse

AssignJourneyResponse fields:

FieldTypeRequiredDescription
assignment JourneyAssignmentDetail no
grantSummary GrantSummary no

JourneyAssignmentDetail fields:

FieldTypeRequiredDescription
archivedAt string no
assignedAt string no
assignedByUserId string no
completedAt string no
createTime string no
description string no
estimatedDays integer no
id string no
lastUpdateTime string no
name string no
organizationId string no
outdated boolean no
partnerName string no PartnerName is the assignee partnership's display name (Info.Name), populated by the org-wide list so each journey row shows its assignee without a separate partners fetch. Empty when not resolved.
partnershipId string no
progress JourneyProgress no
sequential boolean no
stalled boolean no
status string no
steps array<JourneyStepView> no
templateId string no
templateVersion integer no TemplateVersion is the template revision this assignment was built from; Outdated is true when the template has since advanced past it (drift).
tierOutcome string no
tierOutcomeInfo PartnerTier no
version integer no
viewerPartnershipId string no ViewerPartnershipID is the partnership row the CURRENT viewer should open to reach the relationship's detail page. For the owning ISV it's the same as PartnershipID; for a partner-side read it's the partner's OWN mirror row (org = partner, partner_org_id = ISV), since the partner can't open the ISV-owned PartnershipID. Empty when no viewer-side row exists.
kind string no — TIER on a "Path to <tier>" journey.
renewalDeadline string no — set while this tier journey renews the partner's tier.
renewalFiscalYearStart string no — the fiscal-year start a renewal last restarted this tier journey for; kept once the renewal is done (renewalDeadline is then cleared). Absent if the journey was never renewed.

GrantSummary fields:

FieldTypeRequiredDescription
grantedCourses array<GrantedCourse> no
warnings array<string> no

JourneyProgress fields:

FieldTypeRequiredDescription
completed integer no
completedRequired integer no
total integer no
totalRequired integer no

JourneyStepView fields:

FieldTypeRequiredDescription
agreementId string no AgreementID links a SIGN_AGREEMENT step to the partner_agreement created for it at assign time, so executing THAT agreement completes THIS step. Empty when auto-create was skipped/failed — then the step completes on any executed agreement (the pre- match-by-type fallback).
completedAt string no
completedByUserId string no
ctaLabel string no
ctaUrl string no
description string no
dueAt string no
dueRemindersSent array<integer> no DueRemindersSent lists the EXPIRE_SOON.JOURNEY lead-day thresholds (e.g. 7, 1) already reminded for this step, so the daily journey cron sends each threshold's reminder at most once. Cleared when the step is reopened via applyStepStatus (a re-completion cycle re-arms the reminders only if the due date is still ahead).
id string no
internalNotes string no
locked boolean no
order integer no
refId string no course / certificate id
refName string no RefName is the display name of the referenced course / certificate, snapshotted at assign time so the partner (a different org) can show it without resolving the ISV's course / certificate ids.
required boolean no
status string no
targetCount integer no REGISTER_DEAL EARN_CERTIFICATION with People needed (the people).
taskId string no CUSTOM_TASK linked partnership_task
taskNames array<string> no TaskNames lists the task titles from the referenced task template (CUSTOM_TASK), snapshotted at assign time so both views can show every task the template defines, not just the first.
templateStepId string no TemplateStepID links back to the JourneyTemplateStep.ID this step was snapshotted from, so a reassign can match progress across template edits. Empty for assignments created before this field existed.
title string no
type string no
section string no — the step's heading (Delivery, Revenue, Marketing...).
autoComplete boolean no — a metric step; it completes itself and nobody ticks it.
dealValue JourneyDealValueConfig no
marketingPoints JourneyMarketingPointsConfig no
progress JourneyStepProgress no

PartnerTier fields:

FieldTypeRequiredDescription
benefits string no Benefits is a freeform benefits line shown to partners.
color string no Color is the badge color as a hex string, e.g. "#d4a017".
description string no Description is shown to partners in the portal.
id string no ID is a stable identifier referenced by PartnershipInfo.PartnerTier. Assignments survive tier renames/recolors because they key on ID.
name string no Name is the display label, e.g. "Gold".

GrantedCourse fields:

FieldTypeRequiredDescription
courseId string no
courseName string no

JourneyDealValueConfig fields:

FieldTypeRequiredDescription
measure string no VALUE (default, the deal value in the period) | COUNT (the number of deals, all time).
atLeast number no
dealKinds array<string> no SOURCED | CO_SOLD | CLOSED_WON.
dateField string no CLOSE | REGISTERED | CREATED.
period string no FISCAL_YEAR | FISCAL_QUARTER | TRAILING_12_MONTHS | CUSTOM.
start string no
end string no
source string no FOURS | SALESFORCE.
salesforce JourneySalesforceDealValue no

JourneyMarketingPointsConfig fields:

FieldTypeRequiredDescription
points integer no
period string no

JourneyStepProgress fields:

FieldTypeRequiredDescription
current number no
target number no
windowStart string no Start of the counting period (inclusive).
windowEnd string no End of the counting period (exclusive) — the window is [windowStart, windowEnd).
computedAt string no
error string no

JourneySalesforceDealValue fields:

FieldTypeRequiredDescription
object string no Always Opportunity (omitted means Opportunity).
valueField string no
dateField string no
filters array<JourneySalesforceFilter> no

JourneySalesforceFilter fields:

FieldTypeRequiredDescription
field string no
operator string no EQ | NEQ.
value string no

Example

The request bodies are this operation's documented examples; the response and error bodies are generated from its schema. Substitute your own ids, and set SUGER_TOKEN to a bearer token from the OAuth client-credentials exchange.

Request

curl -X POST 'https://api.suger.cloud/ai/org/{orgId}/prm/partnership/{partnershipId}/assignJourney' \
  -H "Authorization: Bearer $SUGER_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
  "templateId": "2b7e9c1a-5d4f-4e0b-9a63-1f8c2d7e4b50"
}'

Response — 201

{
  "assignment": {
    "archivedAt": "string",
    "assignedAt": "string",
    "assignedByUserId": "01H0000000000000000000",
    "completedAt": "string",
    "createTime": "2026-01-31T12:00:00Z",
    "description": "string",
    "estimatedDays": 1,
    "id": "01H0000000000000000000",
    "lastUpdateTime": "2026-01-31T12:00:00Z",
    "name": "Acme Corp",
    "organizationId": "01H0000000000000000000",
    "outdated": true
  },
  "grantSummary": {
    "grantedCourses": [
      {
        "courseId": "01H0000000000000000000",
        "courseName": "Acme Corp"
      }
    ],
    "warnings": [
      "string"
    ]
  }
}

View as Markdown · API reference overview

Spotted something wrong or out of date on this page? Tell us and we'll correct it.