afv-library/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/MacroInstruction.json

137 lines
10 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"sections": [
"title",
"description",
"fields",
"usage",
"associated_objects",
"wsdl_segment",
"field_reference"
],
"title": "MacroInstruction - Data API",
"description": "Represents an instruction in a macro. An instruction can specify the object that the macro interacts with, the context or publisher that the macro works within, the operation or action that the macro performs, and the target of the macros actions.",
"fields_columns": [
"type",
"properties",
"description"
],
"fields": {
"MacroId": {
"type": "reference",
"properties": "Create, Filter, Group, Sort",
"description": "ID of the macro that contains this instruction."
},
"Name": {
"type": "string",
"properties": "Autonumber, Defaulted on create, Filter, Sort",
"description": "Name of the instruction."
},
"Operation": {
"type": "picklist",
"properties": "Create, Filter, Group, Restricted picklist, Sort, Update",
"description": "The action that the macro instruction performs. Valid values are: Select Set Insert Submit Close To create macro instructions that execute conditionally, these values are available in API version 46.0 and later. IF ELSEIF ELSE ENDIF"
},
"SortOrder": {
"type": "int",
"properties": "Create, Filter, Group, Sort, Update",
"description": "Order of this instruction in the macro."
},
"Target": {
"type": "picklist",
"properties": "Create, Filter, Group, Nillable, Restricted picklist, Sort, Update",
"description": "The object thats the target of the operation. For example, the target for the active case tab (Tab.Case) or a quick action, like the Send Email action on the case object (QuickAction.Case.SendEmail). In Lightning Experience, macros are supported on standard and custom objects that allow quick actions and have a customizable page layout. In Salesforce Classic, macros are supported on objects with feed-based layouts and quick actions. You can specify relative dates and times for the following targets. DateTime Date Time DueDate Birthday"
},
"Value": {
"type": "string",
"properties": "Create, Filter, Nillable, Sort, Update",
"description": "Value of a field. If the operation is Select, then the value is null, because the operation selects the object on which the macro performs an action. An instruction can contain both a Value field and a ValueRecord field, but only one of these fields can have a value. The other field value must be null. To create relative dates and times, specify a valid Salesforce formula, prefaced by MacroFormula. For example, the following formula creates a date that is 1 day from now: MacroFormula:NOW() + 1 You cant edit custom relative formulas in the Macro Builder."
},
"ValueRecord": {
"type": "string",
"properties": "Create, Filter, Group, Nillable, Sort, Update",
"description": "ID of the value or record. The ValueRecord can be either a value or a record, but not both. An instruction can contain both a Value field and a ValueRecord field, but only one of these fields can have a value. The other field value must be null."
}
},
"usage": "MacroInstructions can specify objects, operations, conditions, and targets. For example, a macro containing these instructions performs a quick action that sends an email. You can create conditional macros using IF, ELSEIF, ELSE, and ENDIF as operations. In a conditional statement, the ExpressionFilter and ExpressionFilterCriteria objects are used to control which instructions execute. The ExpressionFilter object lets you define a logical expression with one or more conditions. It uses a child object, ExpressionFilterCriteria, to represent each condition that is evaluated. For example, consider the following conditional statement and macro instructions. The ExpressionFilter object includes a FilterConditionLogic field containing 1 AND 2, where 1 and 2 are ExpressionFilterCriteria objects. The SortOrder field in the ExpressionFilterCriteria object maps condition 1 to Case.Status EQUALS New, and condition 2 to Case.Origin EQUALS Phone. If the conditional statement evaluates to true, then the instructions in the IF block are executed; otherwise, the instructions in the ELSE block are executed. Any number of macro instructions can be present inside an IF, ELSEIF, or ELSE block. In addition, conditions can be nested.\n\nMacroInstructions can specify objects, operations, conditions, and targets. For example, a macro containing these instructions performs a quick action that sends an email.\n\nYou can create conditional macros using IF, ELSEIF, ELSE, and ENDIF as operations. In a conditional statement, the ExpressionFilter and ExpressionFilterCriteria objects are used to control which instructions execute. The ExpressionFilter object lets you define a logical expression with one or more conditions. It uses a child object, ExpressionFilterCriteria, to represent each condition that is evaluated.\n\nFor example, consider the following conditional statement and macro instructions.\n\nThe ExpressionFilter object includes a FilterConditionLogic field containing 1 AND 2, where 1 and 2 are ExpressionFilterCriteria objects. The SortOrder field in the ExpressionFilterCriteria object maps condition 1 to Case.Status EQUALS New, and condition 2 to Case.Origin EQUALS Phone. If the conditional statement evaluates to true, then the instructions in the IF block are executed; otherwise, the instructions in the ELSE block are executed.\n\nAny number of macro instructions can be present inside an IF, ELSEIF, or ELSE block. In addition, conditions can be nested.",
"associated_objects": "This object has the following associated objects. If the API version isnt specified, theyre available in the same API versions as this object. Otherwise, theyre available in the specified API version and later.\n\n- **MacroInstructionChangeEvent (API version 48.0)**: Change events are available for the object.",
"wsdl_segment": "```xml\n<simpleType name=\"ID\">\n <restriction base=\"xsd:string\">\n <length value=\"18\"/>\n <pattern value=\"[a-zA-Z0-9]{18}\"/>\n </restriction>\n</simpleType>\n<complexType name=\"MacroInstruction\">\n <complexContent>\n <extension base=\"ens:sObject\">\n <sequence>\n <element name=\"ApprovalSubmissions\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\n <element name=\"ApprovalWorkItems\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\n <element name=\"CreatedBy\" nillable=\"true\" minOccurs=\"0\" type=\"ens:User\"/>\n <element name=\"CreatedById\" nillable=\"true\" minOccurs=\"0\" type=\"tns:ID\"/>\n <element name=\"CreatedDate\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:dateTime\"/>\n <element name=\"FlowOrchestrationWorkItems\" nillable=\"true\" minOccurs=\"0\" type=\"tns:QueryResult\"/>\n <element name=\"IsDeleted\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:boolean\"/>\n <element name=\"LastModifiedBy\" nillable=\"true\" minOccurs=\"0\" type=\"ens:User\"/>\n <element name=\"LastModifiedById\" nillable=\"true\" minOccurs=\"0\" type=\"tns:ID\"/>\n <element name=\"LastModifiedDate\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:dateTime\"/>\n <element name=\"Macro\" nillable=\"true\" minOccurs=\"0\" type=\"ens:Macro\"/>\n <element name=\"MacroId\" nillable=\"true\" minOccurs=\"0\" type=\"tns:ID\"/>\n <element name=\"Name\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:string\"/>\n <element name=\"Operation\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:string\"/>\n <element name=\"SortOrder\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:int\"/>\n <element name=\"SystemModstamp\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:dateTime\"/>\n <element name=\"Target\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:string\"/>\n <element name=\"UserRecordAccess\" nillable=\"true\" minOccurs=\"0\" type=\"ens:UserRecordAccess\"/>\n <element name=\"Value\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:string\"/>\n <element name=\"ValueRecord\" nillable=\"true\" minOccurs=\"0\" type=\"xsd:string\"/>\n </sequence>\n </extension>\n </complexContent>\n</complexType>\n<simpleType name=\"QueryLocator\">\n <restriction base=\"xsd:string\"/>\n</simpleType>\n<complexType name=\"QueryResult\">\n <sequence>\n <element name=\"done\" type=\"xsd:boolean\"/>\n <element name=\"queryLocator\" type=\"tns:QueryLocator\" nillable=\"true\"/>\n <element name=\"records\" type=\"ens:sObject\" nillable=\"true\" minOccurs=\"0\" maxOccurs=\"unbounded\"/>\n <element name=\"size\" type=\"xsd:int\"/>\n </sequence>\n</complexType>\n```",
"field_reference": {
"CreatedById": {
"field_label": "Created By ID",
"type": "reference",
"length": "18"
},
"CreatedDate": {
"field_label": "Created Date",
"type": "datetime"
},
"CurrencyIsoCode": {
"field_label": "Currency ISO Code",
"type": "picklist",
"length": "3"
},
"Id": {
"field_label": "Macro Instruction ID",
"type": "id",
"length": "18"
},
"IsDeleted": {
"field_label": "Deleted",
"type": "boolean"
},
"LastModifiedById": {
"field_label": "Last Modified By ID",
"type": "reference",
"length": "18"
},
"LastModifiedDate": {
"field_label": "Last Modified Date",
"type": "datetime"
},
"MacroId": {
"field_label": "Macro ID",
"type": "reference",
"length": "18"
},
"Name": {
"field_label": "Macro Instruction Name",
"type": "string",
"length": "255"
},
"Operation": {
"field_label": "Operation",
"type": "picklist",
"length": "255"
},
"SortOrder": {
"field_label": "Sort Order",
"type": "int",
"digits": "9"
},
"SystemModstamp": {
"field_label": "System Modstamp",
"type": "datetime"
},
"Target": {
"field_label": "Target",
"type": "picklist",
"length": "255"
},
"Value": {
"field_label": "Value",
"type": "textarea",
"length": "4000"
},
"ValueRecord": {
"field_label": "Value Record ID",
"type": "string",
"length": "15"
}
},
"field_reference_columns": [
"field_label",
"type",
"length",
"digits"
]
}