💡 Examples in creating, updating or deleting entries
Create a Contact
Here's an example of creating a single contact.
async function script(C) {
const response = await C.createEntry({
value:{
firstName: 'John',
lastName: 'Doe',
email: '[email protected]',
phone: '123-456-7890',
status: [123]
isActive: true
},
recordInternalId: 'standard-contacts',
});
C.log(response);
}Create multiple Contacts
Here's an example of how you're able to create multiple contacts at the same time in bulk.
async function script(C) {
const response = await C.createEntries({
values: [
{
firstName: 'John',
lastName: 'Doe',
email: '[email protected]',
phone: '123-456-7890'
},
{
firstName: 'Jane',
lastName: 'Smith',
email: '[email protected]',
phone: '987-654-3210'
},
],
recordInternalId: 'standard-contacts',
options: {
returnRecordInfo: true,
},
});
C.log(response);
}Delete a Contact
async function script(C) {
const response = await C.deleteEntries({
deletes: [
{
entryIds: [562940, 556889], // The recordValueIds you wish to delete
recordInternalId: 'standard-contacts',
},
],
});
C.log(response);
}📌 Need Help?
