[
  {
    "name": "ChangeOwner",
    "label": "Change Owner",
    "type": "ChangeOwner",
    "icon": "UserCheck",
    "appliesTo": [
      "Lead",
      "Account",
      "Contact",
      "Opportunity",
      "Case",
      "Campaign",
      "Contract",
      "Order",
      "Task",
      "Event"
    ],
    "config": {
      "visibilityCondition": "record.OwnerId != null"
    }
  },
  {
    "name": "Clone",
    "label": "Clone",
    "type": "Standard",
    "icon": "Copy",
    "objectApiName": "Opportunity"
  },
  {
    "name": "EditProducts",
    "label": "Edit Products",
    "type": "NavigateToRelatedList",
    "icon": "Package",
    "objectApiName": "Opportunity",
    "config": {
      "targetObject": "OpportunityLineItem",
      "lookupField": "OpportunityId"
    }
  },
  {
    "name": "Accept",
    "label": "Accept",
    "type": "UpdateStatus",
    "icon": "CheckCircle",
    "objectApiName": "Quote",
    "config": {
      "targetStatus": "Accepted",
      "statusField": "Status",
      "visibilityCondition": "record.Status == 'Approved'"
    }
  },
  {
    "name": "Activate",
    "label": "Activate",
    "type": "UpdateStatus",
    "icon": "CirclePlay",
    "objectApiName": "Order",
    "config": {
      "targetStatus": "Activated",
      "statusField": "Status",
      "visibilityCondition": "record.Status == 'Draft'"
    }
  },
  {
    "name": "CreateContact",
    "label": "New Contact",
    "type": "NavigateToNewRecord",
    "icon": "UserPlus",
    "objectApiName": "Account",
    "targetObject": "Contact",
    "config": {
      "lookupField": "AccountId"
    }
  },
  {
    "name": "CreateContract",
    "label": "Create Contract",
    "type": "NavigateToNewRecord",
    "icon": "FileSignature",
    "objectApiName": "Account",
    "targetObject": "Contract",
    "config": {
      "lookupField": "AccountId",
      "prefillMappings": {
        "OwnerId": "OwnerId",
        "CurrencyIsoCode": "CurrencyIsoCode",
        "Description": "Description",
        "BillingStreet": "BillingStreet",
        "BillingCity": "BillingCity",
        "BillingState": "BillingState",
        "BillingPostalCode": "BillingPostalCode",
        "BillingCountry": "BillingCountry"
      }
    }
  },
  {
    "name": "AddOpportunityLineItem",
    "label": "Add Product",
    "type": "NavigateToNewRecord",
    "icon": "PackagePlus",
    "objectApiName": "Opportunity",
    "targetObject": "OpportunityLineItem",
    "config": {
      "lookupField": "OpportunityId",
      "prefillMappings": {
        "CurrencyIsoCode": "CurrencyIsoCode"
      }
    }
  },
  {
    "name": "RecalculateOLI",
    "label": "Recalculate",
    "type": "UpdateStatus",
    "icon": "RefreshCw",
    "objectApiName": "OpportunityLineItem",
    "config": {
      "targetStatus": true,
      "statusField": "Recalculate__c"
    }
  },
  {
    "name": "PartnerAttribution",
    "label": "Partner Attribution",
    "type": "NavigateToNewRecord",
    "icon": "Handshake",
    "objectApiName": "Opportunity",
    "targetObject": "Partner_Attribution__c",
    "config": {
      "lookupField": "Opportunity__c",
      "prefillMappings": {
        "Partner__c": "Partner_Name__c"
      }
    }
  },
  {
    "name": "UploadArchivedContract",
    "label": "Upload Archived Contr.",
    "type": "UploadFileUpdateRecord",
    "icon": "FileUp",
    "objectApiName": "Contract",
    "config": {
      "description": "Upload the signed archived contract document.",
      "accept": ".pdf,.doc,.docx,.ppt,.pptx,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation",
      "attachmentKind": "archived_contract",
      "fieldUpdates": {
        "Status": "Effective",
        "Archived__c": true
      },
      "visibilityCondition": "record.Status == 'Approved'"
    }
  },
  {
    "name": "UploadArchivedOrder",
    "label": "Upload Archived OF",
    "type": "UploadFileUpdateRecord",
    "icon": "FileUp",
    "objectApiName": "Order",
    "config": {
      "description": "Upload the signed archived order form.",
      "accept": ".pdf,.doc,.docx,.ppt,.pptx,application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation",
      "attachmentKind": "archived_order",
      "fieldUpdates": {
        "Status": "Activated",
        "Archived__c": true
      },
      "visibilityCondition": "record.Status == 'Approved'"
    }
  },
  {
    "name": "Clone",
    "label": "Clone",
    "type": "Standard",
    "icon": "Copy",
    "objectApiName": "Campaign"
  },
  {
    "name": "AddCreditsTopup",
    "label": "Add Top-up",
    "type": "NavigateToNewRecord",
    "icon": "Wallet",
    "objectApiName": "Credits__c",
    "targetObject": "Credits_Topup__c",
    "config": {
      "lookupField": "Credits__c",
      "visibilityCondition": "(record.Credit_Lifecycle__c == 'Active' || record.Credit_Lifecycle__c == 'Provisioned' || record.Credit_Lifecycle__c == 'Completed') && record.Credit_Type__c == 'PoC'"
    }
  },
  {
    "name": "ApplyForCredits",
    "label": "Apply for Credits",
    "type": "NavigateToNewRecord",
    "icon": "Coins",
    "objectApiName": "Account",
    "targetObject": "Credits__c",
    "config": {
      "lookupField": "Account__c"
    }
  },
  {
    "name": "ApplyForPoCCredits",
    "label": "Apply for PoC",
    "type": "NavigateToNewRecord",
    "icon": "FlaskConical",
    "objectApiName": "Opportunity",
    "targetObject": "Credits__c",
    "config": {
      "lookupField": "Opportunity__c",
      "prefillMappings": {
        "Account__c": "AccountId",
        "Credit_Type__c": "Literal:PoC"
      },
      "visibilityCondition": "record.StageName != 'Closed Lost'"
    }
  },
  {
    "name": "SaveAndSubmit",
    "label": "Save & Submit",
    "type": "SaveAndSubmit",
    "icon": "Send",
    "appliesTo": [
      "Account",
      "Credits__c",
      "Credits_Topup__c"
    ],
    "config": {}
  }
]
