The following code can be used to send the Inventory data to brand scope using authentication. var requestObj = { url: https://integration-test-erp.brandscope.com/api/v2/ats/send_ats.json, headers: { ‘cache-control’: ‘no-cache’, ‘authorization’: ‘Token ‘ + {token}, ‘content-type’: ‘application/json’ }, body: JSON.stringify({ … Continue reading Function to send ATS inventory details to brandscope
Author: Anjo Joseph
The endpoint for returning dates by adding specific dates to current date
The code provided below can be used for the endpoint to return a date by adding a specific number of days to the current day. The script excludes holidays and weekends when adding the days and considers the current date and time in the UK timezone. /** *@NApiVersion 2.1 *@NScriptType Suitelet */ define([‘N/format’, ‘N/search’], … Continue reading The endpoint for returning dates by adding specific dates to current date
Proposal For Sales Order Popup
Proposal Summary This proposal covers the scope of adding a new item selection popup with multiple filters in the item line and a new summary box in the sales order at Pharma Cosmetics by Jobin & Jismi. 1. Requirement From Pharma Cosmetics To enhance the sales order creation process by providing a user-friendly item… Continue reading Proposal For Sales Order Popup
Script to add custom button to the sublist line in suitelet
The following code is used to add custom button in the sublist line in suitelet page let objForm = ui.createForm({ title: ‘Select Items’, hideNavBar: true }); let objSublist = objForm.addSublist({ id: “custpage_sublist_item”, label: “Items: “, type: ui.SublistType.LIST }); let custpage_duplicatebutton = objSublist.addField({ id: “custpage_duplicate_add”, type: ui.FieldType.TEXTAREA, label: “Duplicate”, functionName: “addRow()” }); custpage_duplicatebutton.updateDisplayType({ displayType: ui.FieldDisplayType.INLINE … Continue reading Script to add custom button to the sublist line in suitelet
Klaviyo API for fetching all profiles
This API fetches all profiles from the Klaviyo Account. Method: Get Endpoint: https://a.klaviyo.com/api/profiles/ Profiles can be sorted by the following fields in ascending and descending order: id, created, updated, email, subscriptions.email.marketing.suppression.timestamp, subscriptions.email.marketing.list_suppressions.timestamp curl –request GET –url ‘https://a.klaviyo.com/api/profiles/?page[size]=20’ –header ‘Authorization: Klaviyo-API-Key your-private-api-key’ –header ‘accept: application/json’ –header ‘revision: 2024-06-15’
Klaviyo API for get all Events
This API used to get all events in a Klaviyo account Method: get Endpoint: https://a.klaviyo.com/api/events/ curl –request GET –url https://a.klaviyo.com/api/events/ –header ‘Authorization: Klaviyo-API-Key your-private-api-key’ –header ‘accept: application/json’ –header ‘revision: 2024-06-15’ Note: Returns a maximum of 200 events per page.
Klaviyo API for Creating Profile
The API used to create a new profile Method: POST Endpoint: https://a.klaviyo.com/api/profiles/ curl –request POST –url https://a.klaviyo.com/api/profiles/ –header ‘Authorization: Klaviyo-API-Key your-private-api-key’ –header ‘accept: application/json’ –header ‘content-type: application/json’ –header ‘revision: 2024-06-15’ –data ‘ { “data”: { “type”: “profile”, “attributes”: { “email”: “sarah.mason@klaviyo-demo.com”, “phone_number”: “+15005550006”, “first_name”: “Sarah”, “last_name”: “Mason”, “organization”: “Example Corporation”, “title”: “Regional Manager”, “image”: “https://images.pexels.com/photos/3760854/pexels-photo-3760854.jpeg”,… Continue reading Klaviyo API for Creating Profile
Klaviyo API for creating Event
This API is used to create a new event to track a profile’s activity. Note that this endpoint allows you to create a new profile or update an existing profile’s properties. Method: Post Endpoint: https://a.klaviyo.com/api/events/ curl –request POST –url https://a.klaviyo.com/api/events/ –header ‘Authorization: Klaviyo-API-Key your-private-api-key’ –header ‘accept: application/json’ –header ‘content-type: application/json’ –header ‘revision: 2024-06-15’ –data ‘… Continue reading Klaviyo API for creating Event
Script for creating the Customer Statement PDF Endpoint using the encrypted parameters.
The following script can be used for the endpoint for displaying the customer statement PDF from externally using the encrypted parameters. The parameters are encrypted using the XOR algorithm. /** * @NApiVersion 2.1 * @NScriptType Suitelet */ define([‘N/render’, ‘N/search’], /** * @param{record} record * @param{render} render * @param{format} format * @param{search} search */ (render, search)… Continue reading Script for creating the Customer Statement PDF Endpoint using the encrypted parameters.
Script for creating the Endpoint for Invoice PDF using the encrypted parameters
The following script can be used for the endpoint for displaying the Invoice PDF from externally using the encrypted parameters. The parameters are encrypted using the XOR algorithm. /** * @NApiVersion 2.1 * @NScriptType Suitelet */ define([‘N/render’], /** * @param{render} render */ (render) => { /** … Continue reading Script for creating the Endpoint for Invoice PDF using the encrypted parameters