younifyd
Menu

createComment

Creates a Comment against a known entity.

Use it in a workflow

  1. Add a step and choose the Fluent Commerce connector.
  2. Pick the createComment action (under Create).
  3. Fill in the fields below, then reference the result from later steps as {{createcomment.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 CreateComment($input: CreateCommentInput) {
  createComment(input: $input) {
    createdOn
    entityId
    entityType
    id
    text
    updatedOn
  }
}

Variables

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

inputobject
entityIdstringrequired
entityTypestringrequired
textstringrequired
json
{
  "input": {
    "entityId": "string",
    "entityType": "string",
    "text": "string"
  }
}

Response

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

createdOnstring
entityIdstring
entityTypestring
idstring
textstring
updatedOnstring

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