younifyd
Menu

orderRiskAssessmentCreate

Creates a risk assessment for a specific order using the provided risk level and facts. Shopify sends an orders/riskassessmentchanged webhook when the assessment is created.

Use it in a workflow

  1. Add a step and choose the Shopify connector.
  2. Pick the orderRiskAssessmentCreate action (under Order).
  3. Fill in the fields below, then reference the result from later steps as {{orderriskassessmentcreate.response.data}}.

Query

This is the mutation the action sends by default. Edit it in the step's Query field to change which fields come back.

graphql
mutation OrderRiskAssessmentCreate($orderRiskAssessmentInput: OrderRiskAssessmentCreateInput!) {
  orderRiskAssessmentCreate(orderRiskAssessmentInput: $orderRiskAssessmentInput) {
    orderRiskAssessment {
      facts {
        description
        sentiment
      }
      provider {
        apiKey
        appStoreAppUrl
        appStoreDeveloperUrl
        availableAccessScopes
        banner
        description
        developerName
        developerType
        developerUrl
        embedded
        failedRequirements
        features
        feedback
        handle
        icon
        id
        installUrl
        installation
        isPostPurchaseAppInUse
        launchUrl
        navigationItems
        optionalAccessScopes
        previouslyInstalled
        pricingDetails
        pricingDetailsSummary
        privacyPolicyUrl
        publicCategory
        published
        requestedAccessScopes
        screenshots
        shopifyDeveloped
        title
        uninstallMessage
        uninstallUrl
        webhookApiVersion
      }
      riskLevel
    }
    userErrors {
      code
      field
      message
    }
  }
}

Variables

Pass these as a JSON object in the step's Variables field.

orderRiskAssessmentInputobjectrequired

The input for creating an order risk assessment.

orderIdstringrequired
riskLevelstringrequired

One ofHIGHMEDIUMLOWNONEPENDING

factsarray<object>required2 fields
json
{
  "orderRiskAssessmentInput": {
    "orderId": "string",
    "riskLevel": "HIGH",
    "facts": [
      {
        "sentiment": "string",
        "description": "string"
      }
    ]
  }
}

Response

Read the result with {{orderriskassessmentcreate.response.data.data.orderRiskAssessmentCreate}}. If the API returns errors, the step fails and they are at {{orderriskassessmentcreate.response.data.errors}}.

orderRiskAssessmentobject
factsarray<object>
providerobject35 fields
riskLevelstring

One ofHIGHMEDIUMLOWNONEPENDING

userErrorsarray<object>
codeobject
fieldobject
messageobject

Need more? See the Shopify guide for connection setup and behaviour shared by every action.